mirror of
https://github.com/kdave/btrfs-progs
synced 2025-03-25 04:16:32 +00:00
check number of args for btrfs sub snap correctly
Check whether there are the right number of arguments (exatly 2 without the flag -r) in the subcommand handler for the btrfs subvolume snapshot command. Signed-off-by: Andreas Philipp <philipp.andreas@gmail.com>
This commit is contained in:
parent
a70b0b2bba
commit
a8b624eae7
@ -372,7 +372,7 @@ int do_clone(int argc, char **argv)
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
if (argc - optind != 2) {
|
||||
if (argc - optind != 3) {
|
||||
fprintf(stderr, "Invalid arguments for subvolume snapshot\n");
|
||||
free(argv);
|
||||
return 1;
|
||||
|
Loading…
Reference in New Issue
Block a user