]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
binman: Return failure when a usage() message is generated
authorSimon Glass <sjg@chromium.org>
Wed, 31 Jul 2024 14:49:03 +0000 (08:49 -0600)
committerTom Rini <trini@konsulko.com>
Mon, 5 Aug 2024 18:15:29 +0000 (12:15 -0600)
The tool must return an error code when invalid arguments are provided,
otherwise binman has no way of knowing that anything went wrong.

Correct this.

Signed-off-by: Simon Glass <sjg@chromium.org>
Fixes: fab430be2f4 ("tools: add mkeficapsule command for UEFI...")
tools/mkeficapsule.c

index c112ae2de8dbfe259efe94bdad8d2f69dc35e2bb..f28008a0829f6ba18ca26b9d8b7b6ed0256fba69 100644 (file)
@@ -977,7 +977,7 @@ int main(int argc, char **argv)
                        exit(EXIT_SUCCESS);
                default:
                        print_usage();
-                       exit(EXIT_SUCCESS);
+                       exit(EXIT_FAILURE);
                }
        }