summaryrefslogtreecommitdiffstats
path: root/sys/kern/kern_shutdown.c
diff options
context:
space:
mode:
authorps <ps@FreeBSD.org>2001-03-28 01:37:29 +0000
committerps <ps@FreeBSD.org>2001-03-28 01:37:29 +0000
commit2f970352f7b2a33caad161f95721021750494718 (patch)
treea909572f72c677436899f7f02cab7d613a6045be /sys/kern/kern_shutdown.c
parentbffff76146178f4d1b6bbc49ac09587cfa9748cc (diff)
downloadFreeBSD-src-2f970352f7b2a33caad161f95721021750494718.zip
FreeBSD-src-2f970352f7b2a33caad161f95721021750494718.tar.gz
Last commit was broken.. It always prints '[CTRL-C to abort]'.
Move duplicate code for printing the status of the dump and checking for abort into a separate function. Pointy hat to: me
Diffstat (limited to 'sys/kern/kern_shutdown.c')
-rw-r--r--sys/kern/kern_shutdown.c21
1 files changed, 21 insertions, 0 deletions
diff --git a/sys/kern/kern_shutdown.c b/sys/kern/kern_shutdown.c
index 637d01c..ad79fdc 100644
--- a/sys/kern/kern_shutdown.c
+++ b/sys/kern/kern_shutdown.c
@@ -527,6 +527,27 @@ dumpsys(void)
}
}
+int
+dumpstatus(vm_offset_t addr, long count)
+{
+ int c;
+
+ if (addr % (1024 * 1024) == 0) {
+#ifdef HW_WDOG
+ if (wdog_tickler)
+ (*wdog_tickler)();
+#endif
+ printf("%ld ", count / (1024 * 1024));
+ }
+
+ if ((c = cncheckc()) == 0x03)
+ return -1;
+ else if (c != -1)
+ printf("[CTRL-C to abort] ");
+
+ return 0;
+}
+
/*
* 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
OpenPOWER on IntegriCloud