linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: "Maciej W. Rozycki" <macro@linux-mips.org>
To: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Mike Frysinger <vapier.adi@gmail.com>,
	Joe Perches <joe@perches.com>,
	linux-kernel@vger.kernel.org, blinux-list@redhat.com,
	cluster-devel@redhat.com, discuss@x86-64.org, jffs-dev@axis.com,
	linux-acpi@vger.kernel.org, linux-ide@vger.kernel.org,
	linux-mips@linux-mips.org, linux-mm@kvack.org,
	linux-mtd@lists.infradead.org, linux-scsi@vger.kernel.org,
	mpt_linux_developer@lsi.com, netdev@vger.kernel.org,
	osst-users@lists.sourceforge.net, parisc-linux@parisc-linux.org,
	tpmdd-devel@lists.sourceforge.net,
	uclinux-dist-devel@blackfin.uclinux.org
Subject: Re: [PATCH] Prefix each line of multiline printk(KERN_<level> "foo\nbar") with KERN_<level>
Date: Wed, 29 Aug 2007 12:22:41 +0100 (BST)	[thread overview]
Message-ID: <Pine.LNX.4.64N.0708291205020.26167@blysk.ds.pg.gda.pl> (raw)
In-Reply-To: <Pine.LNX.4.64.0708261305020.31149@anakin>

On Sun, 26 Aug 2007, Geert Uytterhoeven wrote:

> What I mean is that probably there used to be a printk() call starting with
> `\n'. Then someone added a `KERN_ERR' in front of it.

 I gather '\n' at the beginning is to assure the following line is output 
on a separate line rather than as a continuation of another one which may 
have been output without a trailing '\n'.  A situation where printk() is 
called with a string containing no trailing '\n' may be discouraged, but 
there are some more or less justified exceptions.  For example the SCSI 
disk spin-up code is one.

 Therefore it may be reasonable for more critical messages -- perhaps not 
ones at KERN_ERR, but certainly KERN_CRIT and higher ones -- that may 
potentially happen asynchronously to start with '\n'.  In this case a call 
would look like this:

	printk("\n" KERN_CRIT "The actual message.\n");

Of course based on "console_loglevel" and "default_message_level" the 
leading '\n' may still get swallowed from what gets printed to the console 
terminal, but in reality I do not think that poses a problem, as these 
both can be set by a system administrator according to the local policy.

  Maciej

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

      reply	other threads:[~2007-08-29 11:22 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-08-24 23:44 Joe Perches
2007-08-26  8:30 ` Geert Uytterhoeven
2007-08-26 10:54   ` Mike Frysinger
2007-08-26 11:06     ` Geert Uytterhoeven
2007-08-29 11:22       ` Maciej W. Rozycki [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Pine.LNX.4.64N.0708291205020.26167@blysk.ds.pg.gda.pl \
    --to=macro@linux-mips.org \
    --cc=blinux-list@redhat.com \
    --cc=cluster-devel@redhat.com \
    --cc=discuss@x86-64.org \
    --cc=geert@linux-m68k.org \
    --cc=jffs-dev@axis.com \
    --cc=joe@perches.com \
    --cc=linux-acpi@vger.kernel.org \
    --cc=linux-ide@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mips@linux-mips.org \
    --cc=linux-mm@kvack.org \
    --cc=linux-mtd@lists.infradead.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=mpt_linux_developer@lsi.com \
    --cc=netdev@vger.kernel.org \
    --cc=osst-users@lists.sourceforge.net \
    --cc=parisc-linux@parisc-linux.org \
    --cc=tpmdd-devel@lists.sourceforge.net \
    --cc=uclinux-dist-devel@blackfin.uclinux.org \
    --cc=vapier.adi@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox