chiark / gitweb /
build-sys: use --libexecdir=/usr/lib instead of /usr/lib/udev
[elogind.git] / udev / udevd.c
index f810b9431c6410bcdcd0ecf4bf774abd6300608f..196e63fd0d02483ee76b8d7a65085029f5d8699b 100644 (file)
@@ -398,7 +398,7 @@ out:
        }
 }
 
-static void event_run(struct event *event, bool force)
+static void event_run(struct event *event)
 {
        struct udev_list_node *loop;
 
@@ -423,7 +423,7 @@ static void event_run(struct event *event, bool force)
                return;
        }
 
-       if (!force && children >= children_max) {
+       if (children >= children_max) {
                if (children_max > 1)
                        info(event->udev, "maximum number (%i) of children reached\n", children);
                return;
@@ -457,13 +457,6 @@ static int event_queue_insert(struct udev_device *dev)
 
        event->state = EVENT_QUEUED;
        udev_list_node_append(&event->node, &event_list);
-
-       /* run all events with a timeout set immediately */
-       if (udev_device_get_timeout(dev) > 0) {
-               event_run(event, true);
-               return 0;
-       }
-
        return 0;
 }
 
@@ -580,7 +573,7 @@ static void event_queue_start(struct udev *udev)
                        continue;
                }
 
-               event_run(event, false);
+               event_run(event);
        }
 }
 
@@ -870,11 +863,10 @@ static void static_dev_create_from_modules(struct udev *udev)
                if (sscanf(devno, "%c%u:%u", &type, &maj, &min) != 3)
                        continue;
 
-               /* set sticky bit, so we do not remove the node on module unload */
                if (type == 'c')
-                       mode = 01600|S_IFCHR;
+                       mode = S_IFCHR;
                else if (type == 'b')
-                       mode = 01600|S_IFBLK;
+                       mode = S_IFBLK;
                else
                        continue;
 
@@ -984,7 +976,7 @@ static void static_dev_create_from_devices(struct udev *udev, DIR *dir)
 {
        DIR *dir_from;
 
-       dir_from = opendir(LIBEXECDIR "/devices");
+       dir_from = opendir(PKGLIBEXECDIR "/devices");
        if (dir_from == NULL)
                return;
        copy_dev_dir(udev, dir_from, dir, 8);
@@ -1318,6 +1310,9 @@ int main(int argc, char *argv[])
        chdir("/");
        umask(022);
 
+       /* /run/udev */
+       mkdir(udev_get_run_path(udev), 0755);
+
        /* create standard links, copy static nodes, create nodes from modules */
        static_dev_create(udev);
        static_dev_create_from_modules(udev);