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>
This commit is contained in:
@@ -42,15 +42,12 @@ DEFINE_SPINLOCK(dbg_lock);
|
||||
static char dbg_key_buf0[128];
|
||||
static char dbg_key_buf1[128];
|
||||
|
||||
unsigned int ubifs_msg_flags;
|
||||
unsigned int ubifs_chk_flags;
|
||||
unsigned int ubifs_tst_flags;
|
||||
|
||||
module_param_named(debug_msgs, ubifs_msg_flags, uint, S_IRUGO | S_IWUSR);
|
||||
module_param_named(debug_chks, ubifs_chk_flags, uint, S_IRUGO | S_IWUSR);
|
||||
module_param_named(debug_tsts, ubifs_tst_flags, uint, S_IRUGO | S_IWUSR);
|
||||
|
||||
MODULE_PARM_DESC(debug_msgs, "Debug message type flags");
|
||||
MODULE_PARM_DESC(debug_chks, "Debug check flags");
|
||||
MODULE_PARM_DESC(debug_tsts, "Debug special test flags");
|
||||
|
||||
|
Reference in New Issue
Block a user