From: Michael Brown Date: Thu, 24 Jul 2008 19:00:43 +0000 (+0100) Subject: [cmdline] Minor tidy-ups to shell_banner.c X-Git-Tag: v0.9.4~74 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=764e2cc68c683c4fe4119099d2618871f1224e08;p=thirdparty%2Fipxe.git [cmdline] Minor tidy-ups to shell_banner.c --- diff --git a/src/hci/shell_banner.c b/src/hci/shell_banner.c index f96f2a504..3271c4835 100644 --- a/src/hci/shell_banner.c +++ b/src/hci/shell_banner.c @@ -20,6 +20,7 @@ #include #include #include +#include #include /** @file @@ -34,22 +35,21 @@ * @ret enter_shell User wants to enter shell */ int shell_banner ( void ) { - int wait_count = 0; int enter_shell = 0; + int wait_count; int key; printf ( "\nPress Ctrl-B for the gPXE command line..." ); /* Wait for key */ - while ( wait_count < BANNER_TIMEOUT ) { + for ( wait_count = 0 ; wait_count < BANNER_TIMEOUT ; wait_count++ ) { if ( iskey() ) { key = getchar(); - if ( key == 0x02 /* Ctrl-B */ ) + if ( key == CTRL_B ) enter_shell = 1; break; } mdelay(100); - wait_count++; } /* Clear the "Press Ctrl-B" line */