From 4375dab58ddba8a8e763143db3815a99e23e4da3 Mon Sep 17 00:00:00 2001 From: Yu Watanabe Date: Mon, 29 Oct 2018 22:37:14 +0900 Subject: udev-event: fix timeout log messages Follow-up for e81c3a4c5fbbea89fe6c1e3d0ace669b8130aa92. --- src/udev/udev-event.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src') diff --git a/src/udev/udev-event.c b/src/udev/udev-event.c index 65f66cd130..a0f6a5daa4 100644 --- a/src/udev/udev-event.c +++ b/src/udev/udev-event.c @@ -475,26 +475,26 @@ static int on_spawn_io(sd_event_source *s, int fd, uint32_t revents, void *userd static int on_spawn_timeout(sd_event_source *s, uint64_t usec, void *userdata) { Spawn *spawn = userdata; - char timeout[FORMAT_TIMESTAMP_RELATIVE_MAX]; + char timeout[FORMAT_TIMESPAN_MAX]; assert(spawn); kill_and_sigcont(spawn->pid, SIGKILL); log_error("Spawned process '%s' ["PID_FMT"] timed out after %s, killing", spawn->cmd, spawn->pid, - format_timestamp_relative(timeout, sizeof(timeout), spawn->timeout_usec)); + format_timespan(timeout, sizeof(timeout), spawn->timeout_usec, USEC_PER_SEC)); return 1; } static int on_spawn_timeout_warning(sd_event_source *s, uint64_t usec, void *userdata) { Spawn *spawn = userdata; - char timeout[FORMAT_TIMESTAMP_RELATIVE_MAX]; + char timeout[FORMAT_TIMESPAN_MAX]; assert(spawn); log_warning("Spawned process '%s' ["PID_FMT"] is taking longer than %s to complete", spawn->cmd, spawn->pid, - format_timestamp_relative(timeout, sizeof(timeout), spawn->timeout_warn_usec)); + format_timespan(timeout, sizeof(timeout), spawn->timeout_warn_usec, USEC_PER_SEC)); return 1; } -- cgit v1.2.3