diff options
author | Michael Shalayeff <mickey@cvs.openbsd.org> | 2003-05-19 08:18:26 +0000 |
---|---|---|
committer | Michael Shalayeff <mickey@cvs.openbsd.org> | 2003-05-19 08:18:26 +0000 |
commit | 0377ee23457b8c721a3f315cab7db14ea358efdd (patch) | |
tree | 7c08be727460bf40be64960c73802774de992a68 /sys | |
parent | cfaf0f34b6baaafef1235aeb907463cd5e0bf460 (diff) |
allow md part to skip the interactive part (the first try around)
Diffstat (limited to 'sys')
-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; |