From 0086ef19cb9fb2ad3698c2ef51681e6c77eff957 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= Date: Mon, 5 Jul 2021 21:41:59 +0200 Subject: tree-wide: add FORMAT_TIMESTAMP_STYLE() --- src/systemctl/systemctl-logind.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/systemctl/systemctl-logind.c') diff --git a/src/systemctl/systemctl-logind.c b/src/systemctl/systemctl-logind.c index 28dd25b523..b1c0e13f2c 100644 --- a/src/systemctl/systemctl-logind.c +++ b/src/systemctl/systemctl-logind.c @@ -296,7 +296,6 @@ int logind_schedule_shutdown(void) { #if ENABLE_LOGIND _cleanup_(sd_bus_error_free) sd_bus_error error = SD_BUS_ERROR_NULL; - char date[FORMAT_TIMESTAMP_MAX]; const char *action; const char *log_action; sd_bus *bus; @@ -340,7 +339,9 @@ int logind_schedule_shutdown(void) { return log_warning_errno(r, "Failed to call ScheduleShutdown in logind, proceeding with immediate shutdown: %s", bus_error_message(&error, r)); if (!arg_quiet) - log_info("%s scheduled for %s, use 'shutdown -c' to cancel.", log_action, format_timestamp_style(date, sizeof(date), arg_when, arg_timestamp_style)); + log_info("%s scheduled for %s, use 'shutdown -c' to cancel.", + log_action, + FORMAT_TIMESTAMP_STYLE(arg_when, arg_timestamp_style)); return 0; #else return log_error_errno(SYNTHETIC_ERRNO(ENOSYS), -- cgit v1.2.1