git: 314304cf228c - stable/12 - loader: Print autoboot countdown immediately, not at 9
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Fri, 08 Oct 2021 06:11:21 UTC
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;