From 5168d7a6264be30f82c1c074e43c24fcacbb4283 Mon Sep 17 00:00:00 2001 From: Thirupathaiah Annapureddy Date: Wed, 18 Mar 2020 11:38:42 -0700 Subject: menu: add support for client defined statusline function Currently displaying status line is done in a weak function menu_display_statusline(). bootmenu.c overrides the weak default function. It calls menu_default_choice() and interprets the data as struct bootmenu_entry. pxe boot also uses common menu code for pxe menus. If there is a system that enables both bootmenu and pxe, menu_display_statusline() defined in bootmenu.c will be called and it will interpret struct pxe_label as struct bootmenu_entry. This leads to data aborts and pxe menu corruptions. This patch adds support for client defined statusline function to resolve the above bug. Signed-off-by: Thirupathaiah Annapureddy --- cmd/pxe_utils.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'cmd/pxe_utils.c') diff --git a/cmd/pxe_utils.c b/cmd/pxe_utils.c index 53af04d7dc..c244bfb10d 100644 --- a/cmd/pxe_utils.c +++ b/cmd/pxe_utils.c @@ -1237,7 +1237,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, label_print, NULL, NULL); + cfg->prompt, NULL, label_print, NULL, NULL); if (!m) return NULL; -- cgit v1.2.1