diff options
Diffstat (limited to 'src/journal')
-rw-r--r-- | src/journal/coredump.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/journal/coredump.c b/src/journal/coredump.c index 68c353fe83..733373b307 100644 --- a/src/journal/coredump.c +++ b/src/journal/coredump.c @@ -240,7 +240,7 @@ int main(int argc, char* argv[]) { coredump_bufsize = COREDUMP_MIN_START; coredump_data = malloc(coredump_bufsize); if (!coredump_data) { - r = log_oom(); + log_warning("Failed to allocate memory for core, core will not be stored."); goto finalize; } @@ -251,7 +251,7 @@ int main(int argc, char* argv[]) { n = loop_read(STDIN_FILENO, coredump_data + coredump_size, coredump_bufsize - coredump_size, false); if (n < 0) { - log_error("Failed to read core dump data: %s", strerror(-n)); + log_error("Failed to read core data: %s", strerror(-n)); r = (int) n; goto finish; } else if (n == 0) @@ -259,13 +259,13 @@ int main(int argc, char* argv[]) { coredump_size += n; - if(coredump_size > COREDUMP_MAX) { - log_error("Coredump too large, ignoring"); + if (coredump_size > COREDUMP_MAX) { + log_error("Core too large, core will not be stored."); goto finalize; } if (!GREEDY_REALLOC(coredump_data, coredump_bufsize, coredump_size + 1)) { - r = log_oom(); + log_warning("Failed to allocate memory for core, core will not be stored."); goto finalize; } } @@ -277,7 +277,7 @@ int main(int argc, char* argv[]) { finalize: r = sd_journal_sendv(iovec, j); if (r < 0) - log_error("Failed to send coredump: %s", strerror(-r)); + log_error("Failed to log coredump: %s", strerror(-r)); finish: return r < 0 ? EXIT_FAILURE : EXIT_SUCCESS; |