diff options
| author | Weijie Gao <[email protected]> | 2024-10-29 17:47:16 +0800 |
|---|---|---|
| committer | Tom Rini <[email protected]> | 2024-11-04 16:41:38 -0600 |
| commit | ccdd7948e22f21d2add8f51c4918a2c576dc5e91 (patch) | |
| tree | a7b72bad51f44e7bbd2d58f96f44d63660d9f30e /cmd | |
| parent | ddac69885efaffc68a71c1a159dc2b3ff4b9fda3 (diff) | |
menu: add support to check if menu needs to be reprinted
This patch adds a new callback named need_reprint for menu.
The need_reprint will be called before printing the menu. If the
callback exists and returns FALSE, menu printing will be canceled.
This is very useful if the menu was not changed. It can save time
for serial-based menu to handle more input data.
Signed-off-by: Weijie Gao <[email protected]>
Reviewed-by: Daniel Golle <[email protected]>
Tested-by: Daniel Golle <[email protected]>
Diffstat (limited to 'cmd')
| -rw-r--r-- | cmd/bootmenu.c | 2 | ||||
| -rw-r--r-- | cmd/eficonfig.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/cmd/bootmenu.c b/cmd/bootmenu.c index 977a04b7d76..c99605f3398 100644 --- a/cmd/bootmenu.c +++ b/cmd/bootmenu.c @@ -506,7 +506,7 @@ static enum bootmenu_ret bootmenu_show(int delay) menu = menu_create(NULL, bootmenu->delay, 1, menu_display_statusline, bootmenu_print_entry, bootmenu_choice_entry, - bootmenu); + NULL, bootmenu); if (!menu) { bootmenu_destroy(bootmenu); return BOOTMENU_RET_FAIL; diff --git a/cmd/eficonfig.c b/cmd/eficonfig.c index 029180250f0..e08b6ba4a5d 100644 --- a/cmd/eficonfig.c +++ b/cmd/eficonfig.c @@ -443,7 +443,7 @@ efi_status_t eficonfig_process_common(struct efimenu *efi_menu, efi_menu->menu_desc = menu_desc; menu = menu_create(NULL, 0, 1, display_statusline, item_data_print, - item_choice, efi_menu); + item_choice, NULL, efi_menu); if (!menu) return EFI_INVALID_PARAMETER; |
