summaryrefslogtreecommitdiff
path: root/include/menu.h
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2023-01-06 08:52:24 -0600
committerTom Rini <trini@konsulko.com>2023-01-16 14:14:11 -0500
commitd0ca98dbd99c2534c9e96e4c226e52ab80f2248f (patch)
treeec90d07fc24388bde0ffb63d35da3f0cc5c77061 /include/menu.h
parent5712976b26f7865f348aba51c9fa367c456e1795 (diff)
downloadu-boot-d0ca98dbd99c2534c9e96e4c226e52ab80f2248f.tar.gz
u-boot-d0ca98dbd99c2534c9e96e4c226e52ab80f2248f.tar.bz2
u-boot-d0ca98dbd99c2534c9e96e4c226e52ab80f2248f.zip
menu: Update bootmenu_loop() to return the code
Use the return value to save having to pass around a pointer. This also resolves any ambiguity about what *key contains when the function is called. Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'include/menu.h')
-rw-r--r--include/menu.h11
1 files changed, 5 insertions, 6 deletions
diff --git a/include/menu.h b/include/menu.h
index 9f30a3c1ac..8b9b36214f 100644
--- a/include/menu.h
+++ b/include/menu.h
@@ -83,7 +83,10 @@ enum bootmenu_key bootmenu_autoboot_loop(struct bootmenu_data *menu, int *esc);
* character is recognised
*
* @menu: Menu being processed
- * @key: Returns the code for the key the user pressed:
+ * @esc: On input, a non-zero value indicates that an escape sequence has
+ * resulted in that many characters so far. On exit this is updated to the
+ * new number of characters
+ * Returns: code for the key the user pressed:
* enter: BKEY_SELECT
* Ctrl-C: BKEY_QUIT
* Up arrow: BKEY_UP
@@ -92,11 +95,7 @@ enum bootmenu_key bootmenu_autoboot_loop(struct bootmenu_data *menu, int *esc);
* Plus: BKEY_PLUS
* Minus: BKEY_MINUS
* Space: BKEY_SPACE
- * @esc: On input, a non-zero value indicates that an escape sequence has
- * resulted in that many characters so far. On exit this is updated to the
- * new number of characters
*/
-void bootmenu_loop(struct bootmenu_data *menu,
- enum bootmenu_key *key, int *esc);
+enum bootmenu_key bootmenu_loop(struct bootmenu_data *menu, int *esc);
#endif /* __MENU_H__ */