diff options
author | Miod Vallat <miod@cvs.openbsd.org> | 2006-06-16 20:48:50 +0000 |
---|---|---|
committer | Miod Vallat <miod@cvs.openbsd.org> | 2006-06-16 20:48:50 +0000 |
commit | bc42f6d5434a45c77e45e75d9df3eb0f6e33348d (patch) | |
tree | 0142adba6b58d931e575d1e5788927cfab7b7ff4 /sys/arch | |
parent | 495cf41f6b059a37a297b431d6360c3454f2bac0 (diff) |
If we are configured for glass console but no keyboard is plugged, we run
with the dummy wscons cngetc() which immediately returns zero. Since
a cngetc() call is the only difference between halt and reboot, this caused
the former to behave as the later. Fix this by spinning until cngetc() returns
a non-zero value.
Diffstat (limited to 'sys/arch')
-rw-r--r-- | sys/arch/hp300/hp300/machdep.c | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/sys/arch/hp300/hp300/machdep.c b/sys/arch/hp300/hp300/machdep.c index 4bc5c4a2ca6..b8cc30817e7 100644 --- a/sys/arch/hp300/hp300/machdep.c +++ b/sys/arch/hp300/hp300/machdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: machdep.c,v 1.109 2006/06/07 22:02:00 miod Exp $ */ +/* $OpenBSD: machdep.c,v 1.110 2006/06/16 20:48:49 miod Exp $ */ /* $NetBSD: machdep.c,v 1.121 1999/03/26 23:41:29 mycroft Exp $ */ /* @@ -747,18 +747,10 @@ haltsys: /* Run any shutdown hooks. */ doshutdownhooks(); -#if defined(PANICWAIT) && !defined(DDB) - if ((howto & RB_HALT) == 0 && panicstr) { - printf("hit any key to reboot...\n"); - (void)cngetc(); - printf("\n"); - } -#endif - /* Finally, halt/reboot the system. */ if (howto & RB_HALT) { printf("System halted. Hit any key to reboot.\n\n"); - (void)cngetc(); + while (cngetc() == 0); } printf("rebooting...\n"); |