summaryrefslogtreecommitdiffstats
path: root/cli
diff options
context:
space:
mode:
authorKaushal M <kaushal@redhat.com>2012-02-27 15:34:11 +0530
committerVijay Bellur <vijay@gluster.com>2012-02-27 02:16:52 -0800
commitbd94f6a1cc26fbcf8811e04dab0c90257b44d89a (patch)
treeb7e3fef86184e67e54f93124992b4595397c0a12 /cli
parent3cad6558b030bc3b0ebb662ec7d0346ab9a32cc2 (diff)
cli: Fix broken "volume set help/help-xml"
Change-Id: I4e71e67f32ff37cfe23bc77c0e27645ac495a247 BUG: 796040 Signed-off-by: Kaushal M <kaushal@redhat.com> Reviewed-on: http://review.gluster.com/2822 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vijay@gluster.com>
Diffstat (limited to 'cli')
-rw-r--r--cli/src/cli-rpc-ops.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/cli/src/cli-rpc-ops.c b/cli/src/cli-rpc-ops.c
index 5dfdbe063f5..995526abbea 100644
--- a/cli/src/cli-rpc-ops.c
+++ b/cli/src/cli-rpc-ops.c
@@ -1265,11 +1265,9 @@ gf_cli3_1_set_volume_cbk (struct rpc_req *req, struct iovec *iov,
if (dict_get_str (dict, "help-str", &help_str))
snprintf (msg, sizeof (msg), "Set volume %s",
(rsp.op_ret) ? "unsuccessful": "successful");
- else
- snprintf (msg, sizeof (msg), "%s", help_str);
#if (HAVE_LIB_XML)
- if (global_state->mode & GLUSTER_MODE_XML) {
+ if ((global_state->mode & GLUSTER_MODE_XML) && (help_str == NULL)) {
ret = cli_xml_output_str ("volSet", msg, rsp.op_ret,
rsp.op_errno, rsp.op_errstr);
if (ret)
@@ -1279,7 +1277,8 @@ gf_cli3_1_set_volume_cbk (struct rpc_req *req, struct iovec *iov,
}
#endif
- cli_out ("%s", msg);
+ cli_out ("%s", ((help_str == NULL) ? msg : help_str));
+
ret = rsp.op_ret;
out: