Changeset 35074 in vbox
- Timestamp:
- Dec 14, 2010 1:15:29 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/xml/Settings.cpp
r35040 r35074 4436 4436 } 4437 4437 4438 // Settings version 1.11 is required if more than one controller of each type 4439 // is present. 4438 // settings version 1.9 is required if there is not exactly one DVD 4439 // or more than one floppy drive present or the DVD is not at the secondary 4440 // master; this check is a bit more complicated 4441 // 4442 // settings version 1.10 is required if the host cache should be disabled 4443 // 4444 // settings version 1.11 is required for bandwidth limits and if more than 4445 // one controller of each type is present. 4440 4446 if (m->sv < SettingsVersion_v1_11) 4441 4447 { 4448 // count attached DVDs and floppies (only if < v1.9) 4449 size_t cDVDs = 0; 4450 size_t cFloppies = 0; 4451 4452 // count storage controllers (if < v1.11) 4442 4453 size_t cSata = 0; 4443 4454 size_t cScsiLsi = 0; … … 4447 4458 size_t cFloppy = 0; 4448 4459 4460 // need to run thru all the storage controllers and attached devices to figure this out 4449 4461 for (StorageControllersList::const_iterator it = storageMachine.llStorageControllers.begin(); 4450 4462 it != storageMachine.llStorageControllers.end(); 4451 4463 ++it) 4452 4464 { 4453 switch ((*it).storageBus) 4465 const StorageController &sctl = *it; 4466 4467 // count storage controllers of each type; 1.11 is required if more than one 4468 // controller of one type is present 4469 switch (sctl.storageBus) 4454 4470 { 4455 4471 case StorageBus_IDE: … … 4463 4479 break; 4464 4480 case StorageBus_SCSI: 4465 if ( (*it).controllerType == StorageControllerType_LsiLogic)4481 if (sctl.controllerType == StorageControllerType_LsiLogic) 4466 4482 cScsiLsi++; 4467 4483 else … … 4482 4498 || cIde > 1 4483 4499 || cFloppy > 1) 4500 { 4484 4501 m->sv = SettingsVersion_v1_11; 4485 } 4486 } 4487 4488 // Settings version 1.11 is required if Readonly/MultiAttach media 4489 // are present. 4490 if (m->sv < SettingsVersion_v1_11) 4491 { 4492 /// @todo add code going over all medium attachments and check if 4493 // they are of type Readonly or MultiAttach. 4494 } 4495 4496 // settings version 1.9 is required if there is not exactly one DVD 4497 // or more than one floppy drive present or the DVD is not at the secondary 4498 // master; this check is a bit more complicated 4499 // 4500 // settings version 1.10 is required if the host cache should be disabled 4501 // 4502 // settings version 1.11 is required for bandwidth limits 4503 if (m->sv < SettingsVersion_v1_11) 4504 { 4505 // count attached DVDs and floppies (only if < v1.9) 4506 size_t cDVDs = 0; 4507 size_t cFloppies = 0; 4508 4509 // need to run thru all the storage controllers and attached devices to figure this out 4510 for (StorageControllersList::const_iterator it = storageMachine.llStorageControllers.begin(); 4511 it != storageMachine.llStorageControllers.end(); 4512 ++it) 4513 { 4514 const StorageController &sctl = *it; 4502 break; // abort the loop -- we will not raise the version further 4503 } 4504 4515 4505 for (AttachedDevicesList::const_iterator it2 = sctl.llAttachedDevices.begin(); 4516 4506 it2 != sctl.llAttachedDevices.end(); … … 4520 4510 4521 4511 // Bandwidth limitations are new in VirtualBox 4.0 (1.11) 4522 if ( (m->sv < SettingsVersion_v1_11) 4523 && (att.strBwGroup.length() != 0) 4524 ) 4512 if (m->sv < SettingsVersion_v1_11) 4525 4513 { 4526 m->sv = SettingsVersion_v1_11; 4527 break; /* abort the loop -- we will not raise the version further */ 4514 if (att.strBwGroup.length() != 0) 4515 { 4516 m->sv = SettingsVersion_v1_11; 4517 break; // abort the loop -- we will not raise the version further 4518 } 4528 4519 } 4529 4520 … … 4556 4547 } 4557 4548 } 4549 4550 if (m->sv >= SettingsVersion_v1_11) 4551 break; // abort the loop -- we will not raise the version further 4558 4552 } 4559 4553
Note:
See TracChangeset
for help on using the changeset viewer.