From 67ca619ee5ba81e6c0845bcdcf60747957cf19a0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20Marczykowski-G=C3=B3recki?= Date: Fri, 27 Nov 2015 22:56:55 +0100 Subject: [PATCH] qvm-pci: fix PCI device id (BDF) regexp Actually BDF is in hex... Fixes QubesOS/qubes-issues#1461 --- qvm-tools/qvm-pci | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/qvm-tools/qvm-pci b/qvm-tools/qvm-pci index c9c715ec..90a1aed6 100755 --- a/qvm-tools/qvm-pci +++ b/qvm-tools/qvm-pci @@ -38,8 +38,8 @@ def find_devices_of_class(klass): print "ERROR when executing lspci!" raise IOError - rx_netdev = re.compile(r"^([0-9][0-9]:[0-9][0-9].[0-9]) \"{}".format( - klass)) + rx_netdev = re.compile(r"^([0-9a-f]{2}:[0-9a-f]{2}.[0-9a-f]) \"" + + klass) for dev in str(result[0]).splitlines(): match = rx_netdev.match(dev) if match is not None: