diff options
author | 2018-12-05 21:34:24 +0100 | |
---|---|---|
committer | 2019-01-09 10:11:48 -0500 | |
commit | 721ddce1c948155b5382517070e5257d91795c1b (patch) | |
tree | f10cfb719248aab6fee6ed67023b579fd480754f | |
parent | basic/process-util: limit command line lengths to _SC_ARG_MAX (diff) | |
download | systemd-721ddce1c948155b5382517070e5257d91795c1b.tar.gz systemd-721ddce1c948155b5382517070e5257d91795c1b.tar.bz2 systemd-721ddce1c948155b5382517070e5257d91795c1b.zip |
coredump: fix message when we fail to save a journald coredump
If creation of the message failed, we'd write a bogus entry:
systemd-coredump[1400]: Cannot store coredump of 416 (systemd-journal): No space left on device
systemd-coredump[1400]: MESSAGE=Process 416 (systemd-journal) of user 0 dumped core.
systemd-coredump[1400]: Coredump diverted to
-rw-r--r-- | src/coredump/coredump.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/coredump/coredump.c b/src/coredump/coredump.c index ffa88f612..2a130e883 100644 --- a/src/coredump/coredump.c +++ b/src/coredump/coredump.c @@ -783,8 +783,8 @@ log: core_message = strjoin("MESSAGE=Process ", context[CONTEXT_PID], " (", context[CONTEXT_COMM], ") of user ", context[CONTEXT_UID], " dumped core.", - journald_crash ? "\nCoredump diverted to " : NULL, - journald_crash ? filename : NULL); + journald_crash && filename ? "\nCoredump diverted to " : NULL, + journald_crash && filename ? filename : NULL); if (!core_message) return log_oom(); |