summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorSimon Glass <[email protected]>2025-05-02 08:46:29 -0600
committerSimon Glass <[email protected]>2025-05-30 09:49:32 +0100
commita4ede5e0aced904efb17f3a3d5fb2c7f3c622133 (patch)
tree86c5f297e69c94c778346e58f170e9933c9bc8f0 /include
parentda754e20c99a0e611b05c74f9e28daf9cdf1a199 (diff)
expo: Allow adding a single bootflow to a menu
Refactor bootflow_menu_add_all() to call a new bootflow_menu_add() to add each of its bootflows. Move the last_bootdev value into struct menu_priv to make this work. Signed-off-by: Simon Glass <[email protected]>
Diffstat (limited to 'include')
-rw-r--r--include/bootflow.h16
1 files changed, 16 insertions, 0 deletions
diff --git a/include/bootflow.h b/include/bootflow.h
index 994b38394e8..615fb97f4a4 100644
--- a/include/bootflow.h
+++ b/include/bootflow.h
@@ -15,6 +15,7 @@
struct bootstd_priv;
struct expo;
+struct scene;
enum {
BOOTFLOW_MAX_USED_DEVS = 16,
@@ -507,6 +508,21 @@ int bootflow_menu_new(struct expo **expp);
int bootflow_menu_add_all(struct expo *exp);
/**
+ * bootflow_menu_add() - Add a bootflow to a menu
+ *
+ * Adds a new bootflow to the end of a menu. The caller must be careful to pass
+ * seq=0 for the first bootflow added, 1 for the second, etc.
+ *
+ * @exp: Menu to update
+ * @bflow: Bootflow to add
+ * @seq: Sequence number of this bootflow (0 = first)
+ * @scnp: Returns a pointer to the scene
+ * Return 0 on success, -ve on error
+ */
+int bootflow_menu_add(struct expo *exp, struct bootflow *bflow, int seq,
+ struct scene **scnp);
+
+/**
* bootflow_menu_apply_theme() - Apply a theme to a bootmenu
*
* @exp: Expo to update