summaryrefslogtreecommitdiffstats
path: root/src/coredump
diff options
context:
space:
mode:
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2021-07-01 14:43:52 +0200
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2021-07-09 11:03:36 +0200
commit32fc5c4763513c882eed1f4495635b3833c4da9c (patch)
tree2d85da5714e2ac66bc1223a78942ab0425c346f3 /src/coredump
parenttree-wide: add FORMAT_TIMESPAN() (diff)
downloadsystemd-32fc5c4763513c882eed1f4495635b3833c4da9c.tar.xz
systemd-32fc5c4763513c882eed1f4495635b3833c4da9c.zip
tree-wide: add FORMAT_TIMESTAMP_RELATIVE()
Diffstat (limited to 'src/coredump')
-rw-r--r--src/coredump/coredumpctl.c12
1 files changed, 4 insertions, 8 deletions
diff --git a/src/coredump/coredumpctl.c b/src/coredump/coredumpctl.c
index 556670468a..c1969d12f5 100644
--- a/src/coredump/coredumpctl.c
+++ b/src/coredump/coredumpctl.c
@@ -645,15 +645,11 @@ static int print_info(FILE *file, sd_journal *j, bool need_space) {
usec_t u;
r = safe_atou64(timestamp, &u);
- if (r >= 0) {
- char relative[FORMAT_TIMESPAN_MAX];
+ if (r >= 0)
+ fprintf(file, " Timestamp: %s (%s)\n",
+ FORMAT_TIMESTAMP(u), FORMAT_TIMESTAMP_RELATIVE(u));
- fprintf(file,
- " Timestamp: %s (%s)\n",
- FORMAT_TIMESTAMP(u),
- format_timestamp_relative(relative, sizeof(relative), u));
-
- } else
+ else
fprintf(file, " Timestamp: %s\n", timestamp);
}