mirror of
https://xff.cz/git/u-boot/
synced 2025-10-28 09:03:52 +01:00
bootmenu: factor out the user input handling
This commit moves the user input handling from cmd/bootmenu.c to common/menu.c to reuse it from other modules. Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org> Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
This commit is contained in:
committed by
Heinrich Schuchardt
parent
6ae494831d
commit
3ae6cf5400
@@ -35,4 +35,24 @@ int menu_default_choice(struct menu *m, void **choice);
|
||||
*/
|
||||
int menu_show(int bootdelay);
|
||||
|
||||
struct bootmenu_data {
|
||||
int delay; /* delay for autoboot */
|
||||
int active; /* active menu entry */
|
||||
int count; /* total count of menu entries */
|
||||
struct bootmenu_entry *first; /* first menu entry */
|
||||
};
|
||||
|
||||
enum bootmenu_key {
|
||||
KEY_NONE = 0,
|
||||
KEY_UP,
|
||||
KEY_DOWN,
|
||||
KEY_SELECT,
|
||||
KEY_QUIT,
|
||||
};
|
||||
|
||||
void bootmenu_autoboot_loop(struct bootmenu_data *menu,
|
||||
enum bootmenu_key *key, int *esc);
|
||||
void bootmenu_loop(struct bootmenu_data *menu,
|
||||
enum bootmenu_key *key, int *esc);
|
||||
|
||||
#endif /* __MENU_H__ */
|
||||
|
||||
Reference in New Issue
Block a user