summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHugo Mills <hugo@carfax.org.uk>2011-07-09 18:50:23 +0100
committerChris Mason <chris.mason@oracle.com>2011-10-25 09:18:59 -0400
commitae62acb3c94b771b44341c71bae26b4b2bb78b50 (patch)
tree5c40fa3c9a5314d8204036f09fcada4ae315ca52
parent25439670a611b83bae8e24477cff95278ed4559a (diff)
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>
-rw-r--r--btrfs_cmds.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/btrfs_cmds.c b/btrfs_cmds.c
index d91bccd5..699dfc2c 100644
--- a/btrfs_cmds.c
+++ b/btrfs_cmds.c
@@ -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;