chiark / gitweb /
use libsysfs to translate the class linke to the device path
authorKay Sievers <kay.sievers@suse.de>
Wed, 2 Nov 2005 03:05:06 +0000 (04:05 +0100)
committerKay Sievers <kay.sievers@suse.de>
Wed, 2 Nov 2005 03:05:06 +0000 (04:05 +0100)
Signed-off-by: Kay Sievers <kay.sievers@suse.de>
udevstart.c

index ce96f38879186c81d185f520393a2b18c4428166..057d59fcaa277210bfa39cefd41d77233f44a307 100644 (file)
@@ -139,7 +139,7 @@ static int add_device(const char *devpath, const char *subsystem)
                return -1;
        }
 
                return -1;
        }
 
-       udev_init_device(&udev, devpath, subsystem, "add");
+       udev_init_device(&udev, &class_dev->path[strlen(sysfs_path)], subsystem, "add");
        udev.devt = get_devt(class_dev);
        if (!udev.devt && udev.type != DEV_NET) {
                dbg("sysfs_open_class_device_path failed");
        udev.devt = get_devt(class_dev);
        if (!udev.devt && udev.type != DEV_NET) {
                dbg("sysfs_open_class_device_path failed");