Skip to content

Commit

Permalink
objtool: Exit successfully when requesting help
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Matt Helsley authored and Josh Poimboeuf committed May 20, 2020
1 parent ae033f0 commit f15c648
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion tools/objtool/objtool.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit f15c648

Please sign in to comment.