chiark / gitweb /
logs-show: fix corrupt output with empty messages
authorUoti Urpala <uoti.urpala@pp1.inet.fi>
Thu, 20 Feb 2014 01:00:09 +0000 (03:00 +0200)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Thu, 27 Feb 2014 05:43:24 +0000 (00:43 -0500)
commit47d80904a1f72d559962cc5ad32fffd46672a34a
tree734c02be2ec7cc31183a608f6becae086aec66f1
parent911f4d4d60eae3cfa5b8ca122169f3ca21da4afc
logs-show: fix corrupt output with empty messages

If a message had zero length, journalctl would print no newline, and
two output lines would be concatenated. Fix. The problem was
introduced in commit 31f7bf199452 ("logs-show: print multiline
messages"). Affected short and verbose output modes.

Before fix:

Feb 09 21:16:17 glyph dhclient[1323]: Feb 09 21:16:17 glyph NetworkManager[788]: <info> (enp4s2): DHCPv4 state changed nbi -> preinit

after:

Feb 09 21:16:17 glyph dhclient[1323]:
Feb 09 21:16:17 glyph NetworkManager[788]: <info> (enp4s2): DHCPv4 state changed nbi -> preinit
src/shared/logs-show.c