Thread (8 messages) 8 messages, 4 authors, 2012-09-30

Re: [PATCH] Btrfs-progs: btrfs subvolume delete could delete subvolumes

From: Ilya Dryomov <idryomov@gmail.com>
Date: 2012-09-21 08:14:52

On Fri, Sep 21, 2012 at 02:54:08PM +0800, Anand jain wrote:
quoted hunk ↗ jump to hunk
From: Anand Jain <redacted>

With this user will be able to provide more than one subvolume
to delete.
eg: btrfs subvolume delete <subvol1> <subvol2>

Signed-off-by: Anand Jain <redacted>
---
 cmds-subvolume.c |   36 ++++++++++++++++++++++++------------
 man/btrfs.8.in   |    4 ++--
 2 files changed, 26 insertions(+), 14 deletions(-)
diff --git a/cmds-subvolume.c b/cmds-subvolume.c
index f4aa80f..cfeaa8d 100644
--- a/cmds-subvolume.c
+++ b/cmds-subvolume.c
@@ -188,31 +188,34 @@ int test_issubvolume(char *path)
 }
 
 static const char * const cmd_subvol_delete_usage[] = {
-	"btrfs subvolume delete <name>",
-	"Delete a subvolume",
+	"btrfs subvolume delete <subvolume> [<subvolume>...]",
+	"Delete subvolume(s)",
 	NULL
 };
 
 static int cmd_subvol_delete(int argc, char **argv)
 {
-	int	res, fd, len, e;
+	int	res, fd, len, e, cnt = 1, ret = 0;
 	struct btrfs_ioctl_vol_args	args;
 	char	*dname, *vname, *cpath;
 	char	*path;
 
-	if (check_argc_exact(argc, 2))
+	if (argc < 2)
 		usage(cmd_subvol_delete_usage);
check_argc_min(argc, 2)

Haven't looked at the rest.

Thanks,

		Ilya
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help