Changeset 31470 in vbox
- Timestamp:
- Aug 9, 2010 9:45:03 AM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/xml/Settings.cpp
r31469 r31470 4248 4248 // 4249 4249 // settings version 1.10 is required if the host cache should be disabled 4250 if (m->sv < SettingsVersion_v1_10) 4251 { 4250 // 4251 // settings version 1.11 is required for bandwidth limits 4252 if (m->sv < SettingsVersion_v1_11) 4253 { 4254 // count attached DVDs and floppies (only if < v1.9) 4252 4255 size_t cDVDs = 0; 4253 4256 size_t cFloppies = 0; 4254 4257 4255 // need to run thru all the storage controllers to figure this out4258 // need to run thru all the storage controllers and attached devices to figure this out 4256 4259 for (StorageControllersList::const_iterator it = storageMachine.llStorageControllers.begin(); 4257 4260 it != storageMachine.llStorageControllers.end(); … … 4263 4266 ++it2) 4264 4267 { 4265 // we can only write the StorageController/@Instance attribute with v1.94266 if (sctl.ulInstance != 0)4267 {4268 if (m->sv < SettingsVersion_v1_9)4269 m->sv = SettingsVersion_v1_9;4270 }4271 4272 4268 const AttachedDevice &att = *it2; 4273 if (att.deviceType == DeviceType_DVD) 4274 { 4275 if ( (sctl.storageBus != StorageBus_IDE) // DVD at bus other than DVD? 4276 || (att.lPort != 1) // DVDs not at secondary master? 4277 || (att.lDevice != 0) 4278 ) 4279 { 4280 if (m->sv < SettingsVersion_v1_9) 4281 m->sv = SettingsVersion_v1_9; 4282 } 4283 4284 ++cDVDs; 4285 } 4286 else if (att.deviceType == DeviceType_Floppy) 4287 ++cFloppies; 4288 4289 // Disabling the host IO cache requires settings version 1.10 4290 if (!sctl.fUseHostIOCache) 4291 { 4292 m->sv = SettingsVersion_v1_10; 4293 break; /* abort the loop -- we will not raise the version further */ 4294 } 4295 4296 /* Bandwidth limitations are new in VirtualBox 3.3 (1.11) */ 4297 if (att.ulBandwidthLimit != 0) 4269 4270 // Bandwidth limitations are new in VirtualBox 3.3 (1.11) 4271 if ( (m->sv < SettingsVersion_v1_11) 4272 && (att.ulBandwidthLimit != 0) 4273 ) 4298 4274 { 4299 4275 m->sv = SettingsVersion_v1_11; 4300 4276 break; /* abort the loop -- we will not raise the version further */ 4277 } 4278 4279 // disabling the host IO cache requires settings version 1.10 4280 if ( (m->sv < SettingsVersion_v1_10) 4281 && (!sctl.fUseHostIOCache) 4282 ) 4283 m->sv = SettingsVersion_v1_10; 4284 4285 // we can only write the StorageController/@Instance attribute with v1.9 4286 if ( (m->sv < SettingsVersion_v1_9) 4287 && (sctl.ulInstance != 0) 4288 ) 4289 m->sv = SettingsVersion_v1_9; 4290 4291 if (m->sv < SettingsVersion_v1_9) 4292 { 4293 if (att.deviceType == DeviceType_DVD) 4294 { 4295 if ( (sctl.storageBus != StorageBus_IDE) // DVD at bus other than DVD? 4296 || (att.lPort != 1) // DVDs not at secondary master? 4297 || (att.lDevice != 0) 4298 ) 4299 m->sv = SettingsVersion_v1_9; 4300 4301 ++cDVDs; 4302 } 4303 else if (att.deviceType == DeviceType_Floppy) 4304 ++cFloppies; 4301 4305 } 4302 4306 }
Note:
See TracChangeset
for help on using the changeset viewer.