[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <alpine.LFD.2.01.0907021039320.4830@localhost.localdomain>
Date: Thu, 2 Jul 2009 10:42:51 -0700 (PDT)
From: Linus Torvalds <torvalds@...ux-foundation.org>
To: Joe Perches <joe@...ches.com>
cc: lkml@...ethan.org, Yinghai Lu <yinghai@...nel.org>,
Ingo Molnar <mingo@...e.hu>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: printk regression?
On Thu, 2 Jul 2009, Joe Perches wrote:
>
> Before some changes to the printk code, that used to
> be the only way to get a single printk call with multiple
> line output to have a KERN_<level> on all output lines.
>
> ie: printk(KERN_INFO "Line 1\n" KERN_INFO "Line 2\n");
>
> That style doesn't show up in the grep I posted because most
> of them look like:
>
> printk(KERN_INFO "Line 1\n"
> KERN_INFO "Line 2\n");
>
> An example: here's a bit of kernel/module.c:
>
> printk(KERN_WARNING "%s: '%s'->init suspiciously returned %d, "
> "it should follow 0/-E convention\n"
> KERN_WARNING "%s: loading module anyway...\n",
Yeah. Today, the way you're supposed to do that is simply
printk(KERN_WARNING
"%s: '%s'->init suspiciously returned %d, it should follow 0/-E convention\n"
"%s: loading module anyway...\n",
...
because the KERN_WARNING will cover the whole multi-line printk.
And if you want multiple _different_ loglevels (which is crazy - if you
really want this, then you should look at your walls and double-check that
they are nice and softly padded), you need to split it up into multiple
printk's.
Linus
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists