diff options
author | 2003-05-19 08:18:25 +0000 | |
---|---|---|
committer | 2003-05-19 08:18:25 +0000 | |
commit | 3e3b4a79e9a22bc77e7cf2a5741ca37a3d40c750 (patch) | |
tree | f30c87d471830ce1d7fd7595d7e309b773e0492a | |
parent | Remove #ifdef'ed out unnecessary defines. (diff) | |
download | wireguard-openbsd-3e3b4a79e9a22bc77e7cf2a5741ca37a3d40c750.tar.xz wireguard-openbsd-3e3b4a79e9a22bc77e7cf2a5741ca37a3d40c750.zip |
allow md part to skip the interactive part (the first try around)
-rw-r--r-- | sys/stand/boot/boot.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/sys/stand/boot/boot.c b/sys/stand/boot/boot.c index cce2e862598..844f36f2439 100644 --- a/sys/stand/boot/boot.c +++ b/sys/stand/boot/boot.c @@ -1,4 +1,4 @@ -/* $OpenBSD: boot.c,v 1.25 2003/04/17 12:09:48 mickey Exp $ */ +/* $OpenBSD: boot.c,v 1.26 2003/05/19 08:18:25 mickey Exp $ */ /* * Copyright (c) 2003 Dale Rahn @@ -51,6 +51,7 @@ static const char *const kernels[] = { extern const char version[]; struct cmd_state cmd; +int bootprompt = 1; void boot(bootdev) @@ -72,13 +73,17 @@ boot(bootdev) cmd.timeout = 5; st = read_conf(); + if (!bootprompt) + sprintf(cmd.path, "%s:%s", cmd.bootdev, cmd.image); while (1) { - if (st <= 0) /* no boot.conf, or no boot cmd in there */ + /* no boot.conf, or no boot cmd in there */ + if (bootprompt && st <= 0) do { printf("boot> "); } while(!getcmd()); st = 0; + bootprompt = 1; /* allow reselect should we fail */ printf("booting %s: ", cmd.path); marks[MARK_START] = (u_long)cmd.addr; |