summaryrefslogtreecommitdiffstats
path: root/xlators
diff options
context:
space:
mode:
authorPranith Kumar K <pranithk@gluster.com>2010-08-26 12:17:37 +0000
committerVijay Bellur <vijay@dev.gluster.com>2010-08-27 02:26:22 -0700
commitc97156833355697a381e5e6a1c14142d8c9f3593 (patch)
treee206197819b92f31cb7d23819d2dbfdc570a517e /xlators
parent228d11a9c91a5f5be9a2827a93cc5b7afef2d96a (diff)
cli, mgmt/glusterd: validate brick
Signed-off-by: Pranith Kumar K <pranithk@gluster.com> Signed-off-by: Vijay Bellur <vijay@dev.gluster.com>
Diffstat (limited to 'xlators')
-rw-r--r--xlators/mgmt/glusterd/src/glusterd-utils.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd-utils.c b/xlators/mgmt/glusterd/src/glusterd-utils.c
index a6f9082a8..9c767da30 100644
--- a/xlators/mgmt/glusterd/src/glusterd-utils.c
+++ b/xlators/mgmt/glusterd/src/glusterd-utils.c
@@ -670,8 +670,13 @@ glusterd_brickinfo_get (char *brick, glusterd_volinfo_t *volinfo,
hostname = strtok (dup_brick, ":");
path = strtok (NULL, ":");
- GF_ASSERT (hostname);
- GF_ASSERT (path);
+ if (!hostname || !path) {
+ gf_log ("", GF_LOG_ERROR,
+ "brick %s is not of form <HOSTNAME>:<export-dir>",
+ brick);
+ ret = -1;
+ goto out;
+ }
list_for_each_entry (tmp, &volinfo->bricks, brick_list) {