diff options
author | Ondrej Oprala | 2014-03-12 15:40:40 +0100 |
---|---|---|
committer | Ondrej Oprala | 2014-03-12 15:40:40 +0100 |
commit | cb3fa84753893c84ff5cb727edb5bdf4eb3757a3 (patch) | |
tree | 35468bb35816ac0db97ebda2052a20984c1a5a0b /include/debug.h | |
parent | libmount: use macros from include/debug.h (diff) | |
download | kernel-qcow2-util-linux-cb3fa84753893c84ff5cb727edb5bdf4eb3757a3.tar.gz kernel-qcow2-util-linux-cb3fa84753893c84ff5cb727edb5bdf4eb3757a3.tar.xz kernel-qcow2-util-linux-cb3fa84753893c84ff5cb727edb5bdf4eb3757a3.zip |
libcommon: define more debugging macros
Signed-off-by: Ondrej Oprala <ooprala@redhat.com>
Diffstat (limited to 'include/debug.h')
-rw-r--r-- | include/debug.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/include/debug.h b/include/debug.h index 51d09b84d..6b6dcd9dc 100644 --- a/include/debug.h +++ b/include/debug.h @@ -12,6 +12,13 @@ #include <stdarg.h> +#define UL_DEBUG_DEFINE_MASK(m) int m ## _debug_mask +#define UL_DEBUG_DECLARE_MASK(m) extern UL_DEBUG_DEFINE_MASK(m) + +/* p - flag prefix, m - flag postfix */ +#define UL_DEBUG_DEFINE_FLAG(p, m) p ## m + +/* l - library name, p - flag prefix, m - flag postfix, x - function */ # define __UL_DBG(l, p, m, x) \ do { \ if ((p ## m) & l ## _debug_mask) { \ |