summaryrefslogtreecommitdiff
path: root/alsactl/alsactl.h
diff options
context:
space:
mode:
Diffstat (limited to 'alsactl/alsactl.h')
-rw-r--r--alsactl/alsactl.h10
1 files changed, 5 insertions, 5 deletions
diff --git a/alsactl/alsactl.h b/alsactl/alsactl.h
index 89ad295..be90efb 100644
--- a/alsactl/alsactl.h
+++ b/alsactl/alsactl.h
@@ -34,16 +34,16 @@ extern char *statefile;
#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 95)
#define cerror(cond, ...) do {\
- if (cond) { \
- fprintf(stderr, "%s: %s:%d: ", command, __FUNCTION__, __LINE__); \
+ if (cond || debugflag) { \
+ fprintf(stderr, "%s%s: %s:%d: ", debugflag ? "WARNING: " : "", command, __FUNCTION__, __LINE__); \
fprintf(stderr, __VA_ARGS__); \
putc('\n', stderr); \
} \
} while (0)
#else
#define cerror(cond, args...) do {\
- if (cond) { \
- fprintf(stderr, "%s: %s:%d: ", command, __FUNCTION__, __LINE__); \
+ if (cond || debugflag) { \
+ fprintf(stderr, "%s%s: %s:%d: ", debugflag ? "WARNING: " : "", command, __FUNCTION__, __LINE__); \
fprintf(stderr, ##args); \
putc('\n', stderr); \
} \
@@ -78,7 +78,7 @@ int generate_names(const char *cfgfile);
int file_map(const char *filename, char **buf, size_t *bufsize);
void file_unmap(void *buf, size_t bufsize);
size_t line_width(const char *buf, size_t bufsize, size_t pos);
-void initfailed(int cardnumber, const char *reason);
+void initfailed(int cardnumber, const char *reason, int exitcode);
static inline int hextodigit(int c)
{