Changeset 33688 in vbox for trunk/src/VBox/Main/BusAssignmentManager.cpp
- Timestamp:
- Nov 2, 2010 1:19:46 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/BusAssignmentManager.cpp
r33687 r33688 30 30 { 31 31 char szDevName[16]; 32 33 PciDeviceRecord(const char* pszName) 34 { 35 ::strncpy(szDevName, pszName, sizeof(szDevName)); 36 } 32 37 }; 33 38 … … 46 51 HRESULT init(ChipsetType_T chipsetType); 47 52 53 HRESULT record(const char* pszName, PciBusAddress& Address); 48 54 HRESULT autoAssign(const char* pszName, PciBusAddress& Address); 49 bool checkAvailable(PciBusAddress& Address);55 bool checkAvailable(PciBusAddress& Address); 50 56 }; 51 57 … … 53 59 { 54 60 mChipsetType = chipsetType; 61 return S_OK; 62 } 63 64 65 HRESULT BusAssignmentManager::State::record(const char* pszName, PciBusAddress& Address) 66 { 67 mPciMap.insert(PciMap::value_type(Address, PciDeviceRecord(pszName))); 55 68 return S_OK; 56 69 } … … 66 79 { 67 80 PciMap::const_iterator it = mPciMap.find(Address); 68 81 69 82 return (it == mPciMap.end()); 70 83 } … … 123 136 124 137 HRESULT BusAssignmentManager::assignPciDevice(const char* pszDevName, PCFGMNODE pCfg, 125 PciBusAddress& Address, bool fAddressRequired)138 PciBusAddress& Address, bool fAddressRequired) 126 139 { 127 140 HRESULT rc = S_OK; … … 147 160 Assert(Address.valid()); 148 161 162 rc = pState->record(pszDevName, Address); 163 if (FAILED(rc)) 164 return rc; 165 149 166 rc = InsertConfigInteger(pCfg, "PCIBusNo", Address.iBus); 150 167 if (FAILED(rc))
Note:
See TracChangeset
for help on using the changeset viewer.