summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Brown2008-07-24 21:00:43 +0200
committerMichael Brown2008-07-24 21:00:43 +0200
commit764e2cc68c683c4fe4119099d2618871f1224e08 (patch)
tree241426d3c19c77b054062aedeab9fe86972ab83e
parent[cmdline] Added configurable shell banner timeout (diff)
downloadipxe-764e2cc68c683c4fe4119099d2618871f1224e08.tar.gz
ipxe-764e2cc68c683c4fe4119099d2618871f1224e08.tar.xz
ipxe-764e2cc68c683c4fe4119099d2618871f1224e08.zip
[cmdline] Minor tidy-ups to shell_banner.c
-rw-r--r--src/hci/shell_banner.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/hci/shell_banner.c b/src/hci/shell_banner.c
index f96f2a50..3271c483 100644
--- a/src/hci/shell_banner.c
+++ b/src/hci/shell_banner.c
@@ -20,6 +20,7 @@
#include <console.h>
#include <unistd.h>
#include <config/general.h>
+#include <gpxe/keys.h>
#include <gpxe/shell_banner.h>
/** @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 */