VirtualBox

Changeset 34010 in vbox for trunk/src/VBox/Main/xml


Ignore:
Timestamp:
Nov 11, 2010 8:17:47 PM (14 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
67675
Message:

Main, FE/VBoxManage: Make it possible to mark specific controllers as bootable which means that the BIOS can access devices attached to the controller to boot from it

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Main/xml/Settings.cpp

    r33828 r34010  
    28142814            // default from constructor is 0
    28152815
     2816        pelmController->getAttributeValue("Bootable", sctl.fBootable);
     2817            // default from constructor is true which is true
     2818            // for settings below version 1.11 because they allowed only
     2819            // one controller per type.
     2820
    28162821        Utf8Str strType;
    28172822        if (!pelmController->getAttributeValue("type", strType))
     
    39933998            pelmController->setAttribute("useHostIOCache", sc.fUseHostIOCache);
    39943999
     4000        if (m->sv >= SettingsVersion_v1_11)
     4001            pelmController->setAttribute("Bootable", sc.fBootable);
     4002
    39954003        if (sc.controllerType == StorageControllerType_IntelAhci)
    39964004        {
     
    43904398    }
    43914399
     4400    // Settings version 1.11 is required if more than one controller of each type
     4401    // is present.
     4402    if (m->sv < SettingsVersion_v1_11)
     4403    {
     4404        size_t cSata = 0;
     4405        size_t cScsiLsi = 0;
     4406        size_t cScsiBuslogic = 0;
     4407        size_t cSas = 0;
     4408        size_t cIde = 0;
     4409        size_t cFloppy = 0;
     4410
     4411        for (StorageControllersList::const_iterator it = storageMachine.llStorageControllers.begin();
     4412             it != storageMachine.llStorageControllers.end();
     4413             ++it)
     4414        {
     4415            switch ((*it).storageBus)
     4416            {
     4417                case StorageBus_IDE:
     4418                    cIde++;
     4419                    break;
     4420                case StorageBus_SATA:
     4421                    cSata++;
     4422                    break;
     4423                case StorageBus_SAS:
     4424                    cSas++;
     4425                    break;
     4426                case StorageBus_SCSI:
     4427                    if ((*it).controllerType == StorageControllerType_LsiLogic)
     4428                        cScsiLsi++;
     4429                    else
     4430                        cScsiBuslogic++;
     4431                    break;
     4432                case StorageBus_Floppy:
     4433                    cFloppy++;
     4434                    break;
     4435                default:
     4436                    // Do nothing
     4437                    break;
     4438            }
     4439
     4440            if (   cSata > 1
     4441                || cScsiLsi > 1
     4442                || cScsiBuslogic > 1
     4443                || cSas > 1
     4444                || cIde > 1
     4445                || cFloppy > 1)
     4446                m->sv = SettingsVersion_v1_11;
     4447        }
     4448    }
     4449
    43924450    // settings version 1.9 is required if there is not exactly one DVD
    43934451    // or more than one floppy drive present or the DVD is not at the secondary
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