[sheepdog] [PATCH] dog: rename 'force-unlock' as 'unlock'

Liu Yuan namei.unix at gmail.com
Thu Aug 28 08:23:48 CEST 2014


We don't have a command named 'vdi lock unlock', so we can simply take this seat
and simplify the command line for users.

updated:
$ dog vdi lock unlock <vdiname>

Signed-off-by: Liu Yuan <namei.unix at gmail.com>
---
 dog/vdi.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/dog/vdi.c b/dog/vdi.c
index 2b6a5cb..f04c16b 100644
--- a/dog/vdi.c
+++ b/dog/vdi.c
@@ -2846,7 +2846,7 @@ out:
 	return ret;
 }
 
-static int lock_force_unlock(int argc, char **argv)
+static int lock_unlock(int argc, char **argv)
 {
 	struct sd_req hdr;
 	const char *vdiname = argv[optind];
@@ -2870,8 +2870,8 @@ static int lock_force_unlock(int argc, char **argv)
 
 static struct subcommand vdi_lock_cmd[] = {
 	{"list", NULL, NULL, "list locked VDIs", NULL, 0, lock_list},
-	{"force-unlock", "<vdiname>", NULL, "unlock locked VDI forcibly", NULL,
-	 CMD_NEED_ARG, lock_force_unlock},
+	{"unlock", "<vdiname>", NULL, "unlock locked VDI forcibly", NULL,
+	 CMD_NEED_ARG, lock_unlock},
 	{NULL},
 };
 
-- 
1.9.1




More information about the sheepdog mailing list