summaryrefslogtreecommitdiffstats
path: root/sys/kern/kern_shutdown.c
diff options
context:
space:
mode:
authorpeter <peter@FreeBSD.org>2001-09-05 23:51:06 +0000
committerpeter <peter@FreeBSD.org>2001-09-05 23:51:06 +0000
commit7681feaabca71c52b4f4da03de3bda4d8e5731ff (patch)
treee36228b89b7ef4ac9269d52f13e07b9e41189947 /sys/kern/kern_shutdown.c
parent9a81106528bd971d72ef9758a85e7f53e1447596 (diff)
downloadFreeBSD-src-7681feaabca71c52b4f4da03de3bda4d8e5731ff.zip
FreeBSD-src-7681feaabca71c52b4f4da03de3bda4d8e5731ff.tar.gz
Sigh. Dig up text from a signature in a 1994 Usenet post I made and redo
the ..uhh... ``console test'' to avoid another 50 emails about GPL issues.
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 fe3f1ed..02eeceb 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);
OpenPOWER on IntegriCloud