[PATCH 2/2] printk: Remember the message level for multi-line output

From: Nick Andrew
Date: Sun Apr 13 2008 - 07:54:39 EST


printk: Remember the message level for multi-line output

printk(KERN_ALERT "Danger Will Robinson!\nAlien Approaching!\n");

At present this will result in one message at ALERT level and one
at the current default message loglevel (e.g. WARNING). This is
non-intuitive.

Modify vprintk() to remember the message loglevel each time it
is specified and use it for subsequent lines of output which do
not specify one, within the same call to printk.

Signed-off-by: Nick Andrew <nick@xxxxxxxxxxxxxxx>
---

kernel/printk.c | 2 --
1 files changed, 0 insertions(+), 2 deletions(-)


diff --git a/kernel/printk.c b/kernel/printk.c
index bca9359..5c97eb1 100644
--- a/kernel/printk.c
+++ b/kernel/printk.c
@@ -716,8 +716,6 @@ asmlinkage int vprintk(const char *fmt, va_list args)
current_log_level = p[1] - '0';
p += 3;
printed_len -= 3;
- } else {
- current_log_level = default_message_loglevel;
}

/* Always output the token */

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/