mirror of
https://github.com/kdave/btrfs-progs
synced 2025-01-11 08:19:32 +00:00
btrfs-progs: find-root: don't dump usage on wrong argument count
The checker prints the error message, no need the full usage string to be pritned. Signed-off-by: David Sterba <dsterba@suse.com>
This commit is contained in:
parent
5ec301036e
commit
32ec525fd2
@ -193,17 +193,15 @@ int main(int argc, char **argv)
|
|||||||
}
|
}
|
||||||
|
|
||||||
set_argv0(argv);
|
set_argv0(argv);
|
||||||
if (check_argc_min(argc - optind, 1)) {
|
if (check_argc_min(argc - optind, 1))
|
||||||
find_root_usage();
|
return 1;
|
||||||
exit(1);
|
|
||||||
}
|
|
||||||
|
|
||||||
fs_info = open_ctree_fs_info(argv[optind], 0, 0, 0,
|
fs_info = open_ctree_fs_info(argv[optind], 0, 0, 0,
|
||||||
OPEN_CTREE_CHUNK_ROOT_ONLY |
|
OPEN_CTREE_CHUNK_ROOT_ONLY |
|
||||||
OPEN_CTREE_IGNORE_CHUNK_TREE_ERROR);
|
OPEN_CTREE_IGNORE_CHUNK_TREE_ERROR);
|
||||||
if (!fs_info) {
|
if (!fs_info) {
|
||||||
error("open ctree failed");
|
error("open ctree failed");
|
||||||
exit(1);
|
return 1;
|
||||||
}
|
}
|
||||||
cache_tree_init(&result);
|
cache_tree_init(&result);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user