Commit 22babebbaa17c0c0c134ea4f5eaf5cbbd68472ab

Authored by aliguori
1 parent 26d67362

Fix broken USB support for Linux host (Bjorn Danielsson)

Make "host:" usb devices work again on systems that have the
file /proc/bus/usb/devices. This was broken in r5441 due to
incorrect logic for the USB_FS_SYS case in usb_host_scan().

Signed-off-by: Bjorn Danielsson <bdq@dax.nu>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>



git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5507 c046a42c-6fe2-441c-8c8c-71466251a162
Showing 1 changed file with 2 additions and 1 deletions
usb-linux.c
@@ -1293,7 +1293,8 @@ static int usb_host_scan(void *opaque, USBScanFunc *func) @@ -1293,7 +1293,8 @@ static int usb_host_scan(void *opaque, USBScanFunc *func)
1293 usb_fs_type = USB_FS_SYS; 1293 usb_fs_type = USB_FS_SYS;
1294 closedir(dir); 1294 closedir(dir);
1295 dprintf(opened, USBSYSBUS_PATH, devices); 1295 dprintf(opened, USBSYSBUS_PATH, devices);
1296 - } else { 1296 + }
  1297 + if (!usb_fs_type) {
1297 term_printf("husb: unable to access USB devices\n"); 1298 term_printf("husb: unable to access USB devices\n");
1298 goto the_end; 1299 goto the_end;
1299 } 1300 }