mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/kdave/btrfs-progs.git
synced 2024-11-30 23:54:10 +08:00
f61b90aff9
[BUG] Currently cli/009 test case failed with different exit number: ====== RUN CHECK /home/adam/btrfs-progs/btrfstune --help usage: btrfstune [options] device [...] failed: /home/adam/btrfs-progs/btrfstune --help test failed for case 009-btrfstune [CAUSE] In tune/main.c, we have the following call on usage(): static void print_usage(int ret) { usage(&tune_cmd); exit(ret); } However usage() itself would always call exit(1): void usage(const struct cmd_struct *cmd) { usage_command_usagestr(cmd->usagestr, NULL, 0, true, true); exit(1); } This makes prevents any caller of usage() to modify its exit number. [FIX] Add a new argument @error for print_usage(), so we can properly return 0 for -h/--help usage. Signed-off-by: Qu Wenruo <wqu@suse.com> Signed-off-by: David Sterba <dsterba@suse.com> |
||
---|---|---|
.. | ||
change-csum.c | ||
change-metadata-uuid.c | ||
change-uuid.c | ||
convert-bgt.c | ||
main.c | ||
seeding.c | ||
tune.h |