summaryrefslogtreecommitdiff
path: root/src/journal
diff options
context:
space:
mode:
Diffstat (limited to 'src/journal')
-rw-r--r--src/journal/journal-verify.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/journal/journal-verify.c b/src/journal/journal-verify.c
index 26572ddd76..a37316b8f9 100644
--- a/src/journal/journal-verify.c
+++ b/src/journal/journal-verify.c
@@ -54,7 +54,9 @@ static void draw_progress(uint64_t p, usec_t *last_usec) {
j = (n * (unsigned) p) / 65535ULL;
k = n - j;
- fputs("\r\x1B[?25l" ANSI_HIGHLIGHT_GREEN, stdout);
+ fputs("\r", stdout);
+ if (colors_enabled())
+ fputs("\x1B[?25l" ANSI_HIGHLIGHT_GREEN, stdout);
for (i = 0; i < j; i++)
fputs("\xe2\x96\x88", stdout);
@@ -66,7 +68,10 @@ static void draw_progress(uint64_t p, usec_t *last_usec) {
printf(" %3"PRIu64"%%", 100U * p / 65535U);
- fputs("\r\x1B[?25h", stdout);
+ fputs("\r", stdout);
+ if (colors_enabled())
+ fputs("\x1B[?25h", stdout);
+
fflush(stdout);
}