From c46f7610d4c5a57fdb2aac5fcbf66aa7124ec703 Mon Sep 17 00:00:00 2001 From: Jessica Clarke Date: Mon, 14 Dec 2020 00:46:24 +0000 Subject: [PATCH] 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. Reviewed by: imp Approved by: imp Differential Revision: https://reviews.freebsd.org/D26935 --- 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;