fix incorrect argument checking for "btrfs sub snap -r"

Stephane Chazelas and Andreas Philipp spotted that the earlier patch
fixing this issue was incomplete, and should also update the argument-
count checking code as well.

Signed-off-by: Hugo Mills <hugo@carfax.org.uk>
This commit is contained in:
Hugo Mills 2011-07-09 18:50:23 +01:00 committed by Chris Mason
parent 25439670a6
commit ae62acb3c9
1 changed files with 1 additions and 1 deletions

View File

@ -372,7 +372,7 @@ int do_clone(int argc, char **argv)
return 1;
}
}
if (argc - optind < 2) {
if (argc - optind != 2) {
fprintf(stderr, "Invalid arguments for subvolume snapshot\n");
free(argv);
return 1;