summaryrefslogtreecommitdiffstats
path: root/cli
diff options
context:
space:
mode:
authorPrasanna Kumar Kalever <prasanna.kalever@redhat.com>2017-02-10 11:59:47 +0530
committerPrasanna Kumar Kalever <prasanna.kalever@redhat.com>2017-02-10 12:05:03 +0530
commitd1943660a29bda2ae6f020bb621c2ff0f44b6ec3 (patch)
tree4a03109396fc100512fdde99e56f170d650c916b /cli
parent64cca26df51e929cc32b43148be64190c62ea793 (diff)
gluster-block: improve cli usage hints
Signed-off-by: Prasanna Kumar Kalever <prasanna.kalever@redhat.com>
Diffstat (limited to 'cli')
-rw-r--r--cli/gluster-block.c23
1 files changed, 18 insertions, 5 deletions
diff --git a/cli/gluster-block.c b/cli/gluster-block.c
index e5b5efe..2483d38 100644
--- a/cli/gluster-block.c
+++ b/cli/gluster-block.c
@@ -140,7 +140,10 @@ glusterBlockCreate(int argcount, char **options)
if(argcount <= optind) {
- MSG("%s\n", "Insufficient options for create");
+ MSG("%s\n", "Insufficient arguments for create:");
+ MSG("%s\n", "gluster-block create <block-name> volume <volume> "
+ "volserver <gluster-node> size <bytes> mpath <count>"
+ "servers <host1,host2,...>");
return -1;
}
@@ -205,7 +208,10 @@ glusterBlockCreate(int argcount, char **options)
/* check all options required by create command are specified */
if(ret < 4) {
- MSG("%s\n", "Insufficient options for create");
+ MSG("%s\n", "Insufficient arguments for create:");
+ MSG("%s\n", "gluster-block create <block-name> volume <volume> "
+ "volserver <gluster-node> size <bytes> mpath <count>"
+ "servers <host1,host2,...>");
ret = -1;
goto out;
}
@@ -238,7 +244,8 @@ glusterBlockList(int argcount, char **options)
if(argcount <= optind) {
- MSG("%s\n", "Insufficient options for list");
+ MSG("%s\n", "Insufficient arguments for list:");
+ MSG("%s\n", "gluster-block list volume <volume>");
return -1;
}
@@ -278,7 +285,8 @@ glusterBlockDelete(int argcount, char **options)
if(argcount <= optind) {
- MSG("%s\n", "Insufficient options for delete");
+ MSG("%s\n", "Insufficient arguments for delete:");
+ MSG("%s\n", "gluster-block delete <block-name> volume <volume>");
return -1;
}
@@ -320,7 +328,8 @@ glusterBlockInfo(int argcount, char **options)
if(argcount <= optind) {
- MSG("%s\n", "Insufficient options for info");
+ MSG("%s\n", "Insufficient arguments for info:");
+ MSG("%s\n", "gluster-block info <block-name> volume <volume>");
return -1;
}
@@ -387,6 +396,10 @@ glusterBlockParseArgs(int count, char **options)
}
goto out;
+ case GB_CLI_MODIFY:
+ MSG("option '%s' is not supported yet.\n", options[1]);
+ goto out;
+
case GB_CLI_DELETE:
ret = glusterBlockDelete(count, options);
if (ret) {