qvm-pci: fix PCI device id (BDF) regexp
Actually BDF is in hex... Fixes QubesOS/qubes-issues#1461
This commit is contained in:
parent
b114d291ca
commit
67ca619ee5
@ -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:
|
||||
|
Loading…
Reference in New Issue
Block a user