xen/panic: Tweak string formatting
PATCH 1/1 xen/panic: Tweak string formatting
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.
xen/arch/x86/cpu/mcheck/mce.c +1 -1
@@ -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:
xen/arch/x86/io_apic.c +2 -2
@@ -122,7 +122,7 @@ static void add_pin_to_irq(unsigned intif (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" ); }/*
xen/arch/x86/mm.c +1 -1
@@ -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 ); }
Quoted 3 lines
Quoted 1 line
Quoted 1 line · Andrew Cooper
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
Quoted 48 lines
Signed-off-by Andrew Cooper <[email protected]>diff -r
7babbd46586b-ra20f79411a5fxen/arch/x86/cpu/mcheck/mce.cxen/arch/x86/cpu/mcheck/mce.c +1
-1@@ -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-ra20f79411a5fxen/arch/x86/io_apic.cxen/arch/x86/io_apic.c +2
-2@@ -122,7 +122,7 @@ static void add_pin_to_irq(unsigned intif (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 -r7babbd46586b-ra20f79411a5fxen/arch/x86/mm.cxen/arch/x86/mm.c +1
-1@@ -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 ); }
Quoted 9 lines · Jan Beulich
Quoted 3 lines
Quoted 1 line
Quoted 1 line · Andrew Cooper
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 thepanic()logic itself appending one. After all we know that the message must be a complete one - other than withprintk(), there obviously is no chance of issuing a continuation message subsequently.
This would be fine with me.
-- Keir
Quoted 53 lines
Jan
Quoted 48 lines
Signed-off-by Andrew Cooper <[email protected]>diff -r
7babbd46586b-ra20f79411a5fxen/arch/x86/cpu/mcheck/mce.cxen/arch/x86/cpu/mcheck/mce.c +1
-1@@ -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-ra20f79411a5fxen/arch/x86/io_apic.cxen/arch/x86/io_apic.c +2
-2@@ -122,7 +122,7 @@ static void add_pin_to_irq(unsigned intif (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 -r7babbd46586b-ra20f79411a5fxen/arch/x86/mm.cxen/arch/x86/mm.c +1
-1@@ -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 ); }