projects
/
platform
/
upstream
/
btrfs-progs.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a70b0b2
)
check number of args for btrfs sub snap correctly
author
Andreas Philipp
<philipp.andreas@gmail.com>
Thu, 11 Aug 2011 06:45:40 +0000
(08:45 +0200)
committer
Chris Mason
<chris.mason@oracle.com>
Tue, 25 Oct 2011 13:18:59 +0000
(09:18 -0400)
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>
btrfs_cmds.c
patch
|
blob
|
history
diff --git
a/btrfs_cmds.c
b/btrfs_cmds.c
index
7d2fd8c
..
d099847
100644
(file)
--- 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;