summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMiod Vallat <miod@cvs.openbsd.org>2005-12-11 17:05:38 +0000
committerMiod Vallat <miod@cvs.openbsd.org>2005-12-11 17:05:38 +0000
commitdef4c3b2eeca342e0579fa637b52e2c8d0cc5135 (patch)
tree7f95548c0852b5eab7576d4e85eb637380808d02
parent8cb35d8bd45439e434e52f5221a2be0501c8e8a2 (diff)
On halt, wait for a keypress on the console and reboot; allows one to have
the BUG set to auto-boot and not lose the machine upon halting. Requested by deraadt@ and nick@ long ago.
-rw-r--r--sys/arch/mvme68k/mvme68k/machdep.c10
-rw-r--r--sys/arch/mvme88k/mvme88k/machdep.c9
2 files changed, 11 insertions, 8 deletions
diff --git a/sys/arch/mvme68k/mvme68k/machdep.c b/sys/arch/mvme68k/mvme68k/machdep.c
index 9fe6a20cbc8..8b620ab133a 100644
--- a/sys/arch/mvme68k/mvme68k/machdep.c
+++ b/sys/arch/mvme68k/mvme68k/machdep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: machdep.c,v 1.92 2005/11/24 22:43:19 miod Exp $ */
+/* $OpenBSD: machdep.c,v 1.93 2005/12/11 17:05:35 miod Exp $ */
/*
* Copyright (c) 1995 Theo de Raadt
@@ -635,10 +635,12 @@ haltsys:
doshutdownhooks();
if (howto & RB_HALT) {
- printf("halted\n\n");
- } else {
- doboot();
+ printf("System halted. Press any key to reboot...\n\n");
+ cngetc();
}
+
+ doboot();
+
for (;;);
/*NOTREACHED*/
}
diff --git a/sys/arch/mvme88k/mvme88k/machdep.c b/sys/arch/mvme88k/mvme88k/machdep.c
index 49f1cc7cb20..cff59985a8c 100644
--- a/sys/arch/mvme88k/mvme88k/machdep.c
+++ b/sys/arch/mvme88k/mvme88k/machdep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: machdep.c,v 1.173 2005/12/04 15:00:26 miod Exp $ */
+/* $OpenBSD: machdep.c,v 1.174 2005/12/11 17:05:37 miod Exp $ */
/*
* Copyright (c) 1998, 1999, 2000, 2001 Steve Murphree, Jr.
* Copyright (c) 1996 Nivas Madhur
@@ -611,11 +611,12 @@ haltsys:
doshutdownhooks();
if (howto & RB_HALT) {
- printf("halted\n\n");
- } else {
- doboot();
+ printf("System halted. Press any key to reboot...\n\n");
+ cngetc();
}
+ doboot();
+
for (;;);
/*NOTREACHED*/
}