summaryrefslogtreecommitdiff
path: root/udev_sysfs.c
diff options
context:
space:
mode:
authorkay.sievers@vrfy.org <kay.sievers@vrfy.org>2004-11-23 03:55:24 +0100
committerGreg KH <gregkh@suse.de>2005-04-26 22:30:28 -0700
commit7a0643a93f53cd5e7a05ae3d0c384e9e3160a94f (patch)
tree5418b853f3d2cf6f8352a8e94a7299628972b700 /udev_sysfs.c
parentff5761c9727a5df9ac348fb9f8feed2469d6861f (diff)
[PATCH] add support for /devices-devices without any file to wait for
Diffstat (limited to 'udev_sysfs.c')
-rw-r--r--udev_sysfs.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/udev_sysfs.c b/udev_sysfs.c
index a25223ef46..7293407be1 100644
--- a/udev_sysfs.c
+++ b/udev_sysfs.c
@@ -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);