]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
udev-event: fix timeout log messages
authorYu Watanabe <watanabe.yu+github@gmail.com>
Mon, 29 Oct 2018 13:37:14 +0000 (22:37 +0900)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Wed, 31 Oct 2018 00:29:51 +0000 (09:29 +0900)
Follow-up for e81c3a4c5fbbea89fe6c1e3d0ace669b8130aa92.

src/udev/udev-event.c

index 65f66cd1304d67df147ac181bacd49f9b1b58571..a0f6a5daa48ace5751a0089103047bfe95edf4b9 100644 (file)
@@ -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;
 }