summaryrefslogtreecommitdiffstats
path: root/src/usr
diff options
context:
space:
mode:
authorMichael Brown2011-03-07 20:33:50 +0100
committerMichael Brown2011-03-07 20:37:30 +0100
commit9d633bdc7113f0050a0b35df5245dee2b819a273 (patch)
tree637c56a790d95598026387b05ed086dbc606470c /src/usr
parent[console] Avoid timer wraparound problems in getchar_timeout() (diff)
downloadipxe-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/usr')
-rw-r--r--src/usr/pxemenu.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/src/usr/pxemenu.c b/src/usr/pxemenu.c
index a9ea1f04..b3105162 100644
--- a/src/usr/pxemenu.c
+++ b/src/usr/pxemenu.c
@@ -30,7 +30,6 @@ FILE_LICENCE ( GPL2_OR_LATER );
#include <ipxe/dhcp.h>
#include <ipxe/keys.h>
#include <ipxe/timer.h>
-#include <ipxe/process.h>
#include <ipxe/uri.h>
#include <usr/dhcpmgmt.h>
#include <usr/autoboot.h>
@@ -239,9 +238,7 @@ static int pxe_menu_select ( struct pxe_menu *menu ) {
pxe_menu_draw_item ( menu, menu->selection, 1 );
/* Wait for keyboard input */
- while ( ! iskey() )
- step();
- key = getkey();
+ key = getkey ( 0 );
/* Unhighlight currently selected item */
pxe_menu_draw_item ( menu, menu->selection, 0 );
@@ -304,7 +301,7 @@ static int pxe_menu_prompt_and_select ( struct pxe_menu *menu ) {
if ( ! len )
len = printf ( " (%d)", menu->timeout );
if ( iskey() ) {
- key = getkey();
+ key = getkey ( 0 );
if ( key == KEY_F8 ) {
/* Display menu */
printf ( "\n" );