public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Dave Jones <davej@redhat.com>
To: Andi Kleen <ak@suse.de>
Cc: Linux Kernel <linux-kernel@vger.kernel.org>
Subject: Re: Split multi-line printk in oops output.
Date: Mon, 11 Sep 2006 02:07:55 -0400	[thread overview]
Message-ID: <20060911060755.GA8271@redhat.com> (raw)
In-Reply-To: <200609110744.15450.ak@suse.de>

On Mon, Sep 11, 2006 at 07:44:15AM +0200, Andi Kleen wrote:
 > 
 > >  	print_modules();
 > > -	printk(KERN_EMERG "CPU:    %d\nEIP:    %04x:[<%08lx>]    %s VLI\n"
 > > -			"EFLAGS: %08lx   (%s %.*s) \n",
 > > -		smp_processor_id(), 0xffff & regs->xcs, regs->eip,
 > > -		print_tainted(), regs->eflags, system_utsname.release,
 > > +	printk(KERN_EMERG "CPU:    %d\n", smp_processor_id());
 > > +	printk(KERN_EMERG "EIP:    %04x:[<%08lx>]    %s VLI\n",
 > > +		0xffff & regs->xcs, regs->eip, print_tainted());
 > > +	printk(KERN_EMERG "EFLAGS: %08lx   (%s %.*s)\n",
 > 
 > Still only using a single printk would be slightly safer

Signed-off-by: Dave Jones <davej@redhat.com>

diff --git a/arch/i386/kernel/traps.c b/arch/i386/kernel/traps.c
index 7e9edaf..b30fc9e 100644
--- a/arch/i386/kernel/traps.c
+++ b/arch/i386/kernel/traps.c
@@ -291,8 +291,9 @@ void show_registers(struct pt_regs *regs
 		ss = regs->xss & 0xffff;
 	}
 	print_modules();
-	printk(KERN_EMERG "CPU:    %d\nEIP:    %04x:[<%08lx>]    %s VLI\n"
-			"EFLAGS: %08lx   (%s %.*s) \n",
+	printk(KERN_EMERG "CPU:    %d\n"
+		KERN_EMERG "EIP:    %04x:[<%08lx>]    %s VLI\n"
+		KERN_EMERG "EFLAGS: %08lx   (%s %.*s)\n",
 		smp_processor_id(), 0xffff & regs->xcs, regs->eip,
 		print_tainted(), regs->eflags, system_utsname.release,
 		(int)strcspn(system_utsname.version, " "),


-- 
http://www.codemonkey.org.uk

  reply	other threads:[~2006-09-11  6:08 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-09-11  3:07 Split multi-line printk in oops output Dave Jones
2006-09-11  5:44 ` Andi Kleen
2006-09-11  6:07   ` Dave Jones [this message]
2006-09-11 20:24     ` Andi Kleen

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=20060911060755.GA8271@redhat.com \
    --to=davej@redhat.com \
    --cc=ak@suse.de \
    --cc=linux-kernel@vger.kernel.org \
    /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