summaryrefslogtreecommitdiff
path: root/include/menu.h
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2019-07-20 20:51:26 -0600
committerTom Rini <trini@konsulko.com>2019-08-02 11:19:14 -0400
commit14b9df1b487552b8e2f1274ac7ea8e3652694dcf (patch)
treeb1cfa38fb057f7d6ac1b39efe02121146cef98ab /include/menu.h
parentcf9803a60b27da7958f6abc9b42e58f3783f5880 (diff)
autoboot: Add comments for menu_show()
Add comments for this function. Also remove the #ifdef around it so that it can be called from 'if (IS_ENABLED(...))'. Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'include/menu.h')
-rw-r--r--include/menu.h17
1 files changed, 15 insertions, 2 deletions
diff --git a/include/menu.h b/include/menu.h
index 8fd7b0a1f0..2d227c20bd 100644
--- a/include/menu.h
+++ b/include/menu.h
@@ -19,7 +19,20 @@ 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_AUTOBOOT_MENU_SHOW)
+/**
+ * menu_show() Show a boot menu
+ *
+ * This shows a menu and lets the user select an option. The menu is defined by
+ * environment variables (see README.bootmenu).
+ *
+ * This function doesn't normally return, but if the users requests the command
+ * problem, it will.
+ *
+ * @bootdelay: Delay to wait before running the default menu option (0 to run
+ * the entry immediately)
+ * @return If it returns, it always returns -1 to indicate that the boot should
+ * be aborted and the command prompt should be provided
+ */
int menu_show(int bootdelay);
-#endif
+
#endif /* __MENU_H__ */