diff options
author | Karel Zak | 2011-09-29 23:29:46 +0200 |
---|---|---|
committer | Karel Zak | 2011-09-29 23:29:46 +0200 |
commit | 365e5a7c54d6684d03bc92e82202da68bab345a9 (patch) | |
tree | 78eb69ca5ef04479ea705d041f395e07fe9f2454 /libmount/src/mountP.h | |
parent | lib,loopdev: add debugu messages (diff) | |
download | kernel-qcow2-util-linux-365e5a7c54d6684d03bc92e82202da68bab345a9.tar.gz kernel-qcow2-util-linux-365e5a7c54d6684d03bc92e82202da68bab345a9.tar.xz kernel-qcow2-util-linux-365e5a7c54d6684d03bc92e82202da68bab345a9.zip |
libmount: use loopdev debug facility
Signed-off-by: Karel Zak <kzak@redhat.com>
Diffstat (limited to 'libmount/src/mountP.h')
-rw-r--r-- | libmount/src/mountP.h | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/libmount/src/mountP.h b/libmount/src/mountP.h index 92d0b26a5..cce4c5c35 100644 --- a/libmount/src/mountP.h +++ b/libmount/src/mountP.h @@ -53,12 +53,18 @@ # include <stdio.h> # include <stdarg.h> -# define DBG(m,x) do { \ - if ((MNT_DEBUG_ ## m) & libmount_debug_mask) {\ +# define ON_DBG(m, x) do { \ + if ((MNT_DEBUG_ ## m) & libmount_debug_mask) { \ + x; \ + } \ + } while (0) + +# define DBG(m, x) do { \ + if ((MNT_DEBUG_ ## m) & libmount_debug_mask) { \ fprintf(stderr, "libmount: %8s: ", # m); \ x; \ } \ - } while(0) + } while (0) # define DBG_FLUSH do { fflush(stderr); } while(0) @@ -87,7 +93,8 @@ mnt_debug_h(void *handler, const char *mesg, ...) } #else /* !CONFIG_LIBMOUNT_DEBUG */ -# define DBG(m,x) do { ; } while(0) +# define ON_DBG(m,x) do { ; } while (0) +# define DBG(m,x) do { ; } while (0) # define DBG_FLUSH do { ; } while(0) #endif |