From 9d77ca39e5d25791cf93095349a7ddee26016002 Mon Sep 17 00:00:00 2001 From: Yu Watanabe Date: Sat, 20 Oct 2018 01:43:13 +0900 Subject: [PATCH] coredump: include error cause in log message --- src/coredump/coredump.c | 2 +- src/coredump/coredumpctl.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/coredump/coredump.c b/src/coredump/coredump.c index d3fc059fbb5..e54c69a9310 100644 --- a/src/coredump/coredump.c +++ b/src/coredump/coredump.c @@ -340,7 +340,7 @@ static int save_external_coredump( r = safe_atou64(context[CONTEXT_RLIMIT], &rlimit); if (r < 0) - return log_error_errno(r, "Failed to parse resource limit: %s", context[CONTEXT_RLIMIT]); + return log_error_errno(r, "Failed to parse resource limit '%s': %m", context[CONTEXT_RLIMIT]); if (rlimit < page_size()) { /* Is coredumping disabled? Then don't bother saving/processing the coredump. * Anything below PAGE_SIZE cannot give a readable coredump (the kernel uses diff --git a/src/coredump/coredumpctl.c b/src/coredump/coredumpctl.c index 8c08c64884c..49df8656b6c 100644 --- a/src/coredump/coredumpctl.c +++ b/src/coredump/coredumpctl.c @@ -237,13 +237,13 @@ static int parse_argv(int argc, char *argv[]) { case 'S': r = parse_timestamp(optarg, &arg_since); if (r < 0) - return log_error_errno(r, "Failed to parse timestamp: %s", optarg); + return log_error_errno(r, "Failed to parse timestamp '%s': %m", optarg); break; case 'U': r = parse_timestamp(optarg, &arg_until); if (r < 0) - return log_error_errno(r, "Failed to parse timestamp: %s", optarg); + return log_error_errno(r, "Failed to parse timestamp '%s': %m", optarg); break; case 'F': -- 2.47.3