VirtualBox

Changeset 91898 in vbox


Ignore:
Timestamp:
Oct 20, 2021 1:59:08 PM (3 years ago)
Author:
vboxsync
Message:

VMM,Devices: Add callbacks to required MMR3* APIs to the helper callbacks tables and convert devices and drivers to make use of those, bugref:10074 [build fix]

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/VBox/vmm/pdmusb.h

    r91897 r91898  
    11861186DECLINLINE(void) PDMUsbHlpMMHeapFree(PPDMUSBINS pUsbIns, void *pv)
    11871187{
    1188     return pUsbIns->pHlpR3->pfnMMHeapFree(pUsbIns, pv);
     1188    pUsbIns->pHlpR3->pfnMMHeapFree(pUsbIns, pv);
    11891189}
    11901190
  • trunk/src/VBox/Devices/Storage/DrvVD.cpp

    r91897 r91898  
    39073907 *
    39083908 * @returns VBox status code.
     3909 * @param   pDrvIns  Driver instance data.
    39093910 * @param   pCfg     CFGM node holding plugin list.
    39103911 */
    3911 static int drvvdLoadPlugins(PCFGMNODE pCfg)
    3912 {
    3913     PCFGMNODE pCfgPlugins = CFGMR3GetChild(pCfg, "Plugins");
     3912static int drvvdLoadPlugins(PPDMDRVINS pDrvIns, PCFGMNODE pCfg)
     3913{
     3914    PCPDMDRVHLPR3 pHlp = pDrvIns->pHlpR3;
     3915
     3916    PCFGMNODE pCfgPlugins = pHlp->pfnCFGMGetChild(pCfg, "Plugins");
    39143917
    39153918    if (pCfgPlugins)
    39163919    {
    3917         PCFGMNODE pPluginCur = CFGMR3GetFirstChild(pCfgPlugins);
     3920        PCFGMNODE pPluginCur = pHlp->pfnCFGMGetFirstChild(pCfgPlugins);
    39183921        while (pPluginCur)
    39193922        {
    39203923            int rc = VINF_SUCCESS;
    39213924            char *pszPluginFilename = NULL;
    3922             rc = CFGMR3QueryStringAlloc(pPluginCur, "Path", &pszPluginFilename);
     3925            rc = pHlp->pfnCFGMQueryStringAlloc(pPluginCur, "Path", &pszPluginFilename);
    39233926            if (RT_SUCCESS(rc))
    39243927                rc = VDPluginLoadFromFilename(pszPluginFilename);
     
    39273930                LogRel(("VD: Failed to load plugin '%s' with %Rrc, continuing\n", pszPluginFilename, rc));
    39283931
    3929             pPluginCur = CFGMR3GetNextChild(pPluginCur);
     3932            pPluginCur = pHlp->pfnCFGMGetNextChild(pPluginCur);
    39303933        }
    39313934    }
     
    39443947static int drvvdSetupFilters(PVBOXDISK pThis, PCFGMNODE pCfg)
    39453948{
     3949    PCPDMDRVHLPR3 pHlp = pThis->pDrvIns->pHlpR3;
    39463950    int rc = VINF_SUCCESS;
    3947     PCFGMNODE pCfgFilter = CFGMR3GetChild(pCfg, "Filters");
    3948 
     3951
     3952    PCFGMNODE pCfgFilter = pHlp->pfnCFGMGetChild(pCfg, "Filters");
    39493953    if (pCfgFilter)
    39503954    {
    3951         PCFGMNODE pCfgFilterConfig = CFGMR3GetChild(pCfgFilter, "VDConfig");
     3955        PCFGMNODE pCfgFilterConfig = pHlp->pfnCFGMGetChild(pCfgFilter, "VDConfig");
    39523956        char *pszFilterName = NULL;
    39533957        VDINTERFACECONFIG VDIfConfig;
    39543958        PVDINTERFACE pVDIfsFilter = NULL;
    39553959
    3956         rc = CFGMR3QueryStringAlloc(pCfgFilter, "FilterName", &pszFilterName);
     3960        rc = pHlp->pfnCFGMQueryStringAlloc(pCfgFilter, "FilterName", &pszFilterName);
    39573961        if (RT_SUCCESS(rc))
    39583962        {
     
    41804184static DECLCALLBACK(int) drvvdLoadDone(PPDMDRVINS pDrvIns, PSSMHANDLE pSSM)
    41814185{
    4182     PVBOXDISK pThis = PDMINS_2_DATA(pDrvIns, PVBOXDISK);
     4186    PVBOXDISK       pThis = PDMINS_2_DATA(pDrvIns, PVBOXDISK);
     4187    PCPDMDRVHLPR3   pHlp  = pDrvIns->pHlpR3;
    41834188    Assert(!pThis->fErrorUseRuntime);
    41844189
    41854190    /* Drop out if we don't have any work to do or if it's a failed load. */
    41864191    if (   !pThis->fTempReadOnly
    4187         || RT_FAILURE(SSMR3HandleGetStatus(pSSM)))
     4192        || RT_FAILURE(pHlp->pfnSSMHandleGetStatus(pSSM)))
    41884193        return VINF_SUCCESS;
    41894194
    41904195    int rc = drvvdSetWritable(pThis);
    41914196    if (RT_FAILURE(rc)) /** @todo does the bugger set any errors? */
    4192         return SSMR3SetLoadError(pSSM, rc, RT_SRC_POS,
    4193                                  N_("Failed to write lock the images"));
     4197        return pHlp->pfnSSMSetLoadError(pSSM, rc, RT_SRC_POS,
     4198                                        N_("Failed to write lock the images"));
    41944199    return VINF_SUCCESS;
    41954200}
     
    46204625
    46214626    /* Before we access any VD API load all given plugins. */
    4622     rc = drvvdLoadPlugins(pCfg);
     4627    rc = drvvdLoadPlugins(pDrvIns, pCfg);
    46234628    if (RT_FAILURE(rc))
    46244629        return PDMDRV_SET_ERROR(pDrvIns, rc, N_("Loading VD plugins failed"));
     
    49364941        }
    49374942
    4938         PCFGMNODE pParent = CFGMR3GetChild(pCurNode, "Parent");
     4943        PCFGMNODE pParent = pHlp->pfnCFGMGetChild(pCurNode, "Parent");
    49394944        if (!pParent)
    49404945            break;
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