From f8b6795b23aa23cc8e4af9159e6dd0dafc8b983b Mon Sep 17 00:00:00 2001 From: Michael Adam Date: Sun, 6 May 2018 14:53:08 +0200 Subject: heal: improve output of heal info The output of "gluster volume heal info" is clobbered with extra new lines when messages "- Possibly undergoing heal" or " - Is in split-brain" are printed for listed files. This patch fixes the output by removing the extra new lines. Bug: 1575381 Change-Id: Ifb614e0fb7c85f7af3a799958d3645a2bff2b53a fixes: bz#1575381 Signed-off-by: Michael Adam --- heal/src/glfs-heal.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'heal/src/glfs-heal.c') diff --git a/heal/src/glfs-heal.c b/heal/src/glfs-heal.c index 930b08f8301..9c628016898 100644 --- a/heal/src/glfs-heal.c +++ b/heal/src/glfs-heal.c @@ -696,11 +696,11 @@ glfsh_print_heal_status (dict_t *dict, char *path, uuid_t gfid, goto out; } else if (!strcmp (value, "possibly-healing")) { ret = gf_asprintf (&status, - " - Possibly undergoing heal\n"); + " - Possibly undergoing heal"); if (ret < 0) goto out; } else if (!strcmp (value, "split-brain")) { - ret = gf_asprintf (&status, " - Is in split-brain\n"); + ret = gf_asprintf (&status, " - Is in split-brain"); if (ret < 0) goto out; } else if (!strcmp (value, "heal-pending")) { @@ -710,13 +710,13 @@ glfsh_print_heal_status (dict_t *dict, char *path, uuid_t gfid, goto out; } else if (!strcmp (value, "split-brain-pending")) { pending = _gf_true; - ret = gf_asprintf (&status, " - Is in split-brain\n"); + ret = gf_asprintf (&status, " - Is in split-brain"); if (ret < 0) goto out; } else if (!strcmp (value, "possibly-healing-pending")) { pending = _gf_true; ret = gf_asprintf (&status, - " - Possibly undergoing heal\n"); + " - Possibly undergoing heal"); if (ret < 0) goto out; } -- cgit