From: Alexander Graf Date: Sat, 2 Mar 2019 17:26:37 +0100 Subject: [U-Boot] [PATCH 1/1] efi_loader: error handling for `efidebug boot add` In-Reply-To: <20190228194929.14683-1-xypron.glpk@gmx.de> References: <20190228194929.14683-1-xypron.glpk@gmx.de> Message-ID: <74bb9b07-9332-e630-4e4b-91544e23e132@csgraf.de> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On 28.02.19 20:49, Heinrich Schuchardt wrote: > 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 Reviewed-by: Alexander Graf Alex > --- > cmd/efidebug.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/cmd/efidebug.c b/cmd/efidebug.c > index 5072a7b39bc..db96682c5a4 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;