[U-Boot] [PATCH 1/2] menu: Added support to use user defined functions

Marek Vasut marex at denx.de
Sun Jun 3 11:59:16 CEST 2012


Dear Pali Rohár,

Please CC proper custodians in order to get reviews next time.

[...]

> --- a/include/menu.h
> +++ b/include/menu.h
> @@ -21,12 +21,14 @@
>  struct menu;
> 
>  struct menu *menu_create(char *title, int timeout, int prompt,
> -				void (*item_data_print)(void *));
> +				void (*item_data_print)(void *),
> +				char *(*item_data_choice)(void *),

Where is this item_data_choice() used?

> +				void *menu_data);
>  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);
> +void menu_display_statusline(void *menu_data);
> 
>  #if defined(CONFIG_MENU_SHOW)
>  int menu_show(int bootdelay);

Best regards,
Marek Vasut


More information about the U-Boot mailing list