diff options
author | Michael Brown <mcb30@etherboot.org> | 2009-02-17 07:35:57 +0000 |
---|---|---|
committer | Michael Brown <mcb30@etherboot.org> | 2009-02-17 07:35:57 +0000 |
commit | cff419148c80012c135aea26977657e9629221dd (patch) | |
tree | ecc9fa9fa06ad0126feb9ed4a04e43a97056bf45 | |
parent | 06b5132fdcac6b79ccf2f97de658235b28610bd7 (diff) | |
download | ipxe-cff419148c80012c135aea26977657e9629221dd.zip ipxe-cff419148c80012c135aea26977657e9629221dd.tar.gz ipxe-cff419148c80012c135aea26977657e9629221dd.tar.bz2 |
[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.
-rw-r--r-- | src/usr/pxemenu.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/usr/pxemenu.c b/src/usr/pxemenu.c index 911d4e9..793cb62 100644 --- a/src/usr/pxemenu.c +++ b/src/usr/pxemenu.c @@ -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 ) { @@ -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; |