diff options
author | Simon Glass <sjg@chromium.org> | 2023-01-06 17:52:22 +0300 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2023-01-16 22:14:11 +0300 |
commit | 2da4a15e7e947d2d304ec1ba392556c3e0393e13 (patch) | |
tree | cd3975d33b1e41d69bb5627aecaba805c2f0edf9 /cmd | |
parent | ee6c7eb46f3835a027e8e7278418683ff7a32031 (diff) | |
download | u-boot-2da4a15e7e947d2d304ec1ba392556c3e0393e13.tar.xz |
menu: Rename KEY_... to BKEY_...
This enum values conflict with linux/input.h so rename them.
Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'cmd')
-rw-r--r-- | cmd/bootmenu.c | 10 | ||||
-rw-r--r-- | cmd/eficonfig.c | 26 |
2 files changed, 18 insertions, 18 deletions
diff --git a/cmd/bootmenu.c b/cmd/bootmenu.c index e5a10f5d5c..1a14e8a190 100644 --- a/cmd/bootmenu.c +++ b/cmd/bootmenu.c @@ -86,7 +86,7 @@ static char *bootmenu_choice_entry(void *data) { struct bootmenu_data *menu = data; struct bootmenu_entry *iter; - enum bootmenu_key key = KEY_NONE; + enum bootmenu_key key = BKEY_NONE; int esc = 0; int i; @@ -100,22 +100,22 @@ static char *bootmenu_choice_entry(void *data) } switch (key) { - case KEY_UP: + case BKEY_UP: if (menu->active > 0) --menu->active; /* no menu key selected, regenerate menu */ return NULL; - case KEY_DOWN: + case BKEY_DOWN: if (menu->active < menu->count - 1) ++menu->active; /* no menu key selected, regenerate menu */ return NULL; - case KEY_SELECT: + case BKEY_SELECT: iter = menu->first; for (i = 0; i < menu->active; ++i) iter = iter->next; return iter->key; - case KEY_QUIT: + case BKEY_QUIT: /* Quit by choosing the last entry - U-Boot console */ iter = menu->first; while (iter->next) diff --git a/cmd/eficonfig.c b/cmd/eficonfig.c index ce7175a566..8f246bc271 100644 --- a/cmd/eficonfig.c +++ b/cmd/eficonfig.c @@ -187,31 +187,31 @@ static char *eficonfig_choice_entry(void *data) int esc = 0; struct list_head *pos, *n; struct eficonfig_entry *entry; - enum bootmenu_key key = KEY_NONE; + enum bootmenu_key key = BKEY_NONE; struct efimenu *efi_menu = data; while (1) { bootmenu_loop((struct bootmenu_data *)efi_menu, &key, &esc); switch (key) { - case KEY_UP: + case BKEY_UP: if (efi_menu->active > 0) --efi_menu->active; /* no menu key selected, regenerate menu */ return NULL; - case KEY_DOWN: + case BKEY_DOWN: if (efi_menu->active < efi_menu->count - 1) ++efi_menu->active; /* no menu key selected, regenerate menu */ return NULL; - case KEY_SELECT: + case BKEY_SELECT: list_for_each_safe(pos, n, &efi_menu->list) { entry = list_entry(pos, struct eficonfig_entry, list); if (entry->num == efi_menu->active) return entry->key; } break; - case KEY_QUIT: + case BKEY_QUIT: /* Quit by choosing the last entry */ entry = list_last_entry(&efi_menu->list, struct eficonfig_entry, list); return entry->key; @@ -1864,14 +1864,14 @@ static efi_status_t eficonfig_choice_change_boot_order(struct efimenu *efi_menu) { int esc = 0; struct list_head *pos, *n; - enum bootmenu_key key = KEY_NONE; + enum bootmenu_key key = BKEY_NONE; struct eficonfig_entry *entry, *tmp; while (1) { bootmenu_loop(NULL, &key, &esc); switch (key) { - case KEY_PLUS: + case BKEY_PLUS: if (efi_menu->active > 0) { list_for_each_safe(pos, n, &efi_menu->list) { entry = list_entry(pos, struct eficonfig_entry, list); @@ -1885,11 +1885,11 @@ static efi_status_t eficonfig_choice_change_boot_order(struct efimenu *efi_menu) list_add(&tmp->list, &entry->list); } fallthrough; - case KEY_UP: + case BKEY_UP: if (efi_menu->active > 0) --efi_menu->active; return EFI_NOT_READY; - case KEY_MINUS: + case BKEY_MINUS: if (efi_menu->active < efi_menu->count - 3) { list_for_each_safe(pos, n, &efi_menu->list) { entry = list_entry(pos, struct eficonfig_entry, list); @@ -1905,11 +1905,11 @@ static efi_status_t eficonfig_choice_change_boot_order(struct efimenu *efi_menu) ++efi_menu->active; } return EFI_NOT_READY; - case KEY_DOWN: + case BKEY_DOWN: if (efi_menu->active < efi_menu->count - 1) ++efi_menu->active; return EFI_NOT_READY; - case KEY_SELECT: + case BKEY_SELECT: /* "Save" */ if (efi_menu->active == efi_menu->count - 2) return EFI_SUCCESS; @@ -1919,7 +1919,7 @@ static efi_status_t eficonfig_choice_change_boot_order(struct efimenu *efi_menu) return EFI_ABORTED; break; - case KEY_SPACE: + case BKEY_SPACE: if (efi_menu->active < efi_menu->count - 2) { list_for_each_safe(pos, n, &efi_menu->list) { entry = list_entry(pos, struct eficonfig_entry, list); @@ -1932,7 +1932,7 @@ static efi_status_t eficonfig_choice_change_boot_order(struct efimenu *efi_menu) } } break; - case KEY_QUIT: + case BKEY_QUIT: return EFI_ABORTED; default: /* Pressed key is not valid, no need to regenerate the menu */ |