[PATCH virt-manager] match usb device with vendorID, productID, bus, device

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



---
 src/virtManager/details.py |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/src/virtManager/details.py b/src/virtManager/details.py
index 5395087..379470d 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:
-- 
1.7.7.5


[Index of Archives]     [Linux Virtualization]     [KVM Development]     [CentOS Virtualization]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite Forum]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]     [Video 4 Linux]

  Powered by Linux