mirror of
https://github.com/ipxe/ipxe
synced 2025-12-21 20:40:25 +03:00
[console] Add a timeout parameter to getkey()
Signed-off-by: Michael Brown <mcb30@ipxe.org>
This commit is contained in:
@@ -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:
|
||||
|
||||
@@ -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" );
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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 ) {
|
||||
|
||||
Reference in New Issue
Block a user