VirtualBox

Changeset 21446 in vbox for trunk/src/VBox/Frontends


Ignore:
Timestamp:
Jul 9, 2009 3:09:57 PM (16 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
49854
Message:

API/Machine+SystemProperties: get rid of the tri-state bool controlling hwvirtex

Location:
trunk/src/VBox/Frontends
Files:
9 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VBoxManage/VBoxManage.cpp

    r20977 r21446  
    14121412        else
    14131413            CHECK_ERROR(systemProperties, COMSETTER(WebServiceAuthLibrary)(Bstr(a->argv[1])));
    1414     }
    1415     else if (!strcmp(a->argv[0], "hwvirtexenabled"))
    1416     {
    1417         if (!strcmp(a->argv[1], "yes"))
    1418             CHECK_ERROR(systemProperties, COMSETTER(HWVirtExEnabled)(TRUE));
    1419         else if (!strcmp(a->argv[1], "no"))
    1420             CHECK_ERROR(systemProperties, COMSETTER(HWVirtExEnabled)(FALSE));
    1421         else
    1422             return errorArgument("Invalid value '%s' for hardware virtualization extension flag", a->argv[1]);
    14231414    }
    14241415    else if (!strcmp(a->argv[0], "loghistorycount"))
  • trunk/src/VBox/Frontends/VBoxManage/VBoxManageHelp.cpp

    r21032 r21446  
    131131                 "                            [--ioapic on|off]\n"
    132132                 "                            [--pae on|off]\n"
    133                  "                            [--hwvirtex on|off|default]\n"
     133                 "                            [--hwvirtex on|off]\n"
    134134                 "                            [--nestedpaging on|off]\n"
    135135                 "                            [--vtxvpid on|off]\n"
     
    431431                 "                            vrdpauthlibrary default|<library> |\n"
    432432                 "                            websrvauthlibrary default|null|<library> |\n"
    433                  "                            hwvirtexenabled yes|no\n"
    434433                 "                            loghistorycount <value>\n"
    435434                 "\n");
  • trunk/src/VBox/Frontends/VBoxManage/VBoxManageInfo.cpp

    r20928 r21446  
    343343        RTPrintf("Time offset:     %lld ms\n", timeOffset);
    344344
    345     TSBool_T hwVirtExEnabled;
     345    BOOL hwVirtExEnabled;
    346346    machine->COMGETTER(HWVirtExEnabled)(&hwVirtExEnabled);
    347     if (hwVirtExEnabled == TSBool_Default)
    348     {
    349         BOOL fHWVirtExEnabled;
    350         ComPtr<ISystemProperties> systemProperties;
    351         virtualBox->COMGETTER(SystemProperties)(systemProperties.asOutParam());
    352         systemProperties->COMGETTER(HWVirtExEnabled)(&fHWVirtExEnabled);
    353         if (details == VMINFO_MACHINEREADABLE)
    354             RTPrintf("hwvirtex=\"default\"\n");
    355         else
    356             RTPrintf("Hardw. virt.ext: Default (%s)\n", fHWVirtExEnabled ? "on" : "off");
    357     }
    358     else
    359     {
    360         if (details == VMINFO_MACHINEREADABLE)
    361             RTPrintf("hwvirtex=\"%s\"\n", hwVirtExEnabled == TSBool_True ? "on" : "off");
    362         else
    363             RTPrintf("Hardw. virt.ext: %s\n", hwVirtExEnabled == TSBool_True ? "on" : "off");
    364     }
     347    if (details == VMINFO_MACHINEREADABLE)
     348        RTPrintf("hwvirtex=\"%s\"\n", hwVirtExEnabled ? "on" : "off");
     349    else
     350        RTPrintf("Hardw. virt.ext: %s\n", hwVirtExEnabled ? "on" : "off");
    365351    BOOL HWVirtExNestedPagingEnabled;
    366352    machine->COMGETTER(HWVirtExNestedPagingEnabled)(&HWVirtExNestedPagingEnabled);
  • trunk/src/VBox/Frontends/VBoxManage/VBoxManageList.cpp

    r20928 r21446  
    763763            systemProperties->COMGETTER(WebServiceAuthLibrary)(str.asOutParam());
    764764            RTPrintf("Webservice auth. library:    %lS\n", str.raw());
    765             systemProperties->COMGETTER(HWVirtExEnabled)(&flag);
    766             RTPrintf("Hardware virt. extensions:   %s\n", flag ? "yes" : "no");
    767765            systemProperties->COMGETTER(LogHistoryCount)(&ulValue);
    768766            RTPrintf("Log history count:           %u\n", ulValue);
  • trunk/src/VBox/Frontends/VBoxManage/VBoxManageModifyVM.cpp

    r20928 r21446  
    938938            if (!strcmp(hwvirtex, "on"))
    939939            {
    940                 CHECK_ERROR(machine, COMSETTER(HWVirtExEnabled)(TSBool_True));
     940                CHECK_ERROR(machine, COMSETTER(HWVirtExEnabled)(TRUE));
    941941            }
    942942            else if (!strcmp(hwvirtex, "off"))
    943943            {
    944                 CHECK_ERROR(machine, COMSETTER(HWVirtExEnabled)(TSBool_False));
    945             }
    946             else if (!strcmp(hwvirtex, "default"))
    947             {
    948                 CHECK_ERROR(machine, COMSETTER(HWVirtExEnabled)(TSBool_Default));
     944                CHECK_ERROR(machine, COMSETTER(HWVirtExEnabled)(FALSE));
    949945            }
    950946            else
  • trunk/src/VBox/Frontends/VBoxSDL/VBoxSDL.cpp

    r21029 r21446  
    10731073    unsigned fPATM  = ~0U;
    10741074    unsigned fCSAM  = ~0U;
    1075     TSBool_T fHWVirt = TSBool_Default;
     1075    unsigned fHWVirt = ~0U;
    10761076    uint32_t u32WarpDrive = 0;
    10771077#endif
     
    15871587        else if (   !strcmp(argv[curArg], "--hwvirtex")
    15881588                 || !strcmp(argv[curArg], "-hwvirtex"))
    1589             fHWVirt = TSBool_True;
     1589            fHWVirt = true;
    15901590        else if (   !strcmp(argv[curArg], "--nohwvirtex")
    15911591                 || !strcmp(argv[curArg], "-nohwvirtex"))
    1592             fHWVirt = TSBool_False;
     1592            fHWVirt = false;
    15931593        else if (   !strcmp(argv[curArg], "--warpdrive")
    15941594                 || !strcmp(argv[curArg], "-warpdrive"))
     
    21492149        gMachineDebugger->COMSETTER(CSAMEnabled)(fCSAM);
    21502150    }
    2151     if (fHWVirt != TSBool_Default)
     2151    if (fHWVirt != ~0U)
    21522152    {
    21532153        gMachine->COMSETTER(HWVirtExEnabled)(fHWVirt);
  • trunk/src/VBox/Frontends/VirtualBox/src/VBoxGlobal.cpp

    r21034 r21446  
    14821482
    14831483        /* VT-x/AMD-V */
    1484         QString virt = aMachine.GetHWVirtExEnabled() == KTSBool_True ?
    1485                        tr ("Enabled", "details report (VT-x/AMD-V)") :
    1486                       tr ("Disabled", "details report (VT-x/AMD-V)");
     1484        QString virt = aMachine.GetHWVirtExEnabled()
     1485            ? tr ("Enabled", "details report (VT-x/AMD-V)")
     1486            : tr ("Disabled", "details report (VT-x/AMD-V)");
    14871487
    14881488        /* Nested Paging */
  • trunk/src/VBox/Frontends/VirtualBox/src/VBoxSettingsDialogSpecific.cpp

    r21053 r21446  
    433433    if (generalPage && systemPage &&
    434434        generalPage->is64BitOSTypeSelected() && !systemPage->isHWVirtExEnabled())
    435         mMachine.SetHWVirtExEnabled (KTSBool_True);
     435        mMachine.SetHWVirtExEnabled (true);
    436436
    437437    /* Clear the "GUI_FirstRun" extra data key in case if the boot order
  • trunk/src/VBox/Frontends/VirtualBox/src/VBoxVMSettingsSystem.cpp

    r21305 r21446  
    175175    /* VT-x/AMD-V */
    176176    mCbVirt->setEnabled (fVTxAMDVSupported);
    177     mCbVirt->setChecked (aMachine.GetHWVirtExEnabled() == KTSBool_True);
     177    mCbVirt->setChecked (aMachine.GetHWVirtExEnabled());
    178178
    179179    /* Nested Paging */
    180180    mCbNestedPaging->setEnabled (fVTxAMDVSupported &&
    181                                  aMachine.GetHWVirtExEnabled() == KTSBool_True);
     181                                 aMachine.GetHWVirtExEnabled());
    182182    mCbNestedPaging->setChecked (aMachine.GetHWVirtExNestedPagingEnabled());
    183183
     
    232232    /* VT-x/AMD-V */
    233233    mMachine.SetHWVirtExEnabled (mCbVirt->checkState() == Qt::Checked ||
    234                                  mSlCPU->value() > 1 ?
    235                                  KTSBool_True : KTSBool_False);
     234                                 mSlCPU->value() > 1);
    236235
    237236    /* Nested Paging */
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