diff options
author | Yu Watanabe <watanabe.yu+github@gmail.com> | 2018-11-08 17:40:15 +0900 |
---|---|---|
committer | Yu Watanabe <watanabe.yu+github@gmail.com> | 2018-11-17 21:45:03 +0900 |
commit | dc7faf2a6fd8667cd1b83daa97753ddfc3f0e451 (patch) | |
tree | 57241f75cdb33c5775f46f0314147e38fbe2f560 | |
parent | e2130348ef4f1937f3c0cbabd054d649b4069b97 (diff) | |
download | systemd-dc7faf2a6fd8667cd1b83daa97753ddfc3f0e451.tar.gz |
udevd: capitalize log messages in on_sigchld()
-rw-r--r-- | src/udev/udevd.c | 22 |
1 files changed, 13 insertions, 9 deletions
diff --git a/src/udev/udevd.c b/src/udev/udevd.c index 4e407b4e9a..db7c187b9c 100644 --- a/src/udev/udevd.c +++ b/src/udev/udevd.c @@ -1264,33 +1264,37 @@ static int on_sigchld(sd_event_source *s, const struct signalfd_siginfo *si, voi worker = hashmap_get(manager->workers, PID_TO_PTR(pid)); if (!worker) { - log_warning("worker ["PID_FMT"] is unknown, ignoring", pid); + log_warning("Worker ["PID_FMT"] is unknown, ignoring", pid); continue; } if (WIFEXITED(status)) { if (WEXITSTATUS(status) == 0) - log_debug("worker ["PID_FMT"] exited", pid); + log_debug("Worker ["PID_FMT"] exited", pid); else - log_warning("worker ["PID_FMT"] exited with return code %i", pid, WEXITSTATUS(status)); + log_warning("Worker ["PID_FMT"] exited with return code %i", pid, WEXITSTATUS(status)); } else if (WIFSIGNALED(status)) { - log_warning("worker ["PID_FMT"] terminated by signal %i (%s)", pid, WTERMSIG(status), signal_to_string(WTERMSIG(status))); + log_warning("Worker ["PID_FMT"] terminated by signal %i (%s)", pid, WTERMSIG(status), signal_to_string(WTERMSIG(status))); } else if (WIFSTOPPED(status)) { - log_info("worker ["PID_FMT"] stopped", pid); + log_info("Worker ["PID_FMT"] stopped", pid); continue; } else if (WIFCONTINUED(status)) { - log_info("worker ["PID_FMT"] continued", pid); + log_info("Worker ["PID_FMT"] continued", pid); continue; } else - log_warning("worker ["PID_FMT"] exit with status 0x%04x", pid, status); + log_warning("Worker ["PID_FMT"] exit with status 0x%04x", pid, status); if ((!WIFEXITED(status) || WEXITSTATUS(status) != 0) && worker->event) { - log_error("worker ["PID_FMT"] failed while handling '%s'", pid, worker->event->devpath); + log_device_error(worker->event->dev->device, "Worker ["PID_FMT"] failed", pid); + /* delete state from disk */ udev_device_delete_db(worker->event->dev); udev_device_tag_index(worker->event->dev, NULL, false); + /* forward kernel event without amending it */ - device_monitor_send_device(manager->monitor, NULL, worker->event->dev_kernel->device); + r = device_monitor_send_device(manager->monitor, NULL, worker->event->dev_kernel->device); + if (r < 0) + log_device_error_errno(worker->event->dev_kernel->device, r, "Failed to send back device to kernel: %m"); } worker_free(worker); |