diff options
author | Heinrich Schuchardt <heinrich.schuchardt@canonical.com> | 2022-06-19 13:36:48 +0200 |
---|---|---|
committer | Heinrich Schuchardt <heinrich.schuchardt@canonical.com> | 2022-06-19 15:53:09 +0200 |
commit | a872b18a0f0365c7dd45239f85b4f7ffed3a6781 (patch) | |
tree | cb90088716ea981415cb702a63814927126e5b7d | |
parent | eaa268589e9cf81f37314f8efaebdb4dbb781647 (diff) | |
download | u-boot-a872b18a0f0365c7dd45239f85b4f7ffed3a6781.zip u-boot-a872b18a0f0365c7dd45239f85b4f7ffed3a6781.tar.gz u-boot-a872b18a0f0365c7dd45239f85b4f7ffed3a6781.tar.bz2 |
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 <heinrich.schuchardt@canonical.com>
-rw-r--r-- | cmd/nvedit_efi.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/cmd/nvedit_efi.c b/cmd/nvedit_efi.c index 7ebb14e..770877c 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; } |