summaryrefslogtreecommitdiffstats
path: root/include/debug.h
diff options
context:
space:
mode:
authorKarel Zak2014-08-13 14:19:21 +0200
committerKarel Zak2014-08-13 14:19:21 +0200
commit1e063303291467e0004a48a9625e31df11890b78 (patch)
tree6bee7f7c509074dc6899bfe5ddbaf8701d349720 /include/debug.h
parentinclude/debug: cleanup masks (diff)
downloadkernel-qcow2-util-linux-1e063303291467e0004a48a9625e31df11890b78.tar.gz
kernel-qcow2-util-linux-1e063303291467e0004a48a9625e31df11890b78.tar.xz
kernel-qcow2-util-linux-1e063303291467e0004a48a9625e31df11890b78.zip
include/debug: allow to speficy empty masknames
Signed-off-by: Karel Zak <kzak@redhat.com>
Diffstat (limited to 'include/debug.h')
-rw-r--r--include/debug.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/include/debug.h b/include/debug.h
index af5b9ea90..25045aa94 100644
--- a/include/debug.h
+++ b/include/debug.h
@@ -10,6 +10,9 @@
#include <stdarg.h>
#include <string.h>
+struct dbg_mask { char *mname; int val; };
+#define UL_DEBUG_EMPTY_MASKNAMES {{ NULL, 0 }}
+
#define UL_DEBUG_DEFINE_MASK(m) int m ## _debug_mask
#define UL_DEBUG_DECLARE_MASK(m) extern UL_DEBUG_DEFINE_MASK(m)
#define UL_DEBUG_DEFINE_MASKANEMS(m) static const struct dbg_mask m ## _masknames[]
@@ -59,7 +62,6 @@
} \
} while (0)
-struct dbg_mask { char *mname; int val; };
static inline void __attribute__ ((__format__ (__printf__, 1, 2)))
ul_debug(const char *mesg, ...)