diff options
author | Andreas Philipp <philipp.andreas@gmail.com> | 2011-08-11 08:45:40 +0200 |
---|---|---|
committer | Chris Mason <chris.mason@oracle.com> | 2011-10-25 09:18:59 -0400 |
commit | a8b624eae7c358d67a35e847bd25c29f846046f9 (patch) | |
tree | e5ae8abff45f8d89b483a39d77046254bff6b6ef | |
parent | a70b0b2bba94fe62541cc21a9afe35015521fcc3 (diff) | |
download | btrfs-progs-a8b624eae7c358d67a35e847bd25c29f846046f9.tar.gz |
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>
-rw-r--r-- | btrfs_cmds.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/btrfs_cmds.c b/btrfs_cmds.c index 7d2fd8c0..d099847a 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 != 3) { fprintf(stderr, "Invalid arguments for subvolume snapshot\n"); free(argv); return 1; |