Bladeren bron

[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 jaren geleden
bovenliggende
commit
170d493bf3
1 gewijzigde bestanden met toevoegingen van 3 en 1 verwijderingen
  1. 3
    1
      src/usr/autoboot.c

+ 3
- 1
src/usr/autoboot.c Bestand weergeven

@@ -35,6 +35,7 @@ FILE_LICENCE ( GPL2_OR_LATER );
35 35
 #include <ipxe/shell.h>
36 36
 #include <ipxe/features.h>
37 37
 #include <ipxe/image.h>
38
+#include <ipxe/timer.h>
38 39
 #include <usr/ifmgmt.h>
39 40
 #include <usr/route.h>
40 41
 #include <usr/dhcpmgmt.h>
@@ -468,7 +469,8 @@ static int shell_banner ( void ) {
468 469
 	/* Prompt user */
469 470
 	printf ( "\n" );
470 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
 /**

Laden…
Annuleren
Opslaan