summaryrefslogtreecommitdiffstats
path: root/cli
diff options
context:
space:
mode:
authorAmar Tumballi <amar@gluster.com>2010-09-08 10:40:19 +0000
committerVijay Bellur <vijay@dev.gluster.com>2010-09-08 11:24:49 -0700
commitdcb434eb13996bb15ab1088fb445315faa3f8ead (patch)
tree27d8358c4d5b0dc40495833bce30d7d3b2150084 /cli
parent43d36d456314f6d4e67c3d8f06cceb585f467915 (diff)
gluster cli: don't print port in peer status
Signed-off-by: Amar Tumballi <amar@gluster.com> Signed-off-by: Vijay Bellur <vijay@dev.gluster.com> BUG: 1566 (gluster peer status port number) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=1566
Diffstat (limited to 'cli')
-rw-r--r--cli/src/cli3_1-cops.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/cli/src/cli3_1-cops.c b/cli/src/cli3_1-cops.c
index 95ce74103..1485e3a2e 100644
--- a/cli/src/cli3_1-cops.c
+++ b/cli/src/cli3_1-cops.c
@@ -218,8 +218,13 @@ gf_cli3_1_list_friends_cbk (struct rpc_req *req, struct iovec *iov,
if (ret)
goto out;
- cli_out ("hostname:%s, port:%d, uuid:%s, state:%d",
- hostname_buf, port, uuid_buf, state);
+ if (!port) {
+ cli_out ("hostname:%s, uuid:%s, state:%d",
+ hostname_buf, uuid_buf, state);
+ } else {
+ cli_out ("hostname:%s, port:%d, uuid:%s, state:%d",
+ hostname_buf, port, uuid_buf, state);
+ }
i++;
}
} else {