mirror of
https://github.com/u-boot/u-boot.git
synced 2025-05-08 19:11:53 +00:00
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>
This commit is contained in:
parent
5712976b26
commit
d0ca98dbd9
4 changed files with 24 additions and 23 deletions
|
@ -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__ */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue