aboutsummaryrefslogtreecommitdiff
path: root/include/menu.h
diff options
context:
space:
mode:
authorThirupathaiah Annapureddy <thiruan@linux.microsoft.com>2020-03-18 11:38:42 -0700
committerTom Rini <trini@konsulko.com>2020-05-07 09:01:42 -0400
commit5168d7a6264be30f82c1c074e43c24fcacbb4283 (patch)
treeb89bafeea8ed15b1403edf892964adaa5003255d /include/menu.h
parentfdf0819afb5b7a8757ba1b4fdfe14f3767ab7e87 (diff)
downloadu-boot-5168d7a6264be30f82c1c074e43c24fcacbb4283.zip
u-boot-5168d7a6264be30f82c1c074e43c24fcacbb4283.tar.gz
u-boot-5168d7a6264be30f82c1c074e43c24fcacbb4283.tar.bz2
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 <thiruan@linux.microsoft.com>
Diffstat (limited to 'include/menu.h')
-rw-r--r--include/menu.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/menu.h b/include/menu.h
index 2d227c2..9ab9b21 100644
--- a/include/menu.h
+++ b/include/menu.h
@@ -9,6 +9,7 @@
struct menu;
struct menu *menu_create(char *title, int timeout, int prompt,
+ void (*display_statusline)(struct menu *),
void (*item_data_print)(void *),
char *(*item_choice)(void *),
void *item_choice_data);
@@ -16,7 +17,6 @@ int menu_default_set(struct menu *m, char *item_key);
int menu_get_choice(struct menu *m, void **choice);
int menu_item_add(struct menu *m, char *item_key, void *item_data);
int menu_destroy(struct menu *m);
-void menu_display_statusline(struct menu *m);
int menu_default_choice(struct menu *m, void **choice);
/**