From: Michael Brown Date: Tue, 5 Nov 2013 16:58:34 +0000 (+0000) Subject: [autoboot] Fix shell banner timeout X-Git-Tag: v1.20.1~1381 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=170d493bf322a715c929a194bfb680b32d8fdb23;p=thirdparty%2Fipxe.git [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 Signed-off-by: Michael Brown --- diff --git a/src/usr/autoboot.c b/src/usr/autoboot.c index 70f883a59..276fb3db8 100644 --- a/src/usr/autoboot.c +++ b/src/usr/autoboot.c @@ -35,6 +35,7 @@ FILE_LICENCE ( GPL2_OR_LATER ); #include #include #include +#include #include #include #include @@ -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 ); } /**