diff options
author | Tom Cosgrove <tom@cvs.openbsd.org> | 2004-03-10 23:02:55 +0000 |
---|---|---|
committer | Tom Cosgrove <tom@cvs.openbsd.org> | 2004-03-10 23:02:55 +0000 |
commit | 269e9b0ceb4a217d7841ca9a9f66e153e6d6e863 (patch) | |
tree | 8a958e6662d220297278df0c8b847dea06484b5f /sys/arch/amd64 | |
parent | c70330c0f96146989bd785f685bb0199742c1a40 (diff) |
Ensure that we obey a user's ddb> boot reboot command even if the system
is cold (during startup).
This adds RB_USERREQ to sys/reboot.h, uses it in the ddb commands, and
ensures that */*/machdep.c:boot() won't set RB_HALT when cold if this
flag is set.
ok deraadt@
Diffstat (limited to 'sys/arch/amd64')
-rw-r--r-- | sys/arch/amd64/amd64/machdep.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/sys/arch/amd64/amd64/machdep.c b/sys/arch/amd64/amd64/machdep.c index 8647733a6fb..5e83e689c60 100644 --- a/sys/arch/amd64/amd64/machdep.c +++ b/sys/arch/amd64/amd64/machdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: machdep.c,v 1.20 2004/03/09 23:06:38 deraadt Exp $ */ +/* $OpenBSD: machdep.c,v 1.21 2004/03/10 23:02:53 tom Exp $ */ /* $NetBSD: machdep.c,v 1.3 2003/05/07 22:58:18 fvdl Exp $ */ /*- @@ -843,7 +843,12 @@ boot(int howto) { if (cold) { - howto |= RB_HALT; + /* + * If the system is cold, just halt, unless the user + * explicitly asked for reboot. + */ + if ((howto & RB_USERREQ) == 0) + howto |= RB_HALT; goto haltsys; } |