mirror of
https://xff.cz/git/u-boot/
synced 2025-09-01 16:52:14 +02:00
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>
This commit is contained in:
committed by
Tom Rini
parent
fdf0819afb
commit
5168d7a626
@@ -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);
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user