summaryrefslogtreecommitdiff
path: root/src/udev/udevd.c
diff options
context:
space:
mode:
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2015-01-20 22:22:15 -0500
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2015-01-22 01:14:52 -0500
commit1fa2f38f0f011010bf57522b42fcc168856a7003 (patch)
tree7bd1a23716379826ef6cd37f98c2f02470a2d5c4 /src/udev/udevd.c
parent8facc3498ed037f842891ff55d1f60fe834f4ba0 (diff)
Assorted format fixes
Types used for pids and uids in various interfaces are unpredictable. Too bad.
Diffstat (limited to 'src/udev/udevd.c')
-rw-r--r--src/udev/udevd.c25
1 files changed, 13 insertions, 12 deletions
diff --git a/src/udev/udevd.c b/src/udev/udevd.c
index 009e39523c..009e2fed75 100644
--- a/src/udev/udevd.c
+++ b/src/udev/udevd.c
@@ -158,7 +158,7 @@ static void worker_unref(struct worker *worker) {
worker->refcount--;
if (worker->refcount > 0)
return;
- log_debug("worker [%u] cleaned up", worker->pid);
+ log_debug("worker ["PID_FMT"] cleaned up", worker->pid);
worker_cleanup(worker);
}
@@ -414,7 +414,7 @@ out:
event->state = EVENT_RUNNING;
udev_list_node_append(&worker->node, &worker_list);
children++;
- log_debug("seq %llu forked new worker [%u]", udev_device_get_seqnum(event->dev), pid);
+ log_debug("seq %llu forked new worker ["PID_FMT"]", udev_device_get_seqnum(event->dev), pid);
break;
}
}
@@ -431,7 +431,8 @@ static void event_run(struct event *event) {
count = udev_monitor_send_device(monitor, worker->monitor, event->dev);
if (count < 0) {
- log_error_errno(errno, "worker [%u] did not accept message %zi (%m), kill it", worker->pid, count);
+ log_error_errno(errno, "worker ["PID_FMT"] did not accept message %zi (%m), kill it",
+ worker->pid, count);
kill(worker->pid, SIGKILL);
worker->state = WORKER_KILLED;
continue;
@@ -869,26 +870,26 @@ static void handle_signal(struct udev *udev, int signo) {
if (worker->pid != pid)
continue;
- log_debug("worker [%u] exit", pid);
+ log_debug("worker ["PID_FMT"] exit", pid);
if (WIFEXITED(status)) {
if (WEXITSTATUS(status) != 0)
- log_error("worker [%u] exit with return code %i",
+ log_error("worker ["PID_FMT"] exit with return code %i",
pid, WEXITSTATUS(status));
} else if (WIFSIGNALED(status)) {
- log_error("worker [%u] terminated by signal %i (%s)",
+ log_error("worker ["PID_FMT"] terminated by signal %i (%s)",
pid, WTERMSIG(status), strsignal(WTERMSIG(status)));
} else if (WIFSTOPPED(status)) {
- log_error("worker [%u] stopped", pid);
+ log_error("worker ["PID_FMT"] stopped", pid);
} else if (WIFCONTINUED(status)) {
- log_error("worker [%u] continued", pid);
+ log_error("worker ["PID_FMT"] continued", pid);
} else {
- log_error("worker [%u] exit with status 0x%04x", pid, status);
+ log_error("worker ["PID_FMT"] exit with status 0x%04x", pid, status);
}
if (!WIFEXITED(status) || WEXITSTATUS(status) != 0) {
if (worker->event) {
- log_error("worker [%u] failed while handling '%s'",
+ log_error("worker ["PID_FMT"] failed while handling '%s'",
pid, worker->event->devpath);
worker->event->exitcode = -32;
event_queue_delete(worker->event);
@@ -1409,7 +1410,7 @@ int main(int argc, char *argv[]) {
if ((ts - worker->event_start_usec) > arg_event_timeout_warn_usec) {
if ((ts - worker->event_start_usec) > arg_event_timeout_usec) {
- log_error("worker [%u] %s timeout; kill it", worker->pid, worker->event->devpath);
+ log_error("worker ["PID_FMT"] %s timeout; kill it", worker->pid, worker->event->devpath);
kill(worker->pid, SIGKILL);
worker->state = WORKER_KILLED;
@@ -1420,7 +1421,7 @@ int main(int argc, char *argv[]) {
event_queue_delete(worker->event);
worker->event = NULL;
} else if (!worker->event_warned) {
- log_warning("worker [%u] %s is taking a long time", worker->pid, worker->event->devpath);
+ log_warning("worker ["PID_FMT"] %s is taking a long time", worker->pid, worker->event->devpath);
worker->event_warned = true;
}
}