diff options
author | pbrook <pbrook@c046a42c-6fe2-441c-8c8c-71466251a162> | 2006-03-11 18:03:38 +0000 |
---|---|---|
committer | pbrook <pbrook@c046a42c-6fe2-441c-8c8c-71466251a162> | 2006-03-11 18:03:38 +0000 |
commit | 38ca0f6deebe286a521d6dfaf6583e9216b441ee (patch) | |
tree | 965ce9055f7fc5d9793c15f63504d4f11c976b9b /usb-linux.c | |
parent | 09c56b842ee3a1e5efbf98540408cdcafe451ab0 (diff) | |
download | qemu-38ca0f6deebe286a521d6dfaf6583e9216b441ee.zip qemu-38ca0f6deebe286a521d6dfaf6583e9216b441ee.tar.gz qemu-38ca0f6deebe286a521d6dfaf6583e9216b441ee.tar.bz2 |
Tweak UHCI device settings. Ignore host root hubs.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@1779 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'usb-linux.c')
-rw-r--r-- | usb-linux.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/usb-linux.c b/usb-linux.c index 216ac20..9cd543d 100644 --- a/usb-linux.c +++ b/usb-linux.c @@ -278,7 +278,8 @@ static int usb_host_scan(void *opaque, USBScanFunc *func) if (strlen(line) > 0) line[strlen(line) - 1] = '\0'; if (line[0] == 'T' && line[1] == ':') { - if (device_count) { + if (device_count && (vendor_id || product_id)) { + /* New device. Add the previously discovered device. */ ret = func(opaque, bus_num, addr, class_id, vendor_id, product_id, product_name, speed); if (ret) @@ -321,7 +322,8 @@ static int usb_host_scan(void *opaque, USBScanFunc *func) } fail: ; } - if (device_count) { + if (device_count && (vendor_id || product_id)) { + /* Add the last device. */ ret = func(opaque, bus_num, addr, class_id, vendor_id, product_id, product_name, speed); } |