summaryrefslogtreecommitdiffstats
path: root/libsmartcols/src/init.c
diff options
context:
space:
mode:
authorOndrej Oprala2014-07-31 13:23:07 +0200
committerKarel Zak2014-08-13 12:33:47 +0200
commit14ad2353ccabc330412baff5fe86592f2618cdee (patch)
tree43e0d6eb8674c60ba1a6be0d879f3d62d28c9a51 /libsmartcols/src/init.c
parentlibfdisk: rename fdisk_column to fdisk_field (diff)
downloadkernel-qcow2-util-linux-14ad2353ccabc330412baff5fe86592f2618cdee.tar.gz
kernel-qcow2-util-linux-14ad2353ccabc330412baff5fe86592f2618cdee.tar.xz
kernel-qcow2-util-linux-14ad2353ccabc330412baff5fe86592f2618cdee.zip
libs/debug: accept human readable names for _DEBUG=
For example $ LIBMOUNT_DEBUG=tab,cache findmnt to debug only TAB and CACHE subsystem. Signed-off-by: Ondrej Oprala <ooprala@redhat.com> Signed-off-by: Karel Zak <kzak@redhat.com>
Diffstat (limited to 'libsmartcols/src/init.c')
-rw-r--r--libsmartcols/src/init.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/libsmartcols/src/init.c b/libsmartcols/src/init.c
index 95b4610b7..9fec0356d 100644
--- a/libsmartcols/src/init.c
+++ b/libsmartcols/src/init.c
@@ -19,6 +19,15 @@
UL_DEBUG_DEFINE_MASK(libsmartcols);
+static const struct dbg_mask libsmartcols_masknames [] = {
+ { "all", SCOLS_DEBUG_ALL },
+ { "cell", SCOLS_DEBUG_CELL },
+ { "line", SCOLS_DEBUG_LINE },
+ { "tab", SCOLS_DEBUG_TAB },
+ { "col", SCOLS_DEBUG_COL },
+ { "buff", SCOLS_DEBUG_BUFF },
+ { NULL, 0 }
+};
/**
* scols_init_debug:
* @mask: debug mask (0xffff to enable full debugging)