Blame alsamixer/die.c

Packit 229ac0
/*
Packit 229ac0
 * die.c - error handlers
Packit 229ac0
 * Copyright (c) Clemens Ladisch <clemens@ladisch.de>
Packit 229ac0
 *
Packit 229ac0
 * This program is free software: you can redistribute it and/or modify
Packit 229ac0
 * it under the terms of the GNU General Public License as published by
Packit 229ac0
 * the Free Software Foundation, either version 2 of the License, or
Packit 229ac0
 * (at your option) any later version.
Packit 229ac0
 *
Packit 229ac0
 * This program is distributed in the hope that it will be useful,
Packit 229ac0
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
Packit 229ac0
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
Packit 229ac0
 * GNU General Public License for more details.
Packit 229ac0
 *
Packit 229ac0
 * You should have received a copy of the GNU General Public License
Packit 229ac0
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
Packit 229ac0
 */
Packit 229ac0
Packit 229ac0
#include "aconfig.h"
Packit 229ac0
#include <stdio.h>
Packit 229ac0
#include <stdlib.h>
Packit 229ac0
#include <alsa/asoundlib.h>
Packit 229ac0
#include "gettext_curses.h"
Packit 229ac0
#include "mainloop.h"
Packit 229ac0
#include "die.h"
Packit 229ac0
Packit 229ac0
void fatal_error(const char *msg)
Packit 229ac0
{
Packit 229ac0
	app_shutdown();
Packit 229ac0
	fprintf(stderr, "%s\n", msg);
Packit 229ac0
	exit(EXIT_FAILURE);
Packit 229ac0
}
Packit 229ac0
Packit 229ac0
void fatal_alsa_error(const char *msg, int err)
Packit 229ac0
{
Packit 229ac0
	app_shutdown();
Packit 229ac0
	fprintf(stderr, _("%s: %s\n"), msg, snd_strerror(err));
Packit 229ac0
	exit(EXIT_FAILURE);
Packit 229ac0
}