aboutsummaryrefslogtreecommitdiff
path: root/src/modules/systemlib/mixer/mixer_load.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/modules/systemlib/mixer/mixer_load.c')
-rw-r--r--src/modules/systemlib/mixer/mixer_load.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/modules/systemlib/mixer/mixer_load.c b/src/modules/systemlib/mixer/mixer_load.c
index a55ddf8a3..bf3428a50 100644
--- a/src/modules/systemlib/mixer/mixer_load.c
+++ b/src/modules/systemlib/mixer/mixer_load.c
@@ -41,6 +41,7 @@
#include <string.h>
#include <stdio.h>
#include <ctype.h>
+#include <systemlib/err.h>
#include "mixer_load.h"
@@ -52,7 +53,8 @@ int load_mixer_file(const char *fname, char *buf, unsigned maxlen)
/* open the mixer definition file */
fp = fopen(fname, "r");
if (fp == NULL) {
- return 1;
+ warnx("file not found");
+ return -1;
}
/* read valid lines from the file into a buffer */
@@ -88,7 +90,8 @@ int load_mixer_file(const char *fname, char *buf, unsigned maxlen)
/* if the line is too long to fit in the buffer, bail */
if ((strlen(line) + strlen(buf) + 1) >= maxlen) {
- return 1;
+ warnx("line too long");
+ return -1;
}
/* add the line to the buffer */