diff options
author | Simon Glass <sjg@chromium.org> | 2023-01-06 08:52:40 -0600 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2023-01-16 18:26:50 -0500 |
commit | 02d929bfb25af22171dbd100f38ffd8fa6bf6238 (patch) | |
tree | 5c608f527b5e0d813e61dfe42a20dcb69e9704cf /include | |
parent | fe93c14b4c62c47120bf95a79269fe94779c21f4 (diff) |
bootstd: Support creating a boot menu
Create an expo to handle the boot menu. For now this is quite simple, with
just a header, some menu items and a pointer to show the current one.
Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'include')
-rw-r--r-- | include/bootflow.h | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/include/bootflow.h b/include/bootflow.h index 8a07ab3019..e7a09568f1 100644 --- a/include/bootflow.h +++ b/include/bootflow.h @@ -9,6 +9,9 @@ #include <linux/list.h> +struct bootstd_priv; +struct expo; + /** * enum bootflow_state_t - states that a particular bootflow can be in * @@ -336,4 +339,24 @@ int bootflow_iter_uses_network(const struct bootflow_iter *iter); */ int bootflow_iter_uses_system(const struct bootflow_iter *iter); +/** + * bootflow_menu_new() - Create a new bootflow menu + * + * @expp: Returns the expo created + * Returns 0 on success, -ve on error + */ +int bootflow_menu_new(struct expo **expp); + +/** + * bootflow_menu_run() - Create and run a menu of available bootflows + * + * @std: Bootstd information + * @text_mode: Uses a text-based menu suitable for a serial port + * @bflowp: Returns chosen bootflow (set to NULL if nothing is chosen) + * @return 0 if an option was chosen, -EAGAIN if nothing was chosen, -ve on + * error + */ +int bootflow_menu_run(struct bootstd_priv *std, bool text_mode, + struct bootflow **bflowp); + #endif |