Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 8 Oct 2021 06:11:21 GMT
From:      Kyle Evans <kevans@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org
Subject:   git: 314304cf228c - stable/12 - loader: Print autoboot countdown immediately, not at 9
Message-ID:  <202110080611.1986BLPS010167@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch stable/12 has been updated by kevans:

URL: https://cgit.FreeBSD.org/src/commit/?id=314304cf228ca34605e41d6521543753078d7156

commit 314304cf228ca34605e41d6521543753078d7156
Author:     Jessica Clarke <jrtc27@FreeBSD.org>
AuthorDate: 2020-12-14 00:46:24 +0000
Commit:     Kyle Evans <kevans@FreeBSD.org>
CommitDate: 2021-10-08 05:24:28 +0000

    loader: Print autoboot countdown immediately, not at 9
    
    For the first second otime and ntime are equal so no message gets
    printed. Instead we should print the countdown right from the start,
    although we do it at the end of the first iteration so that if a key has
    already been pressed then the message is suppressed.
    
    (cherry picked from commit c46f7610d4c5a57fdb2aac5fcbf66aa7124ec703)
---
 stand/common/boot.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/stand/common/boot.c b/stand/common/boot.c
index b1dbb61b404d..2103f6dc240c 100644
--- a/stand/common/boot.c
+++ b/stand/common/boot.c
@@ -202,8 +202,9 @@ autoboot(int timeout, char *prompt)
 	}
 
 	if (timeout >= 0) {
-		otime = time(NULL);
-		when = otime + timeout;	/* when to boot */
+		otime = -1;
+		ntime = time(NULL);
+		when = ntime + timeout;	/* when to boot */
 
 		yes = 0;
 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202110080611.1986BLPS010167>