- udev_init_device(&udev, devpath, subsystem);
- udev_add_device(&udev, class_dev);
+ udev_init_device(&udev, devpath, subsystem, "add");
+ udev.devt = get_devt(class_dev);
+ if (!udev.devt) {
+ dbg ("sysfs_open_class_device_path failed");
+ return -1;
+ }
+ udev_rules_get_name(&udev, class_dev);
+ if (udev.ignore_device) {
+ info("device event will be ignored");
+ goto exit;
+ }
+ if (udev.name[0] == '\0') {
+ info("device node creation supressed");
+ goto run;
+ }