VirtualBox

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


Ignore:
Timestamp:
Sep 18, 2023 2:45:36 PM (17 months ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
159127
Message:

Main: Fixed writing the firmware type in the machine settings (settings < v1.20 stored that also in the "Firmware" element instead of the "BIOS" element). bugref:10384

File:
1 edited

Legend:

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

    r101055 r101154  
    75897589        || !hw.nvramSettings.areDefaultSettings())
    75907590    {
    7591         xml::ElementNode *pelmFirmwareOrBIOS;
    7592         if (m->sv >= SettingsVersion_v1_20) /* Since settings v1.20 the element was renamed to "Firmware". */
    7593             pelmFirmwareOrBIOS = pelmHardware->createChild("Firmware");
    7594         else
    7595             pelmFirmwareOrBIOS = pelmHardware->createChild("BIOS");
     7591        /* Settings < v1.20 also had a "Firmware" element, but that only stored the firmware type. */
     7592        xml::ElementNode *pelmFirmware = pelmHardware->createChild("Firmware");
    75967593
    75977594        if (   (m->sv >= SettingsVersion_v1_9)
     
    76097606                default:                    pcszFirmware = "None";    break;
    76107607            }
    7611             pelmFirmwareOrBIOS->setAttribute("type", pcszFirmware);
    7612         }
     7608            pelmFirmware->setAttribute("type", pcszFirmware);
     7609        }
     7610
     7611        xml::ElementNode *pelmFirmwareOrBIOS;
     7612        if (m->sv >= SettingsVersion_v1_20) /* Since settings v1.20 the rest also gets stored in "Firmware". */
     7613            pelmFirmwareOrBIOS = pelmFirmware; /* Use the "Firmware" element from above. */
     7614        else /* For settings < v1.20 the rest was stored in the "BIOS" element. */
     7615            pelmFirmwareOrBIOS = pelmHardware->createChild("BIOS");
    76137616
    76147617        if (!hw.firmwareSettings.fACPIEnabled)
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