+ if (dev->ignore_remove) {
+ udev->ignore_remove = 1;
+ dbg_parse("remove event should be ignored");
+ }
+ /* apply all_partitions option only at a main block device */
+ if (dev->partitions && udev->type == BLOCK && udev->kernel_number[0] == '\0') {
+ udev->partitions = dev->partitions;
+ dbg("creation of partition nodes requested");
+ }
+
+ /* apply permissions */
+ if (dev->mode != 0000) {
+ udev->mode = dev->mode;
+ dbg("applied mode=%#o to '%s'", udev->mode, udev->kernel_name);
+ }
+ if (dev->owner[0] != '\0') {
+ strlcpy(udev->owner, dev->owner, sizeof(udev->owner));
+ apply_format(udev, udev->owner, sizeof(udev->owner), class_dev, sysfs_device);
+ dbg("applied owner='%s' to '%s'", udev->owner, udev->kernel_name);
+ }
+ if (dev->group[0] != '\0') {
+ strlcpy(udev->group, dev->group, sizeof(udev->group));
+ apply_format(udev, udev->group, sizeof(udev->group), class_dev, sysfs_device);
+ dbg("applied group='%s' to '%s'", udev->group, udev->kernel_name);
+ }