[sheepdog] [PATCH v1] dog: use -s as strict mode option abbr

Bingpeng Zhu nkuzbp at foxmail.com
Mon Aug 11 09:46:21 CEST 2014


"-t" has been used as the option abbr both for showing
elapsed time of executing dog command and enabling strict
mode. Maybe we should leave "-t" for showing elapsed time
option. When we want to specifiy strict mode for dog cluster
format command, "-s" is a suitable option abbr since it is
not used by any other dog cluster subcommand option now.

Signed-off-by: Bingpeng Zhu <bingpeng.zbp at alibaba-inc.com>
---
 dog/cluster.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/dog/cluster.c b/dog/cluster.c
index 6649507..80cd2c1 100644
--- a/dog/cluster.c
+++ b/dog/cluster.c
@@ -23,7 +23,7 @@ static struct sd_option cluster_options[] = {
 	{'f', "force", false, "do not prompt for confirmation"},
 	{'m', "multithread", false,
 	 "use multi-thread for 'cluster snapshot save'"},
-	{'t', "strict", false,
+	{'s', "strict", false,
 	 "do not serve write request if number of nodes is not sufficient"},
 	{ 0, NULL, false, NULL },
 };
@@ -747,7 +747,7 @@ failure:
 static struct subcommand cluster_cmd[] = {
 	{"info", NULL, "aprhvt", "show cluster information",
 	 NULL, CMD_NEED_NODELIST, cluster_info, cluster_options},
-	{"format", NULL, "bctapht", "create a Sheepdog store",
+	{"format", NULL, "bcsapht", "create a Sheepdog store",
 	 NULL, CMD_NEED_NODELIST, cluster_format, cluster_options},
 	{"shutdown", NULL, "apht", "stop Sheepdog",
 	 NULL, 0, cluster_shutdown, cluster_options},
@@ -794,7 +794,7 @@ static int cluster_parser(int ch, const char *opt)
 		break;
 	case 'm':
 		cluster_cmd_data.multithread = true;
-	case 't':
+	case 's':
 		cluster_cmd_data.strict = true;
 		break;
 	}
-- 
1.7.1




More information about the sheepdog mailing list