diff options
author | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2018-12-05 17:33:15 +0100 |
---|---|---|
committer | Mike Gilbert <floppym@gentoo.org> | 2019-01-09 10:12:25 -0500 |
commit | f5d209061fd2ff994cab8aa9b61dccff183cbd2b (patch) | |
tree | 62442fcb0244d2af11a0b2a13c08aebdf2ffd092 | |
parent | libudev-util: make util_replace_whitespace() read only len characters (diff) | |
download | systemd-f5d209061fd2ff994cab8aa9b61dccff183cbd2b.tar.gz systemd-f5d209061fd2ff994cab8aa9b61dccff183cbd2b.tar.bz2 systemd-f5d209061fd2ff994cab8aa9b61dccff183cbd2b.zip |
coredump: remove duplicate MESSAGE= prefix from message
systemd-coredump[9982]: MESSAGE=Process 771 (systemd-journal) of user 0 dumped core.
systemd-coredump[9982]: Coredump diverted to /var/lib/systemd/coredump/core...
log_dispatch() calls log_dispatch_internal() which calls write_to_journal()
which appends MESSAGE= on its own.
-rw-r--r-- | src/coredump/coredump.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/coredump/coredump.c b/src/coredump/coredump.c index 0c888b26f..20c1fb024 100644 --- a/src/coredump/coredump.c +++ b/src/coredump/coredump.c @@ -800,9 +800,10 @@ log: return log_oom(); if (journald_crash) { - /* We cannot log to the journal, so just print the MESSAGE. + /* We cannot log to the journal, so just print the message. * The target was set previously to something safe. */ - log_dispatch(LOG_ERR, 0, core_message); + assert(startswith(core_message, "MESSAGE=")); + log_dispatch(LOG_ERR, 0, core_message + strlen("MESSAGE=")); return 0; } |