mirror of
https://github.com/ipxe/ipxe
synced 2026-02-01 07:26:44 +03:00
[pxe] Allow Escape to abort PXE menu selections
Other vendor PXE stacks tend to allow the Escape key to be used to abort menu selection. Allow Escape (as well as Ctrl-C) to abort selection.
This commit is contained in:
@@ -247,7 +247,7 @@ static int pxe_menu_select ( struct pxe_menu *menu ) {
|
|||||||
if ( ( key == CR ) || ( key == LF ) ) {
|
if ( ( key == CR ) || ( key == LF ) ) {
|
||||||
pxe_menu_draw_item ( menu, menu->selection, 1 );
|
pxe_menu_draw_item ( menu, menu->selection, 1 );
|
||||||
break;
|
break;
|
||||||
} else if ( key == CTRL_C ) {
|
} else if ( ( key == CTRL_C ) || ( key == ESC ) ) {
|
||||||
rc = -ECANCELED;
|
rc = -ECANCELED;
|
||||||
break;
|
break;
|
||||||
} else if ( key == KEY_UP ) {
|
} else if ( key == KEY_UP ) {
|
||||||
@@ -306,7 +306,7 @@ static int pxe_menu_prompt_and_select ( struct pxe_menu *menu ) {
|
|||||||
/* Display menu */
|
/* Display menu */
|
||||||
printf ( "\n" );
|
printf ( "\n" );
|
||||||
return pxe_menu_select ( menu );
|
return pxe_menu_select ( menu );
|
||||||
} else if ( key == CTRL_C ) {
|
} else if ( ( key == CTRL_C ) || ( key == ESC ) ) {
|
||||||
/* Abort */
|
/* Abort */
|
||||||
rc = -ECANCELED;
|
rc = -ECANCELED;
|
||||||
break;
|
break;
|
||||||
|
|||||||
Reference in New Issue
Block a user