diff options
author | Michael Brown | 2011-03-07 20:33:50 +0100 |
---|---|---|
committer | Michael Brown | 2011-03-07 20:37:30 +0100 |
commit | 9d633bdc7113f0050a0b35df5245dee2b819a273 (patch) | |
tree | 637c56a790d95598026387b05ed086dbc606470c /src/hci | |
parent | [console] Avoid timer wraparound problems in getchar_timeout() (diff) | |
download | ipxe-9d633bdc7113f0050a0b35df5245dee2b819a273.tar.gz ipxe-9d633bdc7113f0050a0b35df5245dee2b819a273.tar.xz ipxe-9d633bdc7113f0050a0b35df5245dee2b819a273.zip |
[console] Add a timeout parameter to getkey()
Signed-off-by: Michael Brown <mcb30@ipxe.org>
Diffstat (limited to 'src/hci')
-rw-r--r-- | src/hci/readline.c | 2 | ||||
-rw-r--r-- | src/hci/shell_banner.c | 2 | ||||
-rw-r--r-- | src/hci/tui/login_ui.c | 2 | ||||
-rw-r--r-- | src/hci/tui/settings_ui.c | 2 |
4 files changed, 4 insertions, 4 deletions
diff --git a/src/hci/readline.c b/src/hci/readline.c index ee252a19..6a7af9db 100644 --- a/src/hci/readline.c +++ b/src/hci/readline.c @@ -98,7 +98,7 @@ char * readline ( const char *prompt ) { buf[0] = '\0'; while ( 1 ) { - key = edit_string ( &string, getkey() ); + key = edit_string ( &string, getkey ( 0 ) ); sync_console ( &string ); switch ( key ) { case CR: diff --git a/src/hci/shell_banner.c b/src/hci/shell_banner.c index dbfa8edf..6f225d78 100644 --- a/src/hci/shell_banner.c +++ b/src/hci/shell_banner.c @@ -47,7 +47,7 @@ int shell_banner ( void ) { printf ( "\nPress Ctrl-B for the iPXE command line..." ); /* Wait for key */ - key = getchar_timeout ( ( BANNER_TIMEOUT * TICKS_PER_SEC ) / 10 ); + key = getkey ( ( BANNER_TIMEOUT * TICKS_PER_SEC ) / 10 ); /* Clear the "Press Ctrl-B" line */ printf ( "\r \r" ); diff --git a/src/hci/tui/login_ui.c b/src/hci/tui/login_ui.c index bcfd09cb..954bde50 100644 --- a/src/hci/tui/login_ui.c +++ b/src/hci/tui/login_ui.c @@ -88,7 +88,7 @@ int login_ui ( void ) { draw_editbox ( current_box ); - key = getkey(); + key = getkey ( 0 ); switch ( key ) { case KEY_DOWN: current_box = &password_box; diff --git a/src/hci/tui/settings_ui.c b/src/hci/tui/settings_ui.c index b8fe207f..176fbd3e 100644 --- a/src/hci/tui/settings_ui.c +++ b/src/hci/tui/settings_ui.c @@ -401,7 +401,7 @@ static int main_loop ( struct settings *settings ) { draw_setting ( &widget ); color_set ( CPAIR_NORMAL, NULL ); - key = getkey(); + key = getkey ( 0 ); if ( widget.editing ) { key = edit_setting ( &widget, key ); switch ( key ) { |