From dcb434eb13996bb15ab1088fb445315faa3f8ead Mon Sep 17 00:00:00 2001 From: Amar Tumballi Date: Wed, 8 Sep 2010 10:40:19 +0000 Subject: gluster cli: don't print port in peer status Signed-off-by: Amar Tumballi Signed-off-by: Vijay Bellur BUG: 1566 (gluster peer status port number) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=1566 --- cli/src/cli3_1-cops.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/cli/src/cli3_1-cops.c b/cli/src/cli3_1-cops.c index 95ce741038a..1485e3a2ed9 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 { -- cgit