From dc9035c3279acb8c200b5aa93c0f5e066e36df96 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= Date: Wed, 5 Dec 2018 17:33:15 +0100 Subject: [PATCH] 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. (cherry picked from commit 4f62556d71206ac814a020a954b397d4940e14c3) (cherry picked from commit 9f564b3f45008c1a178a186f944ddc7485614cd2) Gbp-Pq: Name coredump-remove-duplicate-MESSAGE-prefix-from-message.patch --- src/coredump/coredump.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/coredump/coredump.c b/src/coredump/coredump.c index 0c888b26..20c1fb02 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; } -- 2.30.2