summaryrefslogtreecommitdiffstats
path: root/cli/src/cli-rpc-ops.c
diff options
context:
space:
mode:
authorKaushal M <kaushal@redhat.com>2012-03-20 18:05:18 +0530
committerVijay Bellur <vijay@gluster.com>2012-03-21 22:39:52 -0700
commit1522ac5c15516156bb33f8d47b0c0e7de6cd411f (patch)
tree2ec2bff12775ac212c35545d8c52d12147fd100a /cli/src/cli-rpc-ops.c
parentf7842792de7661dd72c40fb950102e5dfcf0e487 (diff)
cli: Display available information in "volume status detail"
Display the available information in "volume status detail", without failing and erroring out if some information is missing. Change-Id: If8edc268fe91ca9c681f25135738a75eec43b8c3 BUG: 765464 Signed-off-by: Kaushal M <kaushal@redhat.com> Reviewed-on: http://review.gluster.com/2989 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Amar Tumballi <amarts@redhat.com> Reviewed-by: Vijay Bellur <vijay@gluster.com>
Diffstat (limited to 'cli/src/cli-rpc-ops.c')
-rw-r--r--cli/src/cli-rpc-ops.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/cli/src/cli-rpc-ops.c b/cli/src/cli-rpc-ops.c
index b88b523b7c7..d75d095b555 100644
--- a/cli/src/cli-rpc-ops.c
+++ b/cli/src/cli-rpc-ops.c
@@ -4505,6 +4505,9 @@ cli_print_volume_status_clients (dict_t *dict, gf_boolean_t nfs)
goto out;
cli_out ("Clients connected : %d", client_count);
+ if (client_count == 0)
+ continue;
+
cli_out ("%-48s %15s %15s", "Hostname", "BytesRead",
"BytesWritten");
cli_out ("%-48s %15s %15s", "--------", "---------",
@@ -5248,12 +5251,13 @@ gf_cli3_1_status_cbk (struct rpc_req *req, struct iovec *iov,
cli_out ("\nStatus of volume: %s", volname);
- if ((cmd & GF_CLI_STATUS_DETAIL) == 0)
+ if ((cmd & GF_CLI_STATUS_DETAIL) == 0) {
cli_out ("Brick\t\t\t\t\t\t\tPort\tOnline\tPid");
+ cli_print_line (CLI_BRICK_STATUS_LINE_LEN);
+ }
for (i = 0; i < count; i++) {
- cli_print_line (CLI_BRICK_STATUS_LINE_LEN);
memset (key, 0, sizeof (key));
snprintf (key, sizeof (key), "brick%d.hostname", i);
@@ -5300,6 +5304,7 @@ gf_cli3_1_status_cbk (struct rpc_req *req, struct iovec *iov,
ret = cli_get_detail_status (dict, i, &status);
if (ret)
goto out;
+ cli_print_line (CLI_BRICK_STATUS_LINE_LEN);
cli_print_detailed_status (&status);
} else {