From: Yu Watanabe Date: Fri, 19 Oct 2018 16:43:13 +0000 (+0900) Subject: coredump: include error cause in log message X-Git-Tag: v240~503^2~5 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=9d77ca39e5d25791cf93095349a7ddee26016002;p=thirdparty%2Fsystemd.git coredump: include error cause in log message --- 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':