From 1f64e5e3dd7f871e112ad9d3e9fae3cc5e15fd88 Mon Sep 17 00:00:00 2001 From: Venky Shankar Date: Wed, 21 Nov 2012 12:06:26 +0530 Subject: gsyncd / geo-rep: include hostname in status cmd Including hostname of the node where geo-rep start was initiated from. This helps any consumers of the status command to identify and possibly issue commands on those node(s). Change-Id: I005083878a3a4794da3b7f3f7d2cc9d28f004e3f BUG: 858218 Signed-off-by: Venky Shankar Reviewed-on: http://review.gluster.org/4218 Reviewed-by: Csaba Henk Tested-by: Gluster Build System --- cli/src/cli-rpc-ops.c | 27 +++++++++++++++++---------- 1 file changed, 17 insertions(+), 10 deletions(-) (limited to 'cli') diff --git a/cli/src/cli-rpc-ops.c b/cli/src/cli-rpc-ops.c index 2e0c58402..19451e059 100644 --- a/cli/src/cli-rpc-ops.c +++ b/cli/src/cli-rpc-ops.c @@ -3209,18 +3209,20 @@ gf_cli_gsync_config_command (dict_t *dict) int gf_cli_gsync_out_status (dict_t *dict) { - int gsync_count = 0; - int i = 0; - int ret = 0; + int gsync_count = 0; + int i = 0; + int ret = 0; char mst[PATH_MAX] = {0, }; - char slv[PATH_MAX]= {0, }; + char slv[PATH_MAX] = {0, }; char sts[PATH_MAX] = {0, }; - char hyphens[81] = {0, }; - char *mst_val = NULL; - char *slv_val = NULL; - char *sts_val = NULL; + char nds[PATH_MAX] = {0, }; + char hyphens[100] = {0, }; + char *mst_val = NULL; + char *slv_val = NULL; + char *sts_val = NULL; + char *nds_val = NULL; - cli_out ("%-20s %-50s %-10s", "MASTER", "SLAVE", "STATUS"); + cli_out ("%-20s %-20s %-50s %-10s", "NODE", "MASTER", "SLAVE", "STATUS"); for (i=0; i