diff options
author | Matt Helsley <mhelsley@vmware.com> | 2020-05-19 22:55:31 +0200 |
---|---|---|
committer | Josh Poimboeuf <jpoimboe@redhat.com> | 2020-05-20 15:32:52 +0200 |
commit | f15c648f202cd0232d4a9c98627bc08bcd6d11ee (patch) | |
tree | 46c79fece4548e15d563ab63cace311f9fd07b01 /tools/objtool/objtool.c | |
parent | objtool: Add check_kcov_mode() to the uaccess safelist (diff) | |
download | linux-f15c648f202cd0232d4a9c98627bc08bcd6d11ee.tar.xz linux-f15c648f202cd0232d4a9c98627bc08bcd6d11ee.zip |
objtool: Exit successfully when requesting help
When the user requests help it's not an error so do not exit with
a non-zero exit code. This is not especially useful for a user but
any script that might wish to check that objtool --help is at least
available can't rely on the exit code to crudely check that, for
example, building an objtool executable succeeds.
Signed-off-by: Matt Helsley <mhelsley@vmware.com>
Signed-off-by: Josh Poimboeuf <jpoimboe@redhat.com>
Diffstat (limited to 'tools/objtool/objtool.c')
-rw-r--r-- | tools/objtool/objtool.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/tools/objtool/objtool.c b/tools/objtool/objtool.c index 0b3528f05053..58fdda510653 100644 --- a/tools/objtool/objtool.c +++ b/tools/objtool/objtool.c @@ -58,7 +58,9 @@ static void cmd_usage(void) printf("\n"); - exit(129); + if (!help) + exit(129); + exit(0); } static void handle_options(int *argc, const char ***argv) |