diff options
-rw-r--r-- | cli/src/cli-rpc-ops.c | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/cli/src/cli-rpc-ops.c b/cli/src/cli-rpc-ops.c index 6e22316d1da..b074e6837c5 100644 --- a/cli/src/cli-rpc-ops.c +++ b/cli/src/cli-rpc-ops.c @@ -1428,10 +1428,18 @@ gf_cli_defrag_volume_cbk (struct rpc_req *req, struct iovec *iov, done: - if (rsp.op_ret) - cli_err ("volume rebalance: %s: failed: %s", volname, msg); - else - cli_out ("volume rebalance: %s: success: %s", volname, msg); + if (global_state->mode & GLUSTER_MODE_XML) + cli_xml_output_str ("volRebalance", msg, + rsp.op_ret, rsp.op_errno, + rsp.op_errstr); + else { + if (rsp.op_ret) + cli_err ("volume rebalance: %s: failed: %s", volname, + msg); + else + cli_out ("volume rebalance: %s: success: %s", volname, + msg); + } ret = rsp.op_ret; out: |