Checking the default menu item and obtaining its data can
be useful in custom menu code. Export menu_default_choice()
function which serves this purpose.
Signed-off-by: Anatolij Gustschin <agust@denx.de>
* Set *choice to point to the default item's data, if any default item was
* set, and returns 1. If no default item was set, returns -ENOENT.
*/
-static inline int menu_default_choice(struct menu *m, void **choice)
+int menu_default_choice(struct menu *m, void **choice)
{
if (m->default_item) {
*choice = m->default_item->data;
*/
int menu_default_set(struct menu *m, char *item_key);
+/*
+ * menu_default_choice() - Set *choice to point to the default item's data
+ */
+int menu_default_choice(struct menu *m, void **choice);
+
/*
* menu_get_choice() - Returns the user's selected menu entry, or the
* default if the menu is set to not prompt or the timeout expires.
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);
#if defined(CONFIG_MENU_SHOW)
int menu_show(int bootdelay);