Skip to contentSkip to conversation

cmd: efi_loader: Return CMD_RET_USAGE in case of not enough arguments

PATCH Superseded Bin Meng 2 participants 2 messages Aug 12, 2016

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore

Bin Meng

author
#0 lore raw

PATCH 1/1 cmd: efi_loader: Return CMD_RET_USAGE in case of not enough arguments

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

---

 cmd/bootefi.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
cmd/bootefi.c +1 -1
index ecf9968..ccd2126 100644
@@ -228,7 +228,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;
 #ifdef CONFIG_CMD_BOOTEFI_HELLO
 	if (!strcmp(argv[1], "hello")) {
 		addr = CONFIG_SYS_LOAD_ADDR;
Signature · 1 line
2.9.2