From 9e32ff9e833fc27edec17842fbca4ae8538c67d3 Mon Sep 17 00:00:00 2001 From: Andre Noll Date: Mon, 6 May 2013 14:36:15 +0200 Subject: [PATCH] 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 --- oss_mix.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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; -- 2.39.5