diff options
Diffstat (limited to 'cli')
-rw-r--r-- | cli/src/cli-rpc-ops.c | 22 |
1 files changed, 12 insertions, 10 deletions
diff --git a/cli/src/cli-rpc-ops.c b/cli/src/cli-rpc-ops.c index 4cb867442b5..89d8a18aafe 100644 --- a/cli/src/cli-rpc-ops.c +++ b/cli/src/cli-rpc-ops.c @@ -5674,10 +5674,12 @@ gf_cli_status_cbk (struct rpc_req *req, struct iovec *iov, "status information."); if (global_state->mode & GLUSTER_MODE_XML) { - cli_xml_output_str ("volStatus", msg, rsp.op_ret, - rsp.op_errno, rsp.op_errstr); - ret = 0; - goto out; + if (!local->all) + cli_xml_output_str ("volStatus", msg, + rsp.op_ret, rsp.op_errno, + rsp.op_errstr); + ret = 0; + goto out; } cli_err ("%s", msg); @@ -5945,12 +5947,6 @@ gf_cli_status_volume_all (call_frame_t *frame, xlator_t *this, void *data) goto out; } - if (vol_count == 0) { - cli_err ("No volumes present"); - ret = 0; - goto out; - } - /* remove the "all" flag in cmd */ cmd &= ~GF_CLI_STATUS_ALL; cmd |= GF_CLI_STATUS_VOL; @@ -5965,6 +5961,12 @@ gf_cli_status_volume_all (call_frame_t *frame, xlator_t *this, void *data) } } + if (vol_count == 0 && !(global_state->mode & GLUSTER_MODE_XML)) { + cli_err ("No volumes present"); + ret = 0; + goto out; + } + for (i = 0; i < vol_count; i++) { dict = dict_new (); |