]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
coredump: include error cause in log message
authorYu Watanabe <watanabe.yu+github@gmail.com>
Fri, 19 Oct 2018 16:43:13 +0000 (01:43 +0900)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Fri, 19 Oct 2018 16:43:13 +0000 (01:43 +0900)
src/coredump/coredump.c
src/coredump/coredumpctl.c

index d3fc059fbb5733b4d2af2ddf854d51098726feaa..e54c69a93104f94726e794f4ab479430a63e54ff 100644 (file)
@@ -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
index 8c08c64884cbba925309b6e5dce319fdeb24edff..49df8656b6ca085f97092e9bf4bbeeadd6d6c9d4 100644 (file)
@@ -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':