lkml.org 
[lkml]   [2008]   [Apr]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 2/2] printk: Remember the message level for multi-line output

* Nick Andrew <nick@nick-andrew.net> wrote:

> 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.

i've applied this too for testing.

but multi-line strings are a bit unclean i think: each message line
should have its separate printk.

will your patch leave the behavior of multiple calls to printk alone?
I.e. if i do:

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

then we'll still get a KERN_ALERT plus a default printk, right? In that
case my earlier observation about this patch is moot and i guess it's
fine to do this.

Ingo


\
 
 \ /
  Last update: 2008-04-14 10:07    [W:0.111 / U:0.076 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site