feature #4620: Add PCI_ID to PCI devices

(cherry picked from commit 086ccd4f09)
This commit is contained in:
Ruben S. Montero committed 2016-07-18 19:20:02 +02:00
1 parent 89b0c300aa
commit 92247bac01
1 file changed
+6 -3
+6 -3
View File
@@ -1237,17 +1237,20 @@ static int check_pci_attributes(VectorAttribute * pci, string& error_str)
int VirtualMachine::parse_pci(string& error_str)
{
vector<VectorAttribute *> array_pci;
vector<VectorAttribute *>::iterator it;
int pci_id = 0;
user_obj_template->remove("PCI", array_pci);
for (it = array_pci.begin(); it !=array_pci.end(); it++)
for (it = array_pci.begin(); it !=array_pci.end(); ++it, ++pci_id)
{
(*it)->replace("PCI_ID", pci_id);
obj_template->set(*it);
}
for (it = array_pci.begin(); it !=array_pci.end(); it++)
for (it = array_pci.begin(); it !=array_pci.end(); ++it)
{
if ( check_pci_attributes(*it, error_str) != 0 )
{