Skip to content

Commit

Permalink
[pxe] Allow Escape to abort PXE menu selections
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
Michael Brown committed Feb 17, 2009
1 parent 06b5132 commit cff4191
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/usr/pxemenu.c
Expand Up @@ -247,7 +247,7 @@ static int pxe_menu_select ( struct pxe_menu *menu ) {
if ( ( key == CR ) || ( key == LF ) ) {
pxe_menu_draw_item ( menu, menu->selection, 1 );
break;
} else if ( key == CTRL_C ) {
} else if ( ( key == CTRL_C ) || ( key == ESC ) ) {
rc = -ECANCELED;
break;
} else if ( key == KEY_UP ) {
Expand Down Expand Up @@ -306,7 +306,7 @@ static int pxe_menu_prompt_and_select ( struct pxe_menu *menu ) {
/* Display menu */
printf ( "\n" );
return pxe_menu_select ( menu );
} else if ( key == CTRL_C ) {
} else if ( ( key == CTRL_C ) || ( key == ESC ) ) {
/* Abort */
rc = -ECANCELED;
break;
Expand Down

0 comments on commit cff4191

Please sign in to comment.