Revision 55496240

b/usb-linux.c
1265 1265

  
1266 1266
    /* only check the host once */
1267 1267
    if (!usb_fs_type) {
1268
        dir = opendir(USBSYSBUS_PATH "/devices");
1269
        if (dir) {
1270
            /* devices found in /dev/bus/usb/ (yes - not a mistake!) */
1271
            strcpy(devpath, USBDEVBUS_PATH);
1272
            usb_fs_type = USB_FS_SYS;
1273
            closedir(dir);
1274
            dprintf(USBDBG_DEVOPENED, USBSYSBUS_PATH);
1275
            goto found_devices;
1276
        }
1268 1277
        f = fopen(USBPROCBUS_PATH "/devices", "r");
1269 1278
        if (f) {
1270 1279
            /* devices found in /proc/bus/usb/ */
......
1284 1293
            dprintf(USBDBG_DEVOPENED, USBDEVBUS_PATH);
1285 1294
            goto found_devices;
1286 1295
        }
1287
        dir = opendir(USBSYSBUS_PATH "/devices");
1288
        if (dir) {
1289
            /* devices found in /dev/bus/usb/ (yes - not a mistake!) */
1290
            strcpy(devpath, USBDEVBUS_PATH);
1291
            usb_fs_type = USB_FS_SYS;
1292
            closedir(dir);
1293
            dprintf(USBDBG_DEVOPENED, USBSYSBUS_PATH);
1294
            goto found_devices;
1295
        }
1296 1296
    found_devices:
1297 1297
        if (!usb_fs_type) {
1298 1298
            monitor_printf(mon, "husb: unable to access USB devices\n");

Also available in: Unified diff