VirtualBox

Ignore:
Timestamp:
Nov 2, 2010 1:19:46 PM (14 years ago)
Author:
vboxsync
Message:

PIC: forgotten code to record assignment

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Main/BusAssignmentManager.cpp

    r33687 r33688  
    3030    {
    3131        char szDevName[16];
     32
     33        PciDeviceRecord(const char* pszName)
     34        {
     35            ::strncpy(szDevName, pszName, sizeof(szDevName));
     36        }
    3237    };
    3338
     
    4651    HRESULT init(ChipsetType_T chipsetType);
    4752
     53    HRESULT record(const char* pszName, PciBusAddress& Address);
    4854    HRESULT autoAssign(const char* pszName, PciBusAddress& Address);
    49     bool checkAvailable(PciBusAddress& Address);   
     55    bool    checkAvailable(PciBusAddress& Address);
    5056};
    5157
     
    5359{
    5460    mChipsetType = chipsetType;
     61    return S_OK;
     62}
     63
     64
     65HRESULT BusAssignmentManager::State::record(const char* pszName, PciBusAddress& Address)
     66{
     67    mPciMap.insert(PciMap::value_type(Address, PciDeviceRecord(pszName)));
    5568    return S_OK;
    5669}
     
    6679{
    6780    PciMap::const_iterator it = mPciMap.find(Address);
    68    
     81
    6982    return (it == mPciMap.end());
    7083}
     
    123136
    124137HRESULT BusAssignmentManager::assignPciDevice(const char* pszDevName, PCFGMNODE pCfg,
    125                                            PciBusAddress& Address,    bool fAddressRequired)
     138                                              PciBusAddress& Address,    bool fAddressRequired)
    126139{
    127140    HRESULT rc = S_OK;
     
    147160    Assert(Address.valid());
    148161
     162    rc = pState->record(pszDevName, Address);
     163    if (FAILED(rc))
     164        return rc;
     165
    149166    rc = InsertConfigInteger(pCfg, "PCIBusNo",             Address.iBus);
    150167    if (FAILED(rc))
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