summaryrefslogtreecommitdiffstats
path: root/cli
diff options
context:
space:
mode:
authorPavan Sondur <pavan@gluster.com>2010-07-26 07:07:24 +0000
committerAnand V. Avati <avati@dev.gluster.com>2010-07-27 01:20:08 -0700
commitf803fae036177c3b9d9513f5b6300d426366eb62 (patch)
tree7d68e521e64fccddfd1188a6ef33de31125dd5c0 /cli
parent667b2496c3f29e24ed359a05b0f44df0d1894969 (diff)
cli: Fixes related to get brick-replace to work.
Signed-off-by: Pavan Vilas Sondur <pavan@gluster.com> Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 1187 () URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=1187
Diffstat (limited to 'cli')
-rw-r--r--cli/src/cli3_1-cops.c25
1 files changed, 4 insertions, 21 deletions
diff --git a/cli/src/cli3_1-cops.c b/cli/src/cli3_1-cops.c
index d76485734ef..6ebe6ddbe40 100644
--- a/cli/src/cli3_1-cops.c
+++ b/cli/src/cli3_1-cops.c
@@ -1176,8 +1176,6 @@ gf_cli3_1_replace_brick (call_frame_t *frame, xlator_t *this,
gf1_cli_replace_brick_req req = {0,};
int ret = 0;
dict_t *dict = NULL;
- char *src_brick = NULL;
- char *dst_brick = NULL;
if (!frame || !this || !data) {
ret = -1;
@@ -1197,21 +1195,6 @@ gf_cli3_1_replace_brick (call_frame_t *frame, xlator_t *this,
goto out;
if (GF_REPLACE_OP_START == req.op) {
- ret = dict_get_str (dict, "src-brick", &src_brick);
-
- if (ret)
- goto out;
-
- req.src_brick.src_brick_len = strlen (src_brick);
- req.src_brick.src_brick_val = src_brick;
-
- ret = dict_get_str (dict, "src-brick", &dst_brick);
-
- if (ret)
- goto out;
-
- req.dst_brick.dst_brick_len = strlen (dst_brick);
- req.dst_brick.dst_brick_val = dst_brick;
}
ret = cli_submit_request (&req, frame, cli_rpc_prog,
@@ -1222,12 +1205,12 @@ gf_cli3_1_replace_brick (call_frame_t *frame, xlator_t *this,
out:
gf_log ("cli", GF_LOG_DEBUG, "Returning %d", ret);
- if (req.src_brick.src_brick_val) {
- GF_FREE (req.src_brick.src_brick_val);
+ if (req.bricks.bricks_val) {
+ GF_FREE (req.bricks.bricks_val);
}
- if (req.dst_brick.dst_brick_val) {
- GF_FREE (req.dst_brick.dst_brick_val);
+ if (req.bricks.bricks_val) {
+ GF_FREE (req.bricks.bricks_val);
}
return ret;