aboutsummaryrefslogtreecommitdiffstats
path: root/kernel
diff options
context:
space:
mode:
authorNick Andrew <nick@nick-andrew.net>2008-05-12 15:21:04 -0400
committerThomas Gleixner <tglx@linutronix.de>2008-05-24 17:15:19 -0400
commit091593080533a752ce66d12858d8c4105c8e1793 (patch)
treede8793133104a9a19bbba971d3bfb84408e4cdbb /kernel
parentac60ad7413ca8208094609a3b88ed9b1ed012fbc (diff)
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@nick-andrew.net> Signed-off-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'kernel')
-rw-r--r--kernel/printk.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/kernel/printk.c b/kernel/printk.c
index 98ca1b76277f..475fc22a2857 100644
--- a/kernel/printk.c
+++ b/kernel/printk.c
@@ -661,6 +661,7 @@ static char printk_buf[1024];
661asmlinkage int vprintk(const char *fmt, va_list args) 661asmlinkage int vprintk(const char *fmt, va_list args)
662{ 662{
663 int printed_len = 0; 663 int printed_len = 0;
664 int current_log_level = default_message_loglevel;
664 unsigned long flags; 665 unsigned long flags;
665 int this_cpu; 666 int this_cpu;
666 char *p; 667 char *p;
@@ -710,7 +711,6 @@ asmlinkage int vprintk(const char *fmt, va_list args)
710 */ 711 */
711 for (p = printk_buf; *p; p++) { 712 for (p = printk_buf; *p; p++) {
712 if (new_text_line) { 713 if (new_text_line) {
713 int current_log_level = default_message_loglevel;
714 /* If a token, set current_log_level and skip over */ 714 /* If a token, set current_log_level and skip over */
715 if (p[0] == '<' && p[1] >= '0' && p[1] <= '7' && 715 if (p[0] == '<' && p[1] >= '0' && p[1] <= '7' &&
716 p[2] == '>') { 716 p[2] == '>') {