summaryrefslogtreecommitdiff
path: root/sys/kern/kern_shutdown.c
diff options
context:
space:
mode:
authorPeter Wemm <peter@FreeBSD.org>2001-09-05 23:51:06 +0000
committerPeter Wemm <peter@FreeBSD.org>2001-09-05 23:51:06 +0000
commitfc8b64e494ee5f76c7f4ed461f11fa159ac8d813 (patch)
treee36228b89b7ef4ac9269d52f13e07b9e41189947 /sys/kern/kern_shutdown.c
parent214bfc97590f6f7ecf5d3698507109ea9432f496 (diff)
Notes
Diffstat (limited to 'sys/kern/kern_shutdown.c')
-rw-r--r--sys/kern/kern_shutdown.c17
1 files changed, 12 insertions, 5 deletions
diff --git a/sys/kern/kern_shutdown.c b/sys/kern/kern_shutdown.c
index fe3f1edd7fe9..02eecebbe568 100644
--- a/sys/kern/kern_shutdown.c
+++ b/sys/kern/kern_shutdown.c
@@ -563,6 +563,14 @@ dumpstatus(vm_offset_t addr, long count)
static u_int panic_cpu = NOCPU;
#endif
+/* This had probably better not go into a release. */
+static const char *face[4] = {
+ "\\|/ ____ \\|/",
+ "\"@'/ .. \\`@\"",
+ "/_| \\__/ |_\\",
+ " \\__U_/ "
+};
+
/*
* Panic is called on unresolvable fatal errors. It prints "panic: mesg",
* and then reboots. If we are called twice, then we avoid trying to sync
@@ -573,7 +581,7 @@ static u_int panic_cpu = NOCPU;
void
panic(const char *fmt, ...)
{
- int bootopt;
+ int bootopt, i, offset;
#if defined(DDB) && defined(RESTARTABLE_PANICS)
int holding_giant = 0;
#endif
@@ -613,10 +621,9 @@ panic(const char *fmt, ...)
panicstr = fmt;
/* Test that the console is still working. */
- printf(" \\|/ ____ \\|/\n"
- " \"@'/ .. \\`@\"\n"
- " /_| \\__/ |_\\\n"
- " \\__U_/\n");
+ offset = (60 + strlen(face[0])) / 2;
+ for (i = 0; i < 4; i++)
+ printf("%*s\n", offset, face[i]);
va_start(ap, fmt);
(void)vsnprintf(buf, sizeof(buf), fmt, ap);