From d1943660a29bda2ae6f020bb621c2ff0f44b6ec3 Mon Sep 17 00:00:00 2001 From: Prasanna Kumar Kalever Date: Fri, 10 Feb 2017 11:59:47 +0530 Subject: gluster-block: improve cli usage hints Signed-off-by: Prasanna Kumar Kalever --- cli/gluster-block.c | 23 ++++++++++++++++++----- 1 file changed, 18 insertions(+), 5 deletions(-) (limited to 'cli') 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 volume " + "volserver size mpath " + "servers "); 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 volume " + "volserver size mpath " + "servers "); 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 "); 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 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 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) { -- cgit