summaryrefslogtreecommitdiff
path: root/src/login
diff options
context:
space:
mode:
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2021-07-01 12:43:52 +0000
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2021-07-09 11:03:36 +0200
commit32fc5c4763513c882eed1f4495635b3833c4da9c (patch)
tree2d85da5714e2ac66bc1223a78942ab0425c346f3 /src/login
parent5291f26d4a6450d1fbf3656640ef20c5e78aa6a5 (diff)
downloadsystemd-32fc5c4763513c882eed1f4495635b3833c4da9c.tar.gz
tree-wide: add FORMAT_TIMESTAMP_RELATIVE()
Diffstat (limited to 'src/login')
-rw-r--r--src/login/loginctl.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/login/loginctl.c b/src/login/loginctl.c
index b4f6548183..318d71a28a 100644
--- a/src/login/loginctl.c
+++ b/src/login/loginctl.c
@@ -450,7 +450,6 @@ static int print_session_status_info(sd_bus *bus, const char *path, bool *new_li
_cleanup_(sd_bus_error_free) sd_bus_error error = SD_BUS_ERROR_NULL;
_cleanup_(sd_bus_message_unrefp) sd_bus_message *m = NULL;
- char since1[FORMAT_TIMESTAMP_RELATIVE_MAX];
const char *s1, *s2;
SessionStatusInfo i = {};
int r;
@@ -471,7 +470,7 @@ static int print_session_status_info(sd_bus *bus, const char *path, bool *new_li
else
printf("%"PRIu32"\n", i.uid);
- s1 = format_timestamp_relative(since1, sizeof(since1), i.timestamp.realtime);
+ s1 = FORMAT_TIMESTAMP_RELATIVE(i.timestamp.realtime);
s2 = FORMAT_TIMESTAMP(i.timestamp.realtime);
if (s1)
@@ -580,7 +579,6 @@ static int print_user_status_info(sd_bus *bus, const char *path, bool *new_line)
_cleanup_(sd_bus_error_free) sd_bus_error error = SD_BUS_ERROR_NULL;
_cleanup_(sd_bus_message_unrefp) sd_bus_message *m = NULL;
- char since1[FORMAT_TIMESTAMP_RELATIVE_MAX];
const char *s1, *s2;
_cleanup_(user_status_info_clear) UserStatusInfo i = {};
int r;
@@ -599,7 +597,7 @@ static int print_user_status_info(sd_bus *bus, const char *path, bool *new_line)
else
printf("%"PRIu32"\n", i.uid);
- s1 = format_timestamp_relative(since1, sizeof(since1), i.timestamp.realtime);
+ s1 = FORMAT_TIMESTAMP_RELATIVE(i.timestamp.realtime);
s2 = FORMAT_TIMESTAMP(i.timestamp.realtime);
if (s1)