- o kill path_id.sh (add fc, sas, iscsi to C version)
+ o enumerate: sort control* after pcm*
o add tests for kernel provided DEVNAME logic
o drop modprobe floppy alias (SUSE), it will be in the module (2.6.30)
o remove MMC rules, they got a modalias now (2.6.30)
o add scsi:t-0x09* to "ch" and remove modprobe rule (2.6.30)
-
o drop all support for the DEPRECATED sysfs layout
o "udevadm control" commands will only accept the --<command> syntax
o symlink names to udevadm will no longer be resolved to old command names
else
udev_queue_export_device_finished(udev_queue_export, event->dev);
+ info(event->udev, "seq %llu done with %i\n", udev_device_get_seqnum(event->dev), event->exitcode);
udev_device_unref(event->dev);
free(event);
}
/* send processed event back to libudev listeners */
udev_monitor_send_device(worker_monitor, NULL, dev);
- info(event->udev, "seq %llu finished with %i\n", udev_device_get_seqnum(dev), err);
+ info(event->udev, "seq %llu processed with %i\n", udev_device_get_seqnum(dev), err);
udev_device_unref(dev);
udev_event_unref(udev_event);
buf = malloc(nbytes);
if (buf == NULL) {
- err(udev, "error getting buffer for inotify, disable watching\n");
+ err(udev, "error getting buffer for inotify\n");
return -1;
}
return 0;
}
-static void handle_signal(int signo)
+static void handle_signal(struct udev *udev, int signo)
{
switch (signo) {
case SIGINT:
case SIGCHLD:
while (1) {
pid_t pid;
+ int status;
struct udev_list_node *loop, *tmp;
- pid = waitpid(-1, NULL, WNOHANG);
+ pid = waitpid(-1, &status, WNOHANG);
if (pid <= 0)
break;
/* fail event, if worker died unexpectedly */
if (worker->event != NULL) {
- worker->event->exitcode = 127;
+ int exitcode;
+
+ if (WIFEXITED(status))
+ exitcode = WEXITSTATUS(status);
+ else if (WIFSIGNALED(status))
+ exitcode = WTERMSIG(status) + 128;
+ else
+ exitcode = 0;
+ worker->event->exitcode = exitcode;
+ err(udev, "worker [%u] unexpectedly returned with %i\n", pid, exitcode);
event_queue_delete(worker->event);
}
/* OOM_DISABLE == -17 */
fd = open("/proc/self/oom_adj", O_RDWR);
- if (fd < 0)
+ if (fd < 0) {
err(udev, "error disabling OOM: %m\n");
- else {
+ } else {
write(fd, "-17", 3);
close(fd);
}
size = read(pfd[FD_SIGNAL].fd, &fdsi, sizeof(struct signalfd_siginfo));
if (size == sizeof(struct signalfd_siginfo))
- handle_signal(fdsi.ssi_signo);
+ handle_signal(udev, fdsi.ssi_signo);
}
/* device node and rules directory inotify watch */