summaryrefslogtreecommitdiffstats
path: root/libsmartcols/src/smartcolsP.h
diff options
context:
space:
mode:
authorKarel Zak2014-04-07 13:43:50 +0200
committerKarel Zak2014-04-07 13:43:50 +0200
commit4418714f471c9ce5a0054d2c7c51cd6d7ab85fef (patch)
tree771420c820cfef33bbd8125ec94815549271dae2 /libsmartcols/src/smartcolsP.h
parentlibblkid: remove private function from docs (diff)
downloadkernel-qcow2-util-linux-4418714f471c9ce5a0054d2c7c51cd6d7ab85fef.tar.gz
kernel-qcow2-util-linux-4418714f471c9ce5a0054d2c7c51cd6d7ab85fef.tar.xz
kernel-qcow2-util-linux-4418714f471c9ce5a0054d2c7c51cd6d7ab85fef.zip
libsmartcols: add debug and version functions
Signed-off-by: Karel Zak <kzak@redhat.com>
Diffstat (limited to 'libsmartcols/src/smartcolsP.h')
-rw-r--r--libsmartcols/src/smartcolsP.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/libsmartcols/src/smartcolsP.h b/libsmartcols/src/smartcolsP.h
index 431b91b8b..b7f1f2b6d 100644
--- a/libsmartcols/src/smartcolsP.h
+++ b/libsmartcols/src/smartcolsP.h
@@ -14,8 +14,11 @@
#include "c.h"
#include "list.h"
#include "colors.h"
+#include "debug.h"
+
#include "libsmartcols.h"
+/* features */
#define CONFIG_LIBSMARTCOLS_ASSERT
#ifdef CONFIG_LIBSMARTCOLS_ASSERT
@@ -25,6 +28,17 @@
#endif
/*
+ * Debug
+ */
+#define SCOLS_DEBUG_INIT (1 << 1)
+#define SCOLS_DEBUG_ALL 0xFFFF
+
+UL_DEBUG_DECLARE_MASK(libsmartcols);
+#define DBG(m, x) __UL_DBG(libsmartcols, SCOLS_DEBUG_, m, x)
+#define ON_DBG(m, x) __UL_DBG_CALL(libsmartcols, SCOLS_DEBUG_, m, x)
+#define DBG_FLUSH __UL_DBG_FLUSH(libsmartcols, SCOLS_DEBUG_)
+
+/*
* Generic iterator
*/
struct libscols_iter {