VirtualBox

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


Ignore:
Timestamp:
Sep 22, 2021 3:10:38 PM (3 years ago)
Author:
vboxsync
Message:

Main/NvramStore,FE/VBoxManage: Allow multiple NVRAM states (UEFI,TPM,etc.) to exist for a VM and and manage them in a central place. This allows to collect them in a single tar archive and provide a single interface to get access to the individual states (work in progress), bugref:10098

File:
1 edited

Legend:

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

    r91213 r91326  
    25842584        && apicMode == APICMode_APIC
    25852585        && llTimeOffset == 0
    2586         && strLogoImagePath.isEmpty()
    2587         && strNVRAMPath.isEmpty();
     2586        && strLogoImagePath.isEmpty();
    25882587}
    25892588
     
    26062605            && apicMode                == d.apicMode
    26072606            && llTimeOffset            == d.llTimeOffset
    2608             && strLogoImagePath        == d.strLogoImagePath
    2609             && strNVRAMPath            == d.strNVRAMPath);
     2607            && strLogoImagePath        == d.strLogoImagePath);
    26102608}
    26112609
     
    28552853            && strLocation     == g.strLocation);
    28562854}
     2855
     2856/**
     2857 * Constructor. Needs to set sane defaults which stand the test of time.
     2858 */
     2859NvramSettings::NvramSettings()
     2860{
     2861}
     2862
     2863/**
     2864 * Check if all settings have default values.
     2865 */
     2866bool NvramSettings::areDefaultSettings() const
     2867{
     2868    return strNvramPath.isEmpty();
     2869}
     2870
     2871/**
     2872 * Comparison operator. This gets called from MachineConfigFile::operator==,
     2873 * which in turn gets called from Machine::saveSettings to figure out whether
     2874 * machine settings have really changed and thus need to be written out to disk.
     2875 */
     2876bool NvramSettings::operator==(const NvramSettings &g) const
     2877{
     2878    return (this == &g)
     2879        || (strNvramPath    == g.strNvramPath);
     2880}
     2881
    28572882
    28582883/**
     
    35313556            && vrdeSettings                   == h.vrdeSettings
    35323557            && biosSettings                   == h.biosSettings
     3558            && nvramSettings                  == h.nvramSettings
    35333559            && graphicsAdapter                == h.graphicsAdapter
    35343560            && usbSettings                    == h.usbSettings
     
    49244950                pelmBIOSChild->getAttributeValue("value", hw.biosSettings.llTimeOffset);
    49254951            if ((pelmBIOSChild = pelmHwChild->findChildElement("NVRAM")))
    4926                 pelmBIOSChild->getAttributeValue("path", hw.biosSettings.strNVRAMPath);
     4952                pelmBIOSChild->getAttributeValue("path", hw.nvramSettings.strNvramPath);
    49274953            if ((pelmBIOSChild = pelmHwChild->findChildElement("SmbiosUuidLittleEndian")))
    49284954                pelmBIOSChild->getAttributeValue("enabled", hw.biosSettings.fSmbiosUuidLittleEndian);
     
    64436469        if (hw.biosSettings.fPXEDebugEnabled)
    64446470            pelmBIOS->createChild("PXEDebug")->setAttribute("enabled", hw.biosSettings.fPXEDebugEnabled);
    6445         if (!hw.biosSettings.strNVRAMPath.isEmpty())
    6446             pelmBIOS->createChild("NVRAM")->setAttribute("path", hw.biosSettings.strNVRAMPath);
     6471        if (!hw.nvramSettings.strNvramPath.isEmpty())
     6472            pelmBIOS->createChild("NVRAM")->setAttribute("path", hw.nvramSettings.strNvramPath);
    64476473        if (hw.biosSettings.fSmbiosUuidLittleEndian)
    64486474            pelmBIOS->createChild("SmbiosUuidLittleEndian")->setAttribute("enabled", hw.biosSettings.fSmbiosUuidLittleEndian);
     
    77817807    if (m->sv < SettingsVersion_v1_18)
    77827808    {
    7783         if (!hardwareMachine.biosSettings.strNVRAMPath.isEmpty())
     7809        if (!hardwareMachine.nvramSettings.strNvramPath.isEmpty())
    77847810        {
    77857811            m->sv = SettingsVersion_v1_18;
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