VirtualBox

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


Ignore:
Timestamp:
Jan 6, 2010 9:23:07 PM (15 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
56387
Message:

introduced VBoxManage modifyvm --rtcuseutc

File:
1 edited

Legend:

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

    r25589 r25672  
    2929 *
    3030 *   3) In the settings writer method, write the setting _only_ if the current settings
    31  *      version (stored in m->sv) is high enough. That is, for VirtualBox 3.1, write it
    32  *      only if (m->sv >= SettingsVersion_v1_9).
     31 *      version (stored in m->sv) is high enough. That is, for VirtualBox 3.2, write it
     32 *      only if (m->sv >= SettingsVersion_v1_10).
    3333 *
    3434 *   4) In MachineConfigFile::bumpSettingsVersionIfNeeded(), check if the new setting has
     
    4242
    4343/*
    44  * Copyright (C) 2007-2009 Sun Microsystems, Inc.
     44 * Copyright (C) 2007-2010 Sun Microsystems, Inc.
    4545 *
    4646 * This file is part of VirtualBox Open Source Edition (OSE), as
     
    279279                else if (ulMinor == 9)
    280280                    m->sv = SettingsVersion_v1_9;
    281                 else if (ulMinor > 9)
     281                else if (ulMinor == 10)
     282                    m->sv = SettingsVersion_v1_10;
     283                else if (ulMinor > 10)
    282284                    m->sv = SettingsVersion_Future;
    283285            }
     
    298300    {
    299301        m->strSettingsVersionFull = VBOX_XML_VERSION_FULL;
    300         m->sv = SettingsVersion_v1_9;
     302        m->sv = SettingsVersion_v1_10;
    301303    }
    302304}
     
    545547        case SettingsVersion_v1_8:
    546548            pcszVersion = "1.8";
    547         break;
     549            break;
    548550
    549551        case SettingsVersion_v1_9:
     552            pcszVersion = "1.9";
     553            break;
     554
     555        case SettingsVersion_v1_10:
    550556        case SettingsVersion_Future:                // can be set if this code runs on XML files that were created by a future version of VBox;
    551557                                                    // in that case, downgrade to current version when writing since we can't write future versions...
    552             pcszVersion = "1.9";
    553             m->sv = SettingsVersion_v1_9;
    554         break;
     558            pcszVersion = "1.10";
     559            m->sv = SettingsVersion_v1_10;
     560            break;
    555561
    556562        default:
     
    558564            pcszVersion = "1.7";
    559565            m->sv = SettingsVersion_v1_7;
    560         break;
     566            break;
    561567    }
    562568
     
    17751781        else if (pelmHwChild->nameEquals("Network"))
    17761782            readNetworkAdapters(*pelmHwChild, hw.llNetworkAdapters);
     1783        else if (pelmHwChild->nameEquals("RTC"))
     1784        {
     1785            Utf8Str strLocalOrUTC;
     1786            fRTCUseUTC =    pelmHwChild->getAttributeValue("localOrUTC", strLocalOrUTC)
     1787                         && strLocalOrUTC == "UTC";
     1788        }
    17771789        else if (    (pelmHwChild->nameEquals("UART"))
    17781790                  || (pelmHwChild->nameEquals("Uart"))      // used before 1.3
     
    17801792            readSerialPorts(*pelmHwChild, hw.llSerialPorts);
    17811793        else if (    (pelmHwChild->nameEquals("LPT"))
    1782                   ||  (pelmHwChild->nameEquals("Lpt"))      // used before 1.3
     1794                  || (pelmHwChild->nameEquals("Lpt"))       // used before 1.3
    17831795                )
    17841796            readParallelPorts(*pelmHwChild, hw.llParallelPorts);
     
    24112423      fTeleporterEnabled(false),
    24122424      uTeleporterPort(0),
     2425      fRTCUseUTC(false),
    24132426      fCurrentStateModified(true),
    24142427      fAborted(false)
     
    27662779    pelmAudio->setAttribute("controller", (hw.audioAdapter.controllerType == AudioControllerType_SB16) ? "SB16" : "AC97");
    27672780
     2781    if (   m->sv >= SettingsVersion_v1_10
     2782        && fRTCUseUTC)
     2783    {
     2784        xml::ElementNode *pelmRTC = pelmHardware->createChild("RTC");
     2785        pelmRTC->setAttribute("localOrUTC", fRTCUseUTC ? "UTC" : "local");
     2786    }
     2787
    27682788    const char *pcszDriver;
    27692789    switch (hw.audioAdapter.driverType)
     
    30693089            m->sv = SettingsVersion_v1_9;
    30703090    }
     3091
     3092    if (    m->sv < SettingsVersion_v1_10
     3093         && (  fRTCUseUTC
     3094            )
     3095       )
     3096        m->sv = SettingsVersion_v1_10;
    30713097}
    30723098
Note: See TracChangeset for help on using the changeset viewer.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette