mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/kdave/btrfs-progs.git
synced 2025-01-25 05:04:00 +08:00
btrfs-progs: subvol get-default: fix argument parsing
"sub get-default" does't work since the following commit. commit 176aeca9a148 ("btrfs-progs: add getopt stubs where needed") * actual result ================================================== # ./btrfs sub get-default /btrfs btrfs subvolume get-default: too few arguments usage: btrfs subvolume get-default <path> Get the default subvolume of a filesystem ================================================== * expected result ================================================== # btrfs sub get-default /btrfs ID 5 (FS_TREE) ================================================== Signed-off-by: Satoru Takeuchi <takeuchi_satoru@jp.fujitsu.com> Signed-off-by: David Sterba <dsterba@suse.com>
This commit is contained in:
parent
40dc7c504c
commit
d0408017d0
@ -790,7 +790,7 @@ static int cmd_subvol_get_default(int argc, char **argv)
|
||||
|
||||
clean_args_no_options(argc, argv, cmd_subvol_get_default_usage);
|
||||
|
||||
if (check_argc_exact(argc - optind, 2))
|
||||
if (check_argc_exact(argc - optind, 1))
|
||||
usage(cmd_subvol_get_default_usage);
|
||||
|
||||
subvol = argv[1];
|
||||
|
Loading…
Reference in New Issue
Block a user