* [PATCH] xen/panic: Tweak string formatting
@ 2013-03-19 23:55 Andrew Cooper
2013-03-20 8:38 ` Jan Beulich
0 siblings, 1 reply; 3+ messages in thread
From: Andrew Cooper @ 2013-03-19 23:55 UTC (permalink / raw)
To: xen-devel; +Cc: Keir Fraser, Jan Beulich
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.
Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
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);
}
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] xen/panic: Tweak string formatting
2013-03-19 23:55 [PATCH] xen/panic: Tweak string formatting Andrew Cooper
@ 2013-03-20 8:38 ` Jan Beulich
2013-03-20 9:43 ` Keir Fraser
0 siblings, 1 reply; 3+ messages in thread
From: Jan Beulich @ 2013-03-20 8:38 UTC (permalink / raw)
To: Andrew Cooper; +Cc: Keir Fraser, xen-devel
>>> On 20.03.13 at 00:55, Andrew Cooper <andrew.cooper3@citrix.com> 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.
Jan
> Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
>
> 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);
> }
>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] xen/panic: Tweak string formatting
2013-03-20 8:38 ` Jan Beulich
@ 2013-03-20 9:43 ` Keir Fraser
0 siblings, 0 replies; 3+ messages in thread
From: Keir Fraser @ 2013-03-20 9:43 UTC (permalink / raw)
To: Jan Beulich, Andrew Cooper; +Cc: xen-devel
On 20/03/2013 08:38, "Jan Beulich" <JBeulich@suse.com> wrote:
>>>> On 20.03.13 at 00:55, Andrew Cooper <andrew.cooper3@citrix.com> 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 <andrew.cooper3@citrix.com>
>>
>> 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);
>> }
>>
>
>
>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2013-03-20 9:43 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-03-19 23:55 [PATCH] xen/panic: Tweak string formatting Andrew Cooper
2013-03-20 8:38 ` Jan Beulich
2013-03-20 9:43 ` Keir Fraser
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).