Skip to content

Commit f15c648

Browse files
Matt Helsleyjpoimboe
authored andcommitted
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 <[email protected]> Signed-off-by: Josh Poimboeuf <[email protected]>
1 parent ae033f0 commit f15c648

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

tools/objtool/objtool.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,9 @@ static void cmd_usage(void)
5858

5959
printf("\n");
6060

61-
exit(129);
61+
if (!help)
62+
exit(129);
63+
exit(0);
6264
}
6365

6466
static void handle_options(int *argc, const char ***argv)

0 commit comments

Comments
 (0)