diff options
author | Pranith Kumar K <pranithk@gluster.com> | 2010-09-06 08:04:16 +0000 |
---|---|---|
committer | Vijay Bellur <vijay@dev.gluster.com> | 2010-09-06 09:37:52 -0700 |
commit | c7c5a784c833af4018e628d5d7a2bdc40eb59dba (patch) | |
tree | 89a128fc0858811f6eb0aa6f58e3f6808d8d2284 /cli/src | |
parent | e807464de55fc366907c5bc8e3cf84b11da19e46 (diff) |
cli: In volume create check for presence of bricks
Signed-off-by: Pranith Kumar K <pranithk@gluster.com>
Signed-off-by: Vijay Bellur <vijay@dev.gluster.com>
BUG: 1532 ()
URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=1532
Diffstat (limited to 'cli/src')
-rw-r--r-- | cli/src/cli-cmd-parser.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/cli/src/cli-cmd-parser.c b/cli/src/cli-cmd-parser.c index f5b263a6383..ef877f6ccbc 100644 --- a/cli/src/cli-cmd-parser.c +++ b/cli/src/cli-cmd-parser.c @@ -245,6 +245,12 @@ cli_cmd_volume_create_parse (const char **words, int wordcount, dict_t **options /* If brick-count is not valid when replica or stripe is given, exit here */ + if (!brick_count) { + cli_out ("No bricks specified"); + ret = -1; + goto out; + } + if (brick_count % count) { ret = -1; goto out; |