[Concept,15/24] bootctl: Respect the autoboot option

Message ID 20251018084117.1798704-16-sjg@u-boot.org
State New
Headers
Series bootctl: Expand bootctl to include a new UI |

Commit Message

Simon Glass Oct. 18, 2025, 8:41 a.m. UTC
  From: Simon Glass <sjg@chromium.org>

When autoboot is disabled, hide the prompt.

Signed-off-by: Simon Glass <sjg@chromium.org>
---

 boot/bootctl/simple_ui.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
  

Patch

diff --git a/boot/bootctl/simple_ui.c b/boot/bootctl/simple_ui.c
index 14c6de5bb1e..3ef00651c05 100644
--- a/boot/bootctl/simple_ui.c
+++ b/boot/bootctl/simple_ui.c
@@ -59,6 +59,7 @@  static int simple_ui_print(struct udevice *dev, const char *msg)
 static int simple_ui_show(struct udevice *dev)
 {
 	struct bc_ui_priv *upriv = dev_get_uclass_priv(dev);
+	struct logic_priv *lpriv = upriv->lpriv;
 	struct bootstd_priv *std;
 	struct scene *scn;
 	struct abuf *buf;
@@ -78,7 +79,7 @@  static int simple_ui_show(struct udevice *dev)
 	scene_id = ret;
 	scn = expo_lookup_scene_id(upriv->expo, scene_id);
 
-	scene_obj_set_hide(scn, OBJ_AUTOBOOT, false);
+	scene_obj_set_hide(scn, OBJ_AUTOBOOT, !lpriv->opt_autoboot);
 	ret = expo_edit_str(upriv->expo, STR_AUTOBOOT,
 			    &upriv->autoboot_template,
 			    &upriv->autoboot_str);