summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sys/stand/boot/boot.c9
-rw-r--r--sys/stand/boot/cmd.c5
2 files changed, 9 insertions, 5 deletions
diff --git a/sys/stand/boot/boot.c b/sys/stand/boot/boot.c
index 947c728dd39..cd1930afae3 100644
--- a/sys/stand/boot/boot.c
+++ b/sys/stand/boot/boot.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: boot.c,v 1.31 2004/06/24 17:10:17 tom Exp $ */
+/* $OpenBSD: boot.c,v 1.32 2004/06/24 22:32:26 tom Exp $ */
/*
* Copyright (c) 2003 Dale Rahn
@@ -100,9 +100,10 @@ boot(dev_t bootdev)
strlcpy(cmd.image, bootfile, sizeof(cmd.image));
printf(" failed(%d). will try %s\n", errno, bootfile);
- if (try < 2)
- cmd.timeout++;
- else {
+ if (try < 2) {
+ if (cmd.timeout > 0)
+ cmd.timeout++;
+ } else {
if (cmd.timeout)
printf("Turning timeout off.\n");
cmd.timeout = 0;
diff --git a/sys/stand/boot/cmd.c b/sys/stand/boot/cmd.c
index fe778ccdf07..44555471267 100644
--- a/sys/stand/boot/cmd.c
+++ b/sys/stand/boot/cmd.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: cmd.c,v 1.54 2004/06/24 22:10:18 tom Exp $ */
+/* $OpenBSD: cmd.c,v 1.55 2004/06/24 22:32:26 tom Exp $ */
/*
* Copyright (c) 1997-1999 Michael Shalayeff
@@ -259,6 +259,9 @@ readline(char *buf, size_t n, int to)
while (!cnischar())
;
+ /* User has typed something. Turn off timeouts. */
+ cmd.timeout = 0;
+
while (1) {
switch ((ch = getchar())) {
case CTRL('u'):