aboutsummaryrefslogtreecommitdiff
path: root/sys/kern
diff options
context:
space:
mode:
authorJulian Elischer <julian@FreeBSD.org>1996-10-31 00:57:28 +0000
committerJulian Elischer <julian@FreeBSD.org>1996-10-31 00:57:28 +0000
commitd13d3630fd5734d5e10aa2d9c03366ab2a6d6f18 (patch)
tree1e75a2d6fa7195b51d21c1203fbd585a2d0de004 /sys/kern
parent7860637efdd2d8d4c597b8dcef496b2eec9db52d (diff)
downloadsrc-d13d3630fd5734d5e10aa2d9c03366ab2a6d6f18.tar.gz
src-d13d3630fd5734d5e10aa2d9c03366ab2a6d6f18.zip
Further improved version of hadling a HALT when there is no console.
Notes
Notes: svn path=/head/; revision=19274
Diffstat (limited to 'sys/kern')
-rw-r--r--sys/kern/kern_shutdown.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/sys/kern/kern_shutdown.c b/sys/kern/kern_shutdown.c
index 40d1d7403cd7..11e395b8e957 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.8 1996/09/14 04:31:01 bde Exp $
+ * $Id: kern_shutdown.c,v 1.9 1996/10/30 21:40:22 julian Exp $
*/
#include "opt_ddb.h"
@@ -229,7 +229,13 @@ boot(howto)
printf("\n");
printf("The operating system has halted.\n");
printf("Please press any key to reboot.\n\n");
- while (cngetc() == -1); /* no console, halt means STOP HERE */
+ switch (cngetc()) {
+ case -1: /* No console, just die */
+ cpu_halt();
+ /* NOTREACHED */
+ default:
+ break;
+ }
} else {
if (howto & RB_DUMP) {
if (!cold) {