From 72b57e311fe8634d26b4c56a78016f9359208443 Mon Sep 17 00:00:00 2001 From: Kaushik BV Date: Sun, 17 Apr 2011 11:21:51 +0000 Subject: cli: UI cleanup for geo-replication command * provide a unified output in case of failure of geo-replication session * provide a better formatting of the output geo-replication status command * update the help option of geo-replication command * fix few typos Signed-off-by: Kaushik BV Signed-off-by: Anand Avati BUG: 2536 (gsync service introspection) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2536 --- xlators/mgmt/glusterd/src/glusterd-op-sm.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'xlators/mgmt/glusterd/src/glusterd-op-sm.c') diff --git a/xlators/mgmt/glusterd/src/glusterd-op-sm.c b/xlators/mgmt/glusterd/src/glusterd-op-sm.c index 75629f47c..e02d9aecb 100644 --- a/xlators/mgmt/glusterd/src/glusterd-op-sm.c +++ b/xlators/mgmt/glusterd/src/glusterd-op-sm.c @@ -4257,6 +4257,8 @@ glusterd_gsync_read_frm_status (char *path, char *data) return -1; } + data[strlen(data)-1] = '\0'; + return 0; } @@ -4289,7 +4291,7 @@ glusterd_read_status_file (char *master, char *slave, ret = gsync_status (master, slave, &status); if (ret == 0 && status == -1) { - strncpy (buff, "Corrupt\n", sizeof (buff)); + strncpy (buff, "corrupt", sizeof (buff)); goto done; } else if (ret == -1) goto out; -- cgit