From 9929d8b21e4605a50666d5cc04295fa9d6a8c9f8 Mon Sep 17 00:00:00 2001 From: Guannan Ren Date: Tue, 8 May 2012 21:37:17 +0800 Subject: [PATCH] match usb device with vendorID, productID, bus, device (crobinso: add Guannan to AUTHORS) --- AUTHORS | 1 + src/virtManager/details.py | 6 ++++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/AUTHORS b/AUTHORS index 024edc5f2..5090434d6 100644 --- a/AUTHORS +++ b/AUTHORS @@ -79,6 +79,7 @@ Further patches have been submitted by: Brian J. Murrell Tuomas Jormola Nathan Bird + Guannan Ren <...send a patch & get your name here...> diff --git a/src/virtManager/details.py b/src/virtManager/details.py index 5395087dd..379470d22 100644 --- a/src/virtManager/details.py +++ b/src/virtManager/details.py @@ -287,9 +287,11 @@ def lookup_nodedev(vmmconn, hostdev): devs = vmmconn.get_nodedevs(devtype, None) for dev in devs: - # Try to get info from {product|vendor}_id + # Try to match with product_id|vendor_id|bus|device if (attrVal(dev, "product_id") == product_id and - attrVal(dev, "vendor_id") == vendor_id): + attrVal(dev, "vendor_id") == vendor_id and + attrVal(dev, "bus") == bus and + attrVal(dev, "device") == device): found_dev = dev break else: