ret = bootflow_menu_add(exp, bflow, i, &scn);
if (ret)
return log_msg_ret("bao", ret);
-
}
ret = scene_arrange(scn);
return 0;
}
-int bootflow_menu_start(struct bootstd_priv *std, bool text_mode,
+int bootflow_menu_setup(struct bootstd_priv *std, bool text_mode,
struct expo **expp)
{
struct udevice *dev;
ret = bootflow_menu_new(&exp);
if (ret)
return log_msg_ret("bmn", ret);
- ret = bootflow_menu_add_all(exp);
- if (ret)
- return log_msg_ret("bma", ret);
if (ofnode_valid(std->theme)) {
ret = bootflow_menu_apply_theme(exp, std->theme);
if (text_mode)
expo_set_text_mode(exp, text_mode);
+ *expp = exp;
+
+ return 0;
+}
+
+int bootflow_menu_start(struct bootstd_priv *std, bool text_mode,
+ struct expo **expp)
+{
+ struct expo *exp;
+ int ret;
+
+ ret = bootflow_menu_setup(std, text_mode, &exp);
+ if (ret)
+ return log_msg_ret("bmd", ret);
+
+ ret = bootflow_menu_add_all(exp);
+ if (ret)
+ return log_msg_ret("bma", ret);
+
+ if (ofnode_valid(std->theme)) {
+ ret = expo_apply_theme(exp, std->theme);
+ if (ret)
+ return log_msg_ret("thm", ret);
+ }
+
ret = expo_calc_dims(exp);
if (ret)
return log_msg_ret("bmd", ret);
*/
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