diff options
| author | Anthony Liguori <aliguori@us.ibm.com> | 2011-11-21 14:44:04 -0600 |
|---|---|---|
| committer | Anthony Liguori <aliguori@us.ibm.com> | 2011-11-21 14:44:04 -0600 |
| commit | a3baf1be673221752c82015b4b9157f23dfc6fd6 (patch) | |
| tree | bc9fbbeac65a1ce15d9c85f3c468437356e28bef /usb-linux.c | |
| parent | 1571b6cba25df6d000b2539b8ba399839d15f9b6 (diff) | |
| parent | 0cd0fd0867005a0344d06c01fff8f8a66b3d2ecb (diff) | |
| download | focaccia-qemu-a3baf1be673221752c82015b4b9157f23dfc6fd6.tar.gz focaccia-qemu-a3baf1be673221752c82015b4b9157f23dfc6fd6.zip | |
Merge remote-tracking branch 'kraxel/usb.31' into staging
Diffstat (limited to 'usb-linux.c')
| -rw-r--r-- | usb-linux.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/usb-linux.c b/usb-linux.c index f086d57edb..d4426ea730 100644 --- a/usb-linux.c +++ b/usb-linux.c @@ -1568,7 +1568,12 @@ static int usb_host_scan_dev(void *opaque, USBScanFunc *func) if (line[0] == 'T' && line[1] == ':') { if (device_count && (vendor_id || product_id)) { /* New device. Add the previously discovered device. */ - ret = func(opaque, bus_num, addr, 0, class_id, vendor_id, + if (port > 0) { + snprintf(buf, sizeof(buf), "%d", port); + } else { + snprintf(buf, sizeof(buf), "?"); + } + ret = func(opaque, bus_num, addr, buf, class_id, vendor_id, product_id, product_name, speed); if (ret) { goto the_end; |