[Concept,13/24] bootctl: Avoid hanging on failure

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

Commit Message

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

For now just drop to the cmdline so that the state can be examined. This
will aid debugging.

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

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

Patch

diff --git a/boot/bootctl/bootctl.c b/boot/bootctl/bootctl.c
index 9fa943222db..7155ff0a8f0 100644
--- a/boot/bootctl/bootctl.c
+++ b/boot/bootctl/bootctl.c
@@ -58,7 +58,8 @@  int bootctl_run(void)
 		ret = bc_logic_poll(logic);
 		if (ret) {
 			printf("logic err %dE\n", ret);
-			hang();
+			/* could hang here */
+			return ret;
 		}
 	} while (ret != -ESHUTDOWN);