X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=blobdiff_plain;f=udev%2Fudevd.c;h=c27b4cd6aa2cd13052335d9433ee5ef74a5d4cb0;hb=e9906fec711192761f27468244d3012041bcb0ee;hp=170225d00c85457f2fbdb735fb08e405c847190d;hpb=f46d2e54a82086eddcd9cd91e7908e87d7424148;p=elogind.git diff --git a/udev/udevd.c b/udev/udevd.c index 170225d00..c27b4cd6a 100644 --- a/udev/udevd.c +++ b/udev/udevd.c @@ -168,7 +168,7 @@ static void event_queue_delete(struct event *event) udev_list_node_remove(&event->node); /* mark as failed, if "add" event returns non-zero */ - if (event->exitcode != 0 && strcmp(udev_device_get_action(event->dev), "add") == 0) + if (event->exitcode != 0 && strcmp(udev_device_get_action(event->dev), "remove") != 0) udev_queue_export_device_failed(udev_queue_export, event->dev); else udev_queue_export_device_finished(udev_queue_export, event->dev); @@ -887,15 +887,15 @@ int main(int argc, char *argv[]) if (udev_get_rules_path(udev) != NULL) { inotify_add_watch(pfd[FD_INOTIFY].fd, udev_get_rules_path(udev), - IN_CREATE | IN_DELETE | IN_MOVE | IN_CLOSE_WRITE); + IN_DELETE | IN_MOVE | IN_CLOSE_WRITE); } else { char filename[UTIL_PATH_SIZE]; struct stat statbuf; inotify_add_watch(pfd[FD_INOTIFY].fd, LIBEXECDIR "/rules.d", - IN_CREATE | IN_DELETE | IN_MOVE | IN_CLOSE_WRITE); + IN_DELETE | IN_MOVE | IN_CLOSE_WRITE); inotify_add_watch(pfd[FD_INOTIFY].fd, SYSCONFDIR "/udev/rules.d", - IN_CREATE | IN_DELETE | IN_MOVE | IN_CLOSE_WRITE); + IN_DELETE | IN_MOVE | IN_CLOSE_WRITE); /* watch dynamic rules directory */ util_strscpyl(filename, sizeof(filename), udev_get_dev_path(udev), "/.udev/rules.d", NULL); @@ -906,7 +906,7 @@ int main(int argc, char *argv[]) udev_selinux_resetfscreatecon(udev); } inotify_add_watch(pfd[FD_INOTIFY].fd, filename, - IN_CREATE | IN_DELETE | IN_MOVE | IN_CLOSE_WRITE); + IN_DELETE | IN_MOVE | IN_CLOSE_WRITE); } udev_watch_restore(udev);