printk: add ignore_loglevel as module parameter.
PATCH v2 1/1 printk: add ignore_loglevel as module parameter.
We are enabling some power features on medfield. To test suspend-2-RAM conveniently, we need turn on/off ignore_loglevel frequently without rebooting.
Below patch adds a module parameter, so users could change it by:/sys/module/printk/parameters/ignore_loglevel
Thanks Andrew and Young. I added document info and module param desc.
Signed-off-by Zhang Yanmin <[email protected]>
--- Documentation/kernel-parameters.txt | 3 +++ kernel/printk.c | 3 +++ 2 files changed, 6 insertions(+), 0 deletions(-)
Documentation/kernel-parameters.txt +3 -0
@@ -954,6 +954,9 @@ bytes respectively. Such letter suffixes can also be entirely omitted. ignore_loglevel [KNL] Ignore loglevel setting - this will print /all/ kernel messages to the console. Useful for debugging. + We also add it as printk module parameter, so users + could change it dynamically, usually by + /sys/module/printk/parameters/ignore_loglevel. ihash_entries= [KNL] Set number of hash buckets for inode cache.
kernel/printk.c +3 -0
@@ -532,6 +532,9 @@ static int __init ignore_loglevel_setup(char *str) }early_param ("ignore_loglevel" , ignore_loglevel_setup); +module_param_named (ignore_loglevel, ignore_loglevel, bool,S_IRUGO |S_IWUSR ); +MODULE_PARM_DESC (ignore_loglevel,"ignore loglevel setting, to" +"print all kernel messages to the console." );/* * Write out chars from start to end - 1 inclusive
Signature · 1 line
1.7.1