Browse Source

[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>
tags/v1.20.1
Michael Brown 11 years ago
parent
commit
170d493bf3
1 changed files with 3 additions and 1 deletions
  1. 3
    1
      src/usr/autoboot.c

+ 3
- 1
src/usr/autoboot.c View File

35
 #include <ipxe/shell.h>
35
 #include <ipxe/shell.h>
36
 #include <ipxe/features.h>
36
 #include <ipxe/features.h>
37
 #include <ipxe/image.h>
37
 #include <ipxe/image.h>
38
+#include <ipxe/timer.h>
38
 #include <usr/ifmgmt.h>
39
 #include <usr/ifmgmt.h>
39
 #include <usr/route.h>
40
 #include <usr/route.h>
40
 #include <usr/dhcpmgmt.h>
41
 #include <usr/dhcpmgmt.h>
468
 	/* Prompt user */
469
 	/* Prompt user */
469
 	printf ( "\n" );
470
 	printf ( "\n" );
470
 	return ( prompt ( "Press Ctrl-B for the iPXE command line...",
471
 	return ( prompt ( "Press Ctrl-B for the iPXE command line...",
471
-			  ( BANNER_TIMEOUT * 100 ), CTRL_B ) == 0 );
472
+			  ( ( BANNER_TIMEOUT * TICKS_PER_SEC ) / 10 ),
473
+			  CTRL_B ) == 0 );
472
 }
474
 }
473
 
475
 
474
 /**
476
 /**

Loading…
Cancel
Save