diff options
author | Prasanna Kumar Kalever <prasanna.kalever@redhat.com> | 2018-02-07 21:40:13 +0530 |
---|---|---|
committer | Prasanna Kumar Kalever <prasanna.kalever@redhat.com> | 2018-02-08 13:11:40 +0530 |
commit | 450f7e89116ed104f092dd1a709c0f057150a4f7 (patch) | |
tree | 6c5ec8f0e8efa600e496fe66dd30227fb878309b /utils/utils.c | |
parent | d7ebb697457fc4b8562bb1475a6832f1badb15f8 (diff) |
create: support [storage <filename>] option
$ gluster-block help
gluster-block (0.3)
usage:
gluster-block <command> <volname[/blockname]> [<args>] [--json*]
commands:
create <volname/blockname> [ha <count>]
[auth <enable|disable>]
[prealloc <full|no>]
[storage <filename>]
<host1[,host2,...]> <size>
create block device [defaults: ha 1, auth disable, prealloc no, size in bytes]
[...]
supported JSON formats:
--json|--json-plain|--json-spaced|--json-pretty
Fixes: #18
Change-Id: I5d9b4abb58596bd2297cffb294c6d31f752d53e9
Signed-off-by: Prasanna Kumar Kalever <prasanna.kalever@redhat.com>
Diffstat (limited to 'utils/utils.c')
-rw-r--r-- | utils/utils.c | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/utils/utils.c b/utils/utils.c index 13d61cc..3f52134 100644 --- a/utils/utils.c +++ b/utils/utils.c @@ -50,6 +50,26 @@ glusterBlockCLIOptEnumParse(const char *opt) int +glusterBlockCLICreateOptEnumParse(const char *opt) +{ + int i; + + + if (!opt) { + return GB_CLI_CREATE_OPT_MAX; + } + + for (i = 0; i < GB_CLI_CREATE_OPT_MAX; i++) { + if (!strcmp(opt, gbCliCreateOptLookup[i])) { + return i; + } + } + + return i; +} + + +int glusterBlockDaemonOptEnumParse(const char *opt) { int i; |