forked from Mirrors/btrfs-progs
btrfs-progs: qgroup create/destroy: fix argument parsing
"qgroup create/destroy" don't work from the following commit. commit 176aeca9a148 ("btrfs-progs: add getopt stubs where needed") * actual result ================================================== # ./btrfs qgroup create 1 /btrfs/sub btrfs qgroup create: too few arguments usage: btrfs qgroup create <qgroupid> <path> Create a subvolume quota group. ================================================== # btrfs qgroup create 1 /btrfs/sub # ./btrfs qgroup destroy 1 /btrfs/sub btrfs qgroup destroy: too few arguments usage: btrfs qgroup destroy <qgroupid> <path> Destroy a quota group. ================================================== * expected result ================================================== # btrfs qgroup create 1 /btrfs/sub # btrfs qgroup destroy 1 /btrfs/sub/ ================================================== Signed-off-by: Satoru Takeuchi <takeuchi_satoru@jp.fujitsu.com> Signed-off-by: David Sterba <dsterba@suse.com>master
parent
d0408017d0
commit
5bec887333
|
@ -124,7 +124,7 @@ static int _cmd_qgroup_create(int create, int argc, char **argv)
|
|||
struct btrfs_ioctl_qgroup_create_args args;
|
||||
DIR *dirstream = NULL;
|
||||
|
||||
if (check_argc_exact(argc - optind, 3))
|
||||
if (check_argc_exact(argc - optind, 2))
|
||||
return -1;
|
||||
|
||||
memset(&args, 0, sizeof(args));
|
||||
|
|
Loading…
Reference in New Issue