diff options
author | Artem Bityutskiy <Artem.Bityutskiy@nokia.com> | 2011-05-17 08:15:30 -0400 |
---|---|---|
committer | Artem Bityutskiy <Artem.Bityutskiy@nokia.com> | 2011-05-23 01:22:20 -0400 |
commit | 56e46742e846e4de167dde0e1e1071ace1c882a5 (patch) | |
tree | ffed000ab5bb33d482878bd72420474bdab1eec4 /fs/ubifs/debug.c | |
parent | bdc1a1b6100c78a6002b1761ebe36d5fe8f8585b (diff) |
UBIFS: switch to dynamic printks
Switch to debugging using dynamic printk (pr_debug()). There is no good reason
to carry custom debugging prints if there is so cool and powerful generic
dynamic printk infrastructure, see Documentation/dynamic-debug-howto.txt. With
dynamic printks we can switch on/of individual prints, per-file, per-function
and per format messages. This means that instead of doing old-fashioned
echo 1 > /sys/module/ubifs/parameters/debug_msgs
to enable general messages, we can do:
echo 'format "UBIFS DBG gen" +ptlf' > control
to enable general messages and additionally ask the dynamic printk
infrastructure to print process ID, line number and function name. So there is
no reason to keep UBIFS-specific crud if there is more powerful generic thing.
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
Diffstat (limited to 'fs/ubifs/debug.c')
-rw-r--r-- | fs/ubifs/debug.c | 3 |
1 files changed, 0 insertions, 3 deletions
diff --git a/fs/ubifs/debug.c b/fs/ubifs/debug.c index f46d77e9f031..0bb2bcef0de9 100644 --- a/fs/ubifs/debug.c +++ b/fs/ubifs/debug.c | |||
@@ -42,15 +42,12 @@ DEFINE_SPINLOCK(dbg_lock); | |||
42 | static char dbg_key_buf0[128]; | 42 | static char dbg_key_buf0[128]; |
43 | static char dbg_key_buf1[128]; | 43 | static char dbg_key_buf1[128]; |
44 | 44 | ||
45 | unsigned int ubifs_msg_flags; | ||
46 | unsigned int ubifs_chk_flags; | 45 | unsigned int ubifs_chk_flags; |
47 | unsigned int ubifs_tst_flags; | 46 | unsigned int ubifs_tst_flags; |
48 | 47 | ||
49 | module_param_named(debug_msgs, ubifs_msg_flags, uint, S_IRUGO | S_IWUSR); | ||
50 | module_param_named(debug_chks, ubifs_chk_flags, uint, S_IRUGO | S_IWUSR); | 48 | module_param_named(debug_chks, ubifs_chk_flags, uint, S_IRUGO | S_IWUSR); |
51 | module_param_named(debug_tsts, ubifs_tst_flags, uint, S_IRUGO | S_IWUSR); | 49 | module_param_named(debug_tsts, ubifs_tst_flags, uint, S_IRUGO | S_IWUSR); |
52 | 50 | ||
53 | MODULE_PARM_DESC(debug_msgs, "Debug message type flags"); | ||
54 | MODULE_PARM_DESC(debug_chks, "Debug check flags"); | 51 | MODULE_PARM_DESC(debug_chks, "Debug check flags"); |
55 | MODULE_PARM_DESC(debug_tsts, "Debug special test flags"); | 52 | MODULE_PARM_DESC(debug_tsts, "Debug special test flags"); |
56 | 53 | ||