From: Lennart Poettering Date: Fri, 24 Nov 2023 15:41:47 +0000 (+0100) Subject: show-status: suffix output ith CRNL rather than just NL X-Git-Tag: v256-rc1~1581 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=936fcc4668125ab4dd198b14288b318308d9f7de;p=thirdparty%2Fsystemd.git show-status: suffix output ith CRNL rather than just NL This is similar to #30183 but focusses on the status output rather than the log output. Since the status output always goes to a TTY we don't have to conditionalize things on isatty(). Fixes: #30184 --- diff --git a/src/core/show-status.c b/src/core/show-status.c index 1d47c0af4d2..606237ee0ea 100644 --- a/src/core/show-status.c +++ b/src/core/show-status.c @@ -94,7 +94,7 @@ int status_vprintf(const char *status, ShowStatusFlags flags, const char *format } iovec[n++] = IOVEC_MAKE_STRING(s); - iovec[n++] = IOVEC_MAKE_STRING("\n"); + iovec[n++] = IOVEC_MAKE_STRING("\r\n"); /* use CRNL instead of just NL, to be robust towards TTYs in raw mode */ if (prev_ephemeral && !FLAGS_SET(flags, SHOW_STATUS_EPHEMERAL)) iovec[n++] = IOVEC_MAKE_STRING(ANSI_ERASE_TO_END_OF_LINE);