VirtualBox

Ignore:
Timestamp:
Aug 6, 2008 4:53:38 PM (16 years ago)
Author:
vboxsync
Message:

DevATA: Use CFGM*Def().

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Devices/Storage/DevATA.cpp

    r11161 r11183  
    55325532                                N_("PIIX3 configuration error: unknown option specified"));
    55335533
    5534     rc = CFGMR3QueryBool(pCfgHandle, "GCEnabled", &fGCEnabled);
    5535     if (rc == VERR_CFGM_VALUE_NOT_FOUND)
    5536         fGCEnabled = true;
    5537     else if (VBOX_FAILURE(rc))
     5534    rc = CFGMR3QueryBoolDef(pCfgHandle, "GCEnabled", &fGCEnabled, true);
     5535    if (VBOX_FAILURE(rc))
    55385536        return PDMDEV_SET_ERROR(pDevIns, rc,
    55395537                                N_("PIIX3 configuration error: failed to read GCEnabled as boolean"));
    55405538    Log(("%s: fGCEnabled=%d\n", __FUNCTION__, fGCEnabled));
    55415539
    5542     rc = CFGMR3QueryBool(pCfgHandle, "R0Enabled", &fR0Enabled);
    5543     if (rc == VERR_CFGM_VALUE_NOT_FOUND)
    5544         fR0Enabled = true;
    5545     else if (VBOX_FAILURE(rc))
     5540    rc = CFGMR3QueryBoolDef(pCfgHandle, "R0Enabled", &fR0Enabled, true);
     5541    if (VBOX_FAILURE(rc))
    55465542        return PDMDEV_SET_ERROR(pDevIns, rc,
    55475543                                N_("PIIX3 configuration error: failed to read R0Enabled as boolean"));
    55485544    Log(("%s: fR0Enabled=%d\n", __FUNCTION__, fR0Enabled));
    55495545
    5550     rc = CFGMR3QueryU32(pCfgHandle, "IRQDelay", &DelayIRQMillies);
    5551     if (rc == VERR_CFGM_VALUE_NOT_FOUND)
    5552         DelayIRQMillies = 0;
    5553     else if (VBOX_FAILURE(rc))
     5546    rc = CFGMR3QueryU32Def(pCfgHandle, "IRQDelay", &DelayIRQMillies, 0);
     5547    if (VBOX_FAILURE(rc))
    55545548        return PDMDEV_SET_ERROR(pDevIns, rc,
    55555549                                N_("PIIX3 configuration error: failed to read IRQDelay as integer"));
     
    55575551    Assert(DelayIRQMillies < 50);
    55585552
    5559     rc = CFGMR3QueryBool(pCfgHandle, "PIIX4", &pData->fPIIX4);
    5560     if (rc == VERR_CFGM_VALUE_NOT_FOUND)
    5561         pData->fPIIX4 = false;
    5562     else if (VBOX_FAILURE(rc))
     5553    rc = CFGMR3QueryBoolDef(pCfgHandle, "PIIX4", &pData->fPIIX4, false);
     5554    if (VBOX_FAILURE(rc))
    55635555        return PDMDEV_SET_ERROR(pDevIns, rc,
    55645556                                N_("PIIX3 configuration error: failed to read PIIX4 as boolean"));
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