VirtualBox

Changeset 36664 in vbox


Ignore:
Timestamp:
Apr 13, 2011 4:50:41 PM (14 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
71146
Message:

Main: check if particular PCI device already attached

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Main/src-server/MachineImpl.cpp

    r36630 r36664  
    58675867        }
    58685868
     5869        // check if device with this host PCI address already attached
     5870        for (HWData::PciDeviceAssignmentList::iterator it =  mHWData->mPciDeviceAssignments.begin();
     5871             it !=  mHWData->mPciDeviceAssignments.end();
     5872             ++it)
     5873        {
     5874            LONG iHostAddress = -1;
     5875            ComPtr<PciDeviceAttachment> pAttach;
     5876            pAttach = *it;
     5877            pAttach->COMGETTER(HostAddress)(&iHostAddress);
     5878            if (iHostAddress == hostAddress)
     5879                return setError(E_INVALIDARG,
     5880                                tr("Device with host PCI address already attached to this VM"));
     5881        }
     5882
    58695883        ComObjPtr<PciDeviceAttachment> pda;
    58705884        char name[32];
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette