Changeset 23331 in vbox
- Timestamp:
- Sep 25, 2009 1:24:26 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/MachineImpl.cpp
r23328 r23331 5280 5280 * @param aNode <HardDiskAttachments> node. 5281 5281 * @param aRegistered true when the machine is being loaded on VirtualBox 5282 * 5283 * 5282 * startup, or when a snapshot is being loaded (wchich 5283 * currently can happen on startup only) 5284 5284 * @param aSnapshotId pointer to the snapshot ID if this is a snapshot machine 5285 5285 * 5286 * @note Lock mParent for reading and hard disks for writing before calling.5286 * @note Lock mParent for reading and hard disks for writing before calling. 5287 5287 */ 5288 5288 HRESULT Machine::loadStorageDevices(StorageController *aStorageController, … … 5305 5305 mUserData->mName.raw(), 5306 5306 data.llAttachedDevices.size()); 5307 5308 /* paranoia: detect duplicate attachments */ 5309 for (settings::AttachedDevicesList::const_iterator it = data.llAttachedDevices.begin(); 5310 it != data.llAttachedDevices.end(); 5311 ++it) 5312 { 5313 for (settings::AttachedDevicesList::const_iterator it2 = it; 5314 it2 != data.llAttachedDevices.end(); 5315 ++it2) 5316 { 5317 if (it == it2) 5318 continue; 5319 5320 if ( (*it).lPort == (*it2).lPort 5321 && (*it).lDevice == (*it2).lDevice) 5322 { 5323 return setError(E_FAIL, 5324 tr("Duplicate attachments for storage controller '%s', port %d, device %d of the virtual machine '%ls'"), 5325 aStorageController->name().raw(), (*it).lPort, (*it).lDevice, mUserData->mName.raw()); 5326 } 5327 } 5328 } 5307 5329 5308 5330 for (settings::AttachedDevicesList::const_iterator it = data.llAttachedDevices.begin();
Note:
See TracChangeset
for help on using the changeset viewer.