eficonfig: CTRL+S to save the boot order
The change boot order menu in eficonfig can have at most INT_MAX lines and it is troublesome to scroll down to the "Save" entry. This commit assigns CTRL+S to save the boot order. Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org> Acked-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
This commit is contained in:
parent
45f5319fa6
commit
88df36346c
3 changed files with 9 additions and 1 deletions
|
@ -28,7 +28,7 @@ const char *eficonfig_menu_desc =
|
||||||
static const char *eficonfig_change_boot_order_desc =
|
static const char *eficonfig_change_boot_order_desc =
|
||||||
" Press UP/DOWN to move, +/- to change orde\n"
|
" Press UP/DOWN to move, +/- to change orde\n"
|
||||||
" Press SPACE to activate or deactivate the entry\n"
|
" Press SPACE to activate or deactivate the entry\n"
|
||||||
" Select [Save] to complete, ESC to quit";
|
" CTRL+S to save, ESC to quit";
|
||||||
|
|
||||||
static struct efi_simple_text_output_protocol *cout;
|
static struct efi_simple_text_output_protocol *cout;
|
||||||
static int avail_row;
|
static int avail_row;
|
||||||
|
@ -1983,6 +1983,10 @@ char *eficonfig_choice_change_boot_order(void *data)
|
||||||
eficonfig_menu_down(efi_menu);
|
eficonfig_menu_down(efi_menu);
|
||||||
|
|
||||||
return NULL;
|
return NULL;
|
||||||
|
case BKEY_SAVE:
|
||||||
|
/* force to select "Save" entry */
|
||||||
|
efi_menu->active = efi_menu->count - 2;
|
||||||
|
fallthrough;
|
||||||
case BKEY_SELECT:
|
case BKEY_SELECT:
|
||||||
/* "Save" */
|
/* "Save" */
|
||||||
if (efi_menu->active == efi_menu->count - 2) {
|
if (efi_menu->active == efi_menu->count - 2) {
|
||||||
|
|
|
@ -503,6 +503,9 @@ enum bootmenu_key bootmenu_conv_key(int ichar)
|
||||||
case CTL_CH('n'):
|
case CTL_CH('n'):
|
||||||
key = BKEY_DOWN;
|
key = BKEY_DOWN;
|
||||||
break;
|
break;
|
||||||
|
case CTL_CH('s'):
|
||||||
|
key = BKEY_SAVE;
|
||||||
|
break;
|
||||||
case '+':
|
case '+':
|
||||||
key = BKEY_PLUS;
|
key = BKEY_PLUS;
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -53,6 +53,7 @@ enum bootmenu_key {
|
||||||
BKEY_PLUS,
|
BKEY_PLUS,
|
||||||
BKEY_MINUS,
|
BKEY_MINUS,
|
||||||
BKEY_SPACE,
|
BKEY_SPACE,
|
||||||
|
BKEY_SAVE,
|
||||||
|
|
||||||
BKEY_COUNT,
|
BKEY_COUNT,
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue