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

Simon Glass sjg at chromium.org
Fri Sep 22 23:38:14 CEST 2023


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 at 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



More information about the U-Boot mailing list