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" },
{ .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" },
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);