]> git.ipfire.org Git - thirdparty/ipxe.git/commitdiff
[autoboot] Fix shell banner timeout
authorMichael Brown <mcb30@ipxe.org>
Tue, 5 Nov 2013 16:58:34 +0000 (16:58 +0000)
committerMichael Brown <mcb30@ipxe.org>
Tue, 5 Nov 2013 17:09:30 +0000 (17:09 +0000)
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>
src/usr/autoboot.c

index 70f883a598fbc4c41508e4a21366daa2f79523aa..276fb3db8321e15b9e09d6646783d52fa2960ec2 100644 (file)
@@ -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 );
 }
 
 /**