VirtualBox

Changeset 81919 in vbox


Ignore:
Timestamp:
Nov 17, 2019 9:35:13 PM (5 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
134716
Message:

DevFwCommon: Use device helpers for CFGM. bugref:9218

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Devices/PC/DevFwCommon.cpp

    r77254 r81919  
    437437int FwCommonPlantDMITable(PPDMDEVINS pDevIns, uint8_t *pTable, unsigned cbMax, PCRTUUID pUuid, PCFGMNODE pCfg, uint16_t cCpus, uint16_t *pcbDmiTables, uint16_t *pcNumDmiTables)
    438438{
     439    PCPDMDEVHLPR3 pHlp = pDevIns->pHlpR3;
     440
    439441    /*
    440442     * CFGM Hint!
     
    471473        else \
    472474        { \
    473             rc = CFGMR3QueryStringDef(pCfg, name, szBuf, sizeof(szBuf), default_value); \
     475            rc = pHlp->pfnCFGMQueryStringDef(pCfg, name, szBuf, sizeof(szBuf), default_value); \
    474476            if (RT_FAILURE(rc)) \
    475477            { \
     
    508510        else \
    509511        { \
    510             rc = CFGMR3QueryS32Def(pCfg, # name, & variable, g_iDef ## name); \
     512            rc = pHlp->pfnCFGMQueryS32Def(pCfg, # name, & variable, g_iDef ## name); \
    511513            if (RT_FAILURE(rc)) \
    512514            { \
     
    550552
    551553    uint8_t fDmiUseHostInfo;
    552     int rc = CFGMR3QueryU8Def(pCfg, "DmiUseHostInfo", &fDmiUseHostInfo, 0);
     554    int rc = pHlp->pfnCFGMQueryU8Def(pCfg, "DmiUseHostInfo", &fDmiUseHostInfo, 0);
    553555    if (RT_FAILURE (rc))
    554         return PDMDEV_SET_ERROR(pDevIns, rc,
    555                                 N_("Configuration error: Failed to read \"DmiUseHostInfo\""));
     556        return PDMDEV_SET_ERROR(pDevIns, rc, N_("Configuration error: Failed to read \"DmiUseHostInfo\""));
    556557
    557558    /* Sync up with host default DMI values */
     
    560561
    561562    uint8_t fDmiExposeMemoryTable;
    562     rc = CFGMR3QueryU8Def(pCfg, "DmiExposeMemoryTable", &fDmiExposeMemoryTable, 0);
     563    rc = pHlp->pfnCFGMQueryU8Def(pCfg, "DmiExposeMemoryTable", &fDmiExposeMemoryTable, 0);
    563564    if (RT_FAILURE (rc))
    564         return PDMDEV_SET_ERROR(pDevIns, rc,
    565                                 N_("Configuration error: Failed to read \"DmiExposeMemoryTable\""));
     565        return PDMDEV_SET_ERROR(pDevIns, rc, N_("Configuration error: Failed to read \"DmiExposeMemoryTable\""));
    566566    uint8_t fDmiExposeProcessorInf;
    567     rc = CFGMR3QueryU8Def(pCfg, "DmiExposeProcInf", &fDmiExposeProcessorInf, 0);
     567    rc = pHlp->pfnCFGMQueryU8Def(pCfg, "DmiExposeProcInf", &fDmiExposeProcessorInf, 0);
    568568    if (RT_FAILURE (rc))
    569         return PDMDEV_SET_ERROR(pDevIns, rc,
    570                                 N_("Configuration error: Failed to read \"DmiExposeProcInf\""));
     569        return PDMDEV_SET_ERROR(pDevIns, rc, N_("Configuration error: Failed to read \"DmiExposeProcInf\""));
    571570
    572571    for  (;; fForceDefault = true, fHideErrors = false)
     
    583582        else
    584583        {
    585             rc = CFGMR3QueryString(pCfg, "DmiSystemUuid", szDmiSystemUuid, sizeof(szDmiSystemUuid));
     584            rc = pHlp->pfnCFGMQueryString(pCfg, "DmiSystemUuid", szDmiSystemUuid, sizeof(szDmiSystemUuid));
    586585            if (rc == VERR_CFGM_VALUE_NOT_FOUND)
    587586                pszDmiSystemUuid = NULL;
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