]> err.no Git - systemd/commitdiff
[PATCH] add support for /devices-devices without any file to wait for
authorkay.sievers@vrfy.org <kay.sievers@vrfy.org>
Tue, 23 Nov 2004 02:55:24 +0000 (03:55 +0100)
committerGreg KH <gregkh@suse.de>
Wed, 27 Apr 2005 05:30:28 +0000 (22:30 -0700)
udev_sysfs.c

index a25223ef461248242e394a7dc1b57fcdc366c36e..7293407be1251fd2ca6fc0fe2ad9e133abc72278 100644 (file)
@@ -267,6 +267,7 @@ int wait_for_devices_device(struct sysfs_device *devices_dev,
                const char *file;
        } device_files[] = {
                { .bus = "scsi",        .file = "vendor" },
+               { .bus = "usb",         .file = NULL },
                { .bus = "usb",         .file = "idVendor" },
                { .bus = "usb",         .file = "iInterface" },
                { .bus = "usb",         .file = "bNumEndpoints" },
@@ -278,7 +279,7 @@ int wait_for_devices_device(struct sysfs_device *devices_dev,
                { .bus = "ieee1394",    .file = "node_count" },
                { .bus = "ieee1394",    .file = "nodeid" },
                { .bus = "ieee1394",    .file = "address" },
-               { .bus = "bttv-sub",    .file = "detach_state" },
+               { .bus = "bttv-sub",    .file = NULL },
                { .bus = "pnp",         .file = "detach_state" },
                { .bus = "eisa",        .file = "detach_state" },
                { .bus = "pseudo",      .file = "detach_state" },
@@ -338,6 +339,11 @@ int wait_for_devices_device(struct sysfs_device *devices_dev,
                                char filename[SYSFS_PATH_MAX];
                                struct stat stats;
 
+                               if (devicefile->file == NULL) {
+                                       dbg("bus '%s' has no file to wait for", devices_dev->bus);
+                                       return 0;
+                               }
+
                                found_bus_type = 1;
                                snprintf(filename, SYSFS_PATH_MAX-1, "%s/%s", devices_dev->path, devicefile->file);
                                dbg("looking at bus '%s' device for specific file '%s'", devices_dev->bus, filename);