Skip to content

Commit

Permalink
Version option should return 0 rather than 1
Browse files Browse the repository at this point in the history
Previously invoke irqbalance with --version options, the return value
is 1 instead of 0:

$ irqbalance --version
irqbalance version 1.9.4
$ echo $?
1

It is unexpected because irqbalance have successfully returned the
version string with no errors, so 0 should be returned instead of 1.
This will confuse some automation tests.

This patch will make irqbalance return the correct value for version
option.

Signed-off-by: Tao Liu <[email protected]>
  • Loading branch information
liutgnu committed Aug 12, 2024
1 parent 35f52b9 commit 5d9eb19
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion irqbalance.c
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ static void parse_command_line(int argc, char **argv)
break;
case 'V':
version();
exit(1);
exit(0);
break;
case 'c':
deepest_cache = strtoul(optarg, &endptr, 10);
Expand Down

0 comments on commit 5d9eb19

Please sign in to comment.