diff options
| author | Simon Glass <[email protected]> | 2023-01-06 08:52:23 -0600 |
|---|---|---|
| committer | Tom Rini <[email protected]> | 2023-01-16 14:14:11 -0500 |
| commit | 5712976b26f7865f348aba51c9fa367c456e1795 (patch) | |
| tree | db46234be425f7f86318957feac2896f8bdc19ec /include | |
| parent | 2da4a15e7e947d2d304ec1ba392556c3e0393e13 (diff) | |
menu: Update bootmenu_autoboot_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 <[email protected]>
Diffstat (limited to 'include')
| -rw-r--r-- | include/menu.h | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/include/menu.h b/include/menu.h index 29b457921e9..9f30a3c1acd 100644 --- a/include/menu.h +++ b/include/menu.h @@ -65,14 +65,13 @@ enum bootmenu_key { * indicating that the current option should be chosen. * * @menu: Menu being processed - * @key: Returns the code for the key the user pressed: + * @esc: Set to 1 if the escape key is pressed, otherwise not updated + * Returns: code for the key the user pressed: * enter: KEY_SELECT * Ctrl-C: KEY_QUIT * anything else: KEY_NONE - * @esc: Set to 1 if the escape key is pressed, otherwise not updated */ -void bootmenu_autoboot_loop(struct bootmenu_data *menu, - enum bootmenu_key *key, int *esc); +enum bootmenu_key bootmenu_autoboot_loop(struct bootmenu_data *menu, int *esc); /** * bootmenu_loop() - handle waiting for a keypress when autoboot is disabled |
