summaryrefslogtreecommitdiffstats
path: root/sys/kern/kern_shutdown.c
diff options
context:
space:
mode:
authorfsmp <fsmp@FreeBSD.org>1997-05-24 18:35:44 +0000
committerfsmp <fsmp@FreeBSD.org>1997-05-24 18:35:44 +0000
commiteee5a4f49678fff413ac2da33b481f325a696dfd (patch)
treecdcab538799cec87fcf6d7e14905ee5b306ca2fd /sys/kern/kern_shutdown.c
parent81067cb46e8543e07d85f87008d4ccacf1eabee6 (diff)
downloadFreeBSD-src-eee5a4f49678fff413ac2da33b481f325a696dfd.zip
FreeBSD-src-eee5a4f49678fff413ac2da33b481f325a696dfd.tar.gz
Move the printing of "cpu#%d" to AFTER the general panic argument string.
When a panic occurs early in the SMP boot process 'cpunumber()' hangs, causing the panic string to be lost. Now the system appears to hang in 'breakpoint()', but at least the user sees the panic string before the hang.
Diffstat (limited to 'sys/kern/kern_shutdown.c')
-rw-r--r--sys/kern/kern_shutdown.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/sys/kern/kern_shutdown.c b/sys/kern/kern_shutdown.c
index e445959..f424e1d 100644
--- a/sys/kern/kern_shutdown.c
+++ b/sys/kern/kern_shutdown.c
@@ -36,7 +36,7 @@
* SUCH DAMAGE.
*
* @(#)kern_shutdown.c 8.3 (Berkeley) 1/21/94
- * $Id: kern_shutdown.c,v 1.13 1997/02/22 09:39:10 peter Exp $
+ * $Id: kern_shutdown.c,v 1.14 1997/04/26 11:46:14 peter Exp $
*/
#include "opt_ddb.h"
@@ -376,15 +376,14 @@ panic(const char *fmt, ...)
else
panicstr = fmt;
-#ifdef SMP
- printf("panic (cpu#%d): ", cpunumber());
-#else
printf("panic: ");
-#endif
va_start(ap, fmt);
vprintf(fmt, ap);
va_end(ap);
printf("\n");
+#ifdef SMP
+ printf(" cpu#%d\n", cpunumber());
+#endif
#if defined(DDB)
if (debugger_on_panic)
OpenPOWER on IntegriCloud