aboutsummaryrefslogtreecommitdiffstats
path: root/boot
diff options
context:
space:
mode:
authorWeijie Gao <weijie.gao@mediatek.com>2024-10-29 17:47:16 +0800
committerTom Rini <trini@konsulko.com>2024-11-04 16:41:38 -0600
commitccdd7948e22f21d2add8f51c4918a2c576dc5e91 (patch)
treea7b72bad51f44e7bbd2d58f96f44d63660d9f30e /boot
parentddac69885efaffc68a71c1a159dc2b3ff4b9fda3 (diff)
downloadu-boot-ccdd7948e22f21d2add8f51c4918a2c576dc5e91.tar.gz
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 <weijie.gao@mediatek.com> Reviewed-by: Daniel Golle <daniel@makrotopia.org> Tested-by: Daniel Golle <daniel@makrotopia.org>
Diffstat (limited to 'boot')
-rw-r--r--boot/pxe_utils.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/boot/pxe_utils.c b/boot/pxe_utils.c
index d6a4b2cb859..3ae17553c6d 100644
--- a/boot/pxe_utils.c
+++ b/boot/pxe_utils.c
@@ -1474,7 +1474,7 @@ static struct menu *pxe_menu_to_menu(struct pxe_menu *cfg)
* Create a menu and add items for all the labels.
*/
m = menu_create(cfg->title, DIV_ROUND_UP(cfg->timeout, 10),
- cfg->prompt, NULL, label_print, NULL, NULL);
+ cfg->prompt, NULL, label_print, NULL, NULL, NULL);
if (!m)
return NULL;