dom0: qvm-pci verify PCI device before adding
This commit is contained in:
parent
87ebdeefd4
commit
1d2680944c
@ -67,6 +67,9 @@ def main():
|
||||
exit (1)
|
||||
|
||||
pci = args[1]
|
||||
if not os.path.exists('/sys/bus/pci/devices/0000:%s' % pci):
|
||||
print "Invalid PCI device: %s" % pci
|
||||
exit(1)
|
||||
if vm.pcidevs.count(pci) == 0:
|
||||
vm.pcidevs.append(pci)
|
||||
qvm_collection.save()
|
||||
|
Loading…
Reference in New Issue
Block a user