[console] Add a timeout parameter to getkey()

Signed-off-by: Michael Brown <mcb30@ipxe.org>
This commit is contained in:
Michael Brown
2011-03-07 19:33:50 +00:00
parent 2969a8567f
commit 9d633bdc71
7 changed files with 13 additions and 16 deletions

View File

@@ -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" );