Start countdown only _after_ the kernel was loaded. Not very fair otherwise.

This commit is contained in:
Daniel C. Sobral 2000-09-15 07:54:10 +00:00
parent c0329b1af3
commit 9f0c5de5f7
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=65881

View file

@ -175,10 +175,6 @@ autoboot(int timeout, char *prompt)
if (timeout == -1) /* all else fails */
timeout = 10;
otime = time(NULL);
when = otime + timeout; /* when to boot */
yes = 0;
kernelname = getenv("kernelname");
if (kernelname == NULL) {
argv[0] = NULL;
@ -190,6 +186,10 @@ autoboot(int timeout, char *prompt)
}
}
otime = time(NULL);
when = otime + timeout; /* when to boot */
yes = 0;
printf("%s\n", (prompt == NULL) ? "Hit [Enter] to boot immediately, or any other key for command prompt." : prompt);
for (;;) {