[PATCH v2 2/4] bootstd: Add a return code to bootflow menu

Simon Glass
2023-09-22T21:38:43Z

Return an error when the user does not select an OS, so we know whether
to boot or not.

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

Changes in v2:
- Add new patch to add a return code to bootflow menu

cmd/bootflow.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/cmd/bootflow.c b/cmd/bootflow.c
index 300ad3aaa76..dbc47961a76 100644
--- a/cmd/bootflow.c
+++ b/cmd/bootflow.c
@@ -459,10 +459,10 @@ static int do_bootflow_menu(struct cmd_tbl *cmdtp, int flag, int argc,
if (ret) {
if (ret == -EAGAIN)
printf("Nothing chosen\n");
- else {
+ else
printf("Menu failed (err=%d)\n", ret);
- return CMD_RET_FAILURE;
- }
+
+ return CMD_RET_FAILURE;
}

printf("Selected: %s\n", bflow->os_name ? bflow->os_name : bflow->name);
--
2.42.0.515.g380fc7ccd1-goog