summaryrefslogtreecommitdiff
path: root/src/systemctl/systemctl-logind.c
diff options
context:
space:
mode:
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2021-07-05 21:41:59 +0200
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2021-07-09 11:03:36 +0200
commit0086ef19cb9fb2ad3698c2ef51681e6c77eff957 (patch)
tree333789f80c80b80aaddd13d14fcf97598355d4ef /src/systemctl/systemctl-logind.c
parent6dc57047ff0f1f9e98938ffb172dae06e6868b94 (diff)
downloadsystemd-0086ef19cb9fb2ad3698c2ef51681e6c77eff957.tar.gz
tree-wide: add FORMAT_TIMESTAMP_STYLE()
Diffstat (limited to 'src/systemctl/systemctl-logind.c')
-rw-r--r--src/systemctl/systemctl-logind.c5
1 files changed, 3 insertions, 2 deletions
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),