From: Andre Noll Date: Mon, 6 May 2013 12:36:15 +0000 (+0200) Subject: oss mixer: Improve error message. X-Git-Tag: v0.4.13~30^2 X-Git-Url: http://git.tuebingen.mpg.de/?p=paraslash.git;a=commitdiff_plain;h=9e32ff9e833fc27edec17842fbca4ae8538c67d3 oss mixer: Improve error message. If /dev/mixer does not exist, para_fade fails with main: No such file or directory This is a rather bad error message, since the name of the missing file is not mentioned. This patch makes oss_mix.c print the additional line oss_mix_open: could not open /dev/mixer --- diff --git a/oss_mix.c b/oss_mix.c index 9fe86504..5182ad23 100644 --- a/oss_mix.c +++ b/oss_mix.c @@ -56,8 +56,10 @@ static int oss_mix_open(const char *dev, struct mixer_handle **handle) dev = "/dev/mixer"; PARA_INFO_LOG("opening %s\n", dev); ret = para_open(dev, O_RDWR, 42); - if (ret < 0) + if (ret < 0) { + PARA_ERROR_LOG("could not open %s\n", dev); return ret; + } h = para_malloc(sizeof(*h)); h->fd = ret; *handle = h;