summaryrefslogtreecommitdiffstats
path: root/src/usr
diff options
context:
space:
mode:
authorMichael Brown2013-11-05 17:58:34 +0100
committerMichael Brown2013-11-05 18:09:30 +0100
commit170d493bf322a715c929a194bfb680b32d8fdb23 (patch)
tree8058a451e9e662bc5d16af24d617dec3e0c4b586 /src/usr
parent[cmdline] Rewrite "sync" command to use monojob_wait() (diff)
downloadipxe-170d493bf322a715c929a194bfb680b32d8fdb23.tar.gz
ipxe-170d493bf322a715c929a194bfb680b32d8fdb23.tar.xz
ipxe-170d493bf322a715c929a194bfb680b32d8fdb23.zip
[autoboot] Fix shell banner timeout
Commit 5e1fa5c ("[parseopt] Add parse_timeout()") introduced a regression causing the shell banner timeout value (calculated in milliseconds) to be treated as a timer tick count, resulting in a timeout of approximately two minutes rather than the intended two seconds. Reported-by: Christian Hesse <list@eworm.de> Signed-off-by: Michael Brown <mcb30@ipxe.org>
Diffstat (limited to 'src/usr')
-rw-r--r--src/usr/autoboot.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/usr/autoboot.c b/src/usr/autoboot.c
index 70f883a5..276fb3db 100644
--- a/src/usr/autoboot.c
+++ b/src/usr/autoboot.c
@@ -35,6 +35,7 @@ FILE_LICENCE ( GPL2_OR_LATER );
#include <ipxe/shell.h>
#include <ipxe/features.h>
#include <ipxe/image.h>
+#include <ipxe/timer.h>
#include <usr/ifmgmt.h>
#include <usr/route.h>
#include <usr/dhcpmgmt.h>
@@ -468,7 +469,8 @@ static int shell_banner ( void ) {
/* Prompt user */
printf ( "\n" );
return ( prompt ( "Press Ctrl-B for the iPXE command line...",
- ( BANNER_TIMEOUT * 100 ), CTRL_B ) == 0 );
+ ( ( BANNER_TIMEOUT * TICKS_PER_SEC ) / 10 ),
+ CTRL_B ) == 0 );
}
/**