From 6066038c7bd96791143a63ed03a617c8cb7020f8 Mon Sep 17 00:00:00 2001 From: shishir gowda Date: Tue, 7 Sep 2010 07:35:56 +0000 Subject: Volume info should display transport-type Signed-off-by: shishir gowda Signed-off-by: Vijay Bellur BUG: 1230 () URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=1230 --- cli/src/cli3_1-cops.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'cli') diff --git a/cli/src/cli3_1-cops.c b/cli/src/cli3_1-cops.c index 5c79a2c6d7f..064845087b8 100644 --- a/cli/src/cli3_1-cops.c +++ b/cli/src/cli3_1-cops.c @@ -257,7 +257,7 @@ gf_cli3_1_get_volume_cbk (struct rpc_req *req, struct iovec *iov, char *brick = NULL; int32_t j = 1; cli_local_t *local = NULL; - + int32_t transport = 0; if (-1 == req->rpc_status) { goto out; @@ -344,11 +344,17 @@ gf_cli3_1_get_volume_cbk (struct rpc_req *req, struct iovec *iov, if (ret) goto out; + snprintf (key, 256, "volume%d.transport", i); + ret = dict_get_int32 (dict, key, &transport); + if (ret) + goto out; cli_out ("Volume Name: %s", volname); cli_out ("Type: %s", cli_volume_type[type]); cli_out ("Status: %s", cli_volume_status[status], brick_count); cli_out ("Number of Bricks: %d", brick_count); + cli_out ("Transport-type: %s", ((transport == 0)? + "tcp" : "rdma")); j = 1; -- cgit