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
This commit is contained in:
parent
0066de1c4b
commit
c46f7610d4
@ -202,8 +202,9 @@ autoboot(int timeout, char *prompt)
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (timeout >= 0) {
|
if (timeout >= 0) {
|
||||||
otime = time(NULL);
|
otime = -1;
|
||||||
when = otime + timeout; /* when to boot */
|
ntime = time(NULL);
|
||||||
|
when = ntime + timeout; /* when to boot */
|
||||||
|
|
||||||
yes = 0;
|
yes = 0;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user