summaryrefslogtreecommitdiff
path: root/cmd/efidebug.c
diff options
context:
space:
mode:
authorHeinrich Schuchardt <xypron.glpk@gmx.de>2019-02-28 20:41:58 +0100
committerHeinrich Schuchardt <xypron.glpk@gmx.de>2019-03-02 23:34:26 +0100
commit1fa442ed4330a7c489479a3e3c333239ca6441ec (patch)
tree4ea8f4fa831e427178cf7cc68230184a813529ae /cmd/efidebug.c
parentfdef298338e4e775d41ab77b25edb695b2d8e1c0 (diff)
efi_loader: error handling for `efidebug boot add`
In `efidebug boot add iPXE scsi 0:1 snp-arm64.efi --foo` a parameter is missing. Hence the command should not silently return as if everything were ok but should display the usage info. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Reviewed-by: Alexander Graf <agraf@csgraf.de>
Diffstat (limited to 'cmd/efidebug.c')
-rw-r--r--cmd/efidebug.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/cmd/efidebug.c b/cmd/efidebug.c
index 5072a7b39b..db96682c5a 100644
--- a/cmd/efidebug.c
+++ b/cmd/efidebug.c
@@ -491,7 +491,7 @@ static int do_efi_boot_add(cmd_tbl_t *cmdtp, int flag,
id = (int)simple_strtoul(argv[1], &endp, 16);
if (*endp != '\0' || id > 0xffff)
- return CMD_RET_FAILURE;
+ return CMD_RET_USAGE;
sprintf(var_name, "Boot%04X", id);
p = var_name16;