From mboxrd@z Thu Jan 1 00:00:00 1970 From: Keir Fraser Subject: Re: [PATCH] xen/panic: Tweak string formatting Date: Wed, 20 Mar 2013 09:43:42 +0000 Message-ID: References: <5149838402000078000C70AE@nat28.tlf.novell.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <5149838402000078000C70AE@nat28.tlf.novell.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Jan Beulich , Andrew Cooper Cc: xen-devel@lists.xen.org List-Id: xen-devel@lists.xenproject.org On 20/03/2013 08:38, "Jan Beulich" wrote: >>>> On 20.03.13 at 00:55, Andrew Cooper wrote: >> A few calls to panic() miss a newline in the format string, causing the lower >> line of *******'s to start immediately instead of on the next line. > > I would find it more sensible for the format string passed to panic() > to never include a newline, with the panic() logic itself appending > one. After all we know that the message must be a complete one - > other than with printk(), there obviously is no chance of issuing a > continuation message subsequently. This would be fine with me. -- Keir > Jan > >> Signed-off-by: Andrew Cooper >> >> diff -r 7babbd46586b -r a20f79411a5f xen/arch/x86/cpu/mcheck/mce.c >> --- a/xen/arch/x86/cpu/mcheck/mce.c >> +++ b/xen/arch/x86/cpu/mcheck/mce.c >> @@ -1536,7 +1536,7 @@ void mc_panic(char *s) >> " The processor has reported a hardware error which cannot\n" >> " be recovered from. Xen will now reboot the machine.\n"); >> mc_panic_dump(); >> - panic("HARDWARE ERROR"); >> + panic("HARDWARE ERROR\n"); >> } >> >> /* Machine Check owner judge algorithm: >> diff -r 7babbd46586b -r a20f79411a5f xen/arch/x86/io_apic.c >> --- a/xen/arch/x86/io_apic.c >> +++ b/xen/arch/x86/io_apic.c >> @@ -122,7 +122,7 @@ static void add_pin_to_irq(unsigned int >> >> if (entry->pin != -1) { >> if (irq_2_pin_free_entry >= PIN_MAP_SIZE) >> - panic("io_apic.c: whoops"); >> + panic("io_apic.c: whoops\n"); >> entry->next = irq_2_pin_free_entry; >> entry = irq_2_pin + entry->next; >> irq_2_pin_free_entry = entry->next; >> @@ -1959,7 +1959,7 @@ static void __init check_timer(void) >> } >> printk(" failed :(.\n"); >> panic("IO-APIC + timer doesn't work! Boot with apic_verbosity=debug " >> - "and send a report. Then try booting with the 'noapic' option"); >> + "and send a report. Then try booting with the 'noapic' >> option\n"); >> } >> >> /* >> diff -r 7babbd46586b -r a20f79411a5f xen/arch/x86/mm.c >> --- a/xen/arch/x86/mm.c >> +++ b/xen/arch/x86/mm.c >> @@ -204,7 +204,7 @@ static void __init init_frametable_chunk >> mfn = alloc_boot_pages(step, step); >> } while ( !mfn && (step >>= PAGETABLE_ORDER) ); >> if ( !mfn ) >> - panic("Not enough memory for frame table"); >> + panic("Not enough memory for frame table\n"); >> map_pages_to_xen(s, mfn, step, PAGE_HYPERVISOR); >> } >> > > >