expo: Split setting up the menu from adding items

Some callers may wish to add items later as they are discovered. Split
the setup code into its own function, to permit this.

Signed-off-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
Simon Glass
2025-05-02 08:46:56 -06:00
parent 06a9d88e4d
commit f769735f88
2 changed files with 41 additions and 5 deletions

View File

@@ -655,9 +655,24 @@ struct bootflow_img *bootflow_img_add(struct bootflow *bflow, const char *fname,
*/
int bootflow_get_seq(const struct bootflow *bflow);
/**
* bootflow_menu_setup() - Set up a menu for bootflows
*
* Set up the expo, initially empty
*
* @std: bootstd information
* @text_mode: true to show the menu in text mode, false to use video display
* @expp: Returns the expo created, on success
* Return: 0 if OK, -ve on error
*/
int bootflow_menu_setup(struct bootstd_priv *std, bool text_mode,
struct expo **expp);
/**
* bootflow_menu_start() - Start up a menu for bootflows
*
* Set up the expo and add items
*
* @std: bootstd information
* @text_mode: true to show the menu in text mode, false to use video display
* @expp: Returns the expo created, on success