mirror of
https://github.com/OpenNebula/one.git
synced 2026-11-20 11:52:37 +09:00
feature #4620: Add PCI_ID to PCI devices
(cherry picked from commit 086ccd4f09)
This commit is contained in:
1 parent
89b0c300aa
commit
92247bac01
1 file changed
+6
-3
@@ -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 )
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user