[U-Boot] [PATCH v2] cmd: efi_loader: Return CMD_RET_USAGE in case of not enough arguments

Bin Meng bmeng.cn at gmail.com
Sat Aug 13 13:02:06 CEST 2016


When typing 'bootefi' from U-Boot shell, nothing outputs. Like other
commands, return CMD_RET_USAGE so that it can print help message.

Signed-off-by: Bin Meng <bmeng.cn at gmail.com>
Reviewed-by: Alexander Graf <agraf at suse.de>

---

Changes in v2:
- Rebase against origin/master instead of dm/uefi-working

 cmd/bootefi.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/cmd/bootefi.c b/cmd/bootefi.c
index b52ba9c..21fe42c 100644
--- a/cmd/bootefi.c
+++ b/cmd/bootefi.c
@@ -226,7 +226,7 @@ static int do_bootefi(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
 	int r = 0;
 
 	if (argc < 2)
-		return 1;
+		return CMD_RET_USAGE;
 	saddr = argv[1];
 
 	addr = simple_strtoul(saddr, NULL, 16);
-- 
2.9.2



More information about the U-Boot mailing list