From a8b624eae7c358d67a35e847bd25c29f846046f9 Mon Sep 17 00:00:00 2001 From: Andreas Philipp Date: Thu, 11 Aug 2011 08:45:40 +0200 Subject: [PATCH] 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 --- btrfs_cmds.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/btrfs_cmds.c b/btrfs_cmds.c index 7d2fd8c..d099847 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; -- 2.7.4