From c7c5a784c833af4018e628d5d7a2bdc40eb59dba Mon Sep 17 00:00:00 2001 From: Pranith Kumar K Date: Mon, 6 Sep 2010 08:04:16 +0000 Subject: cli: In volume create check for presence of bricks Signed-off-by: Pranith Kumar K Signed-off-by: Vijay Bellur BUG: 1532 () URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=1532 --- cli/src/cli-cmd-parser.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'cli') 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; -- cgit