From: Heinrich Schuchardt Date: Sun, 19 Jun 2022 11:36:48 +0000 (+0200) Subject: cmd: correct return value for printenv -e X-Git-Tag: baikal/mips/sdk5.9~3^2~20^2~2 X-Git-Url: https://git.baikalelectronics.ru/sdk/?a=commitdiff_plain;h=d9110e347907a2a648827f04c1a5c692b5ba2798;p=uboot.git cmd: correct return value for printenv -e If printenv -e is executed and the specified variable is not found, the return value $? of the command should be 1 (false). Signed-off-by: Heinrich Schuchardt --- diff --git a/cmd/nvedit_efi.c b/cmd/nvedit_efi.c index 7ebb14e25f..770877c527 100644 --- a/cmd/nvedit_efi.c +++ b/cmd/nvedit_efi.c @@ -182,8 +182,10 @@ static int efi_dump_var_all(int argc, char *const argv[], } free(var_name16); - if (!match && argc == 1) + if (!match && argc == 1) { printf("Error: \"%s\" not defined\n", argv[0]); + return CMD_RET_FAILURE; + } return CMD_RET_SUCCESS; }