aboutsummaryrefslogtreecommitdiffstats
path: root/kernel
diff options
context:
space:
mode:
authorIngo Molnar <mingo@elte.hu>2006-12-06 23:40:51 -0500
committerLinus Torvalds <torvalds@woody.osdl.org>2006-12-07 11:39:47 -0500
commit792908225064b1d841a8990b9d1d1cfc4e0e5bb2 (patch)
tree3892ec82447727cf59b3cf5d37273b76d01b763c /kernel
parent70e4506765602cca047cfa31933836e354c61a63 (diff)
[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')
-rw-r--r--kernel/printk.c14
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)
333 } 333 }
334} 334}
335 335
336static int __read_mostly ignore_loglevel;
337
338int __init ignore_loglevel_setup(char *str)
339{
340 ignore_loglevel = 1;
341 printk(KERN_INFO "debug: ignoring loglevel setting.\n");
342
343 return 1;
344}
345
346__setup("ignore_loglevel", ignore_loglevel_setup);
347
336/* 348/*
337 * Write out chars from start to end - 1 inclusive 349 * Write out chars from start to end - 1 inclusive
338 */ 350 */
339static void _call_console_drivers(unsigned long start, 351static void _call_console_drivers(unsigned long start,
340 unsigned long end, int msg_log_level) 352 unsigned long end, int msg_log_level)
341{ 353{
342 if (msg_log_level < console_loglevel && 354 if ((msg_log_level < console_loglevel || ignore_loglevel) &&
343 console_drivers && start != end) { 355 console_drivers && start != end) {
344 if ((start & LOG_BUF_MASK) > (end & LOG_BUF_MASK)) { 356 if ((start & LOG_BUF_MASK) > (end & LOG_BUF_MASK)) {
345 /* wrapped write */ 357 /* wrapped write */