chiark / gitweb /
udevcontrol: add max_childs command
[elogind.git] / udev_add.c
index b1e7265a3c381bc60fe23cf2f462e67b53252c20..2081e503c7d33d8eb5f0cee4cbd0f09684665ef3 100644 (file)
@@ -221,7 +221,7 @@ static int create_node(struct udevice *udev, struct sysfs_class_device *class_de
                dbg("symlink(%s, %s)", linktarget, filename);
                if (!udev->test_run) {
                        unlink(filename);
-                       selinux_setfscreatecon(filename, udev->kernel_name, S_IFLNK);
+                       selinux_setfscreatecon(filename, NULL, S_IFLNK);
                        retval = symlink(linktarget, filename);
                        selinux_resetfscreatecon();
                        if (retval != 0)
@@ -268,22 +268,7 @@ int udev_add_device(struct udevice *udev, struct sysfs_class_device *class_dev)
        char *pos;
        int retval = 0;
 
-       if (udev->type == DEV_BLOCK || udev->type == DEV_CLASS) {
-               udev->devt = get_devt(class_dev);
-               if (!udev->devt) {
-                       dbg("no dev-file found, do nothing");
-                       return 0;
-               }
-       }
-
-       udev_rules_get_name(udev, class_dev);
-       if (udev->ignore_device) {
-               dbg("device event will be ignored");
-               return 0;
-       }
-
        dbg("adding name='%s'", udev->name);
-
        selinux_init();
 
        if (udev->type == DEV_BLOCK || udev->type == DEV_CLASS) {
@@ -325,6 +310,5 @@ int udev_add_device(struct udevice *udev, struct sysfs_class_device *class_dev)
 
 exit:
        selinux_exit();
-
        return retval;
 }