diff options
author | Ingo Molnar | 2006-12-07 05:40:51 +0100 |
---|---|---|
committer | Linus Torvalds | 2006-12-07 17:39:47 +0100 |
commit | 792908225064b1d841a8990b9d1d1cfc4e0e5bb2 (patch) | |
tree | 3892ec82447727cf59b3cf5d37273b76d01b763c /kernel/printk.c | |
parent | [PATCH] lockdep: register_lock_class() fix (diff) | |
download | kernel-qcow2-linux-792908225064b1d841a8990b9d1d1cfc4e0e5bb2.tar.gz kernel-qcow2-linux-792908225064b1d841a8990b9d1d1cfc4e0e5bb2.tar.xz kernel-qcow2-linux-792908225064b1d841a8990b9d1d1cfc4e0e5bb2.zip |
[PATCH] add ignore_loglevel boot option
Sometimes the kernel prints something interesting while userspace bootup
keeps messages turned off via loglevel. Enable the printing of /all/
kernel messages via the "ignore_loglevel" boot option. Off by default.
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'kernel/printk.c')
-rw-r--r-- | kernel/printk.c | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/kernel/printk.c b/kernel/printk.c index c3d90a58e4c5..185bb45eacf7 100644 --- a/kernel/printk.c +++ b/kernel/printk.c @@ -333,13 +333,25 @@ static void __call_console_drivers(unsigned long start, unsigned long end) } } +static int __read_mostly ignore_loglevel; + +int __init ignore_loglevel_setup(char *str) +{ + ignore_loglevel = 1; + printk(KERN_INFO "debug: ignoring loglevel setting.\n"); + + return 1; +} + +__setup("ignore_loglevel", ignore_loglevel_setup); + /* * Write out chars from start to end - 1 inclusive */ static void _call_console_drivers(unsigned long start, unsigned long end, int msg_log_level) { - if (msg_log_level < console_loglevel && + if ((msg_log_level < console_loglevel || ignore_loglevel) && console_drivers && start != end) { if ((start & LOG_BUF_MASK) > (end & LOG_BUF_MASK)) { /* wrapped write */ |