VirtualBox

Changeset 22480 in vbox for trunk/src/VBox/Frontends/VBoxBFE


Ignore:
Timestamp:
Aug 26, 2009 5:14:13 PM (15 years ago)
Author:
vboxsync
Message:

SSM,VMM,Devices,Main,VBoxBFE: Live snapshot/migration SSM API adjustments.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VBoxBFE/VMMDevInterface.cpp

    r22277 r22480  
    317317 * @param   pDrvIns         Driver instance of the driver which registered the data unit.
    318318 * @param   pSSM            SSM operation handle.
    319  * @param   u32Version      Data layout version.
    320  */
    321 static DECLCALLBACK(int) iface_hgcmLoad(PPDMDRVINS pDrvIns, PSSMHANDLE pSSM, uint32_t u32Version)
     319 * @param   uVersion        Data layout version.
     320 * @param   uPhase          The data phase.
     321 */
     322static DECLCALLBACK(int) iface_hgcmLoad(PPDMDRVINS pDrvIns, PSSMHANDLE pSSM, uint32_t uVersion, uint32_t uPhase)
    322323{
    323324    LogFlowFunc(("Enter\n"));
    324325
    325     if (u32Version != HGCM_SSM_VERSION)
     326    if (uVersion != HGCM_SSM_VERSION)
    326327        return VERR_SSM_UNSUPPORTED_DATA_UNIT_VERSION;
     328    Assert(uPhase == SSM_PHASE_FINAL); NOREF(uPhase);
    327329
    328330    return HGCMHostLoadState (pSSM);
     
    399401    if (!CFGMR3AreValuesValid(pCfgHandle, "Object\0"))
    400402        return VERR_PDM_DRVINS_UNKNOWN_CFG_VALUES;
    401     AssertMsgReturn(PDMDrvHlpNoAttach(pDrvIns) == VERR_PDM_NO_ATTACHED_DRIVER, 
     403    AssertMsgReturn(PDMDrvHlpNoAttach(pDrvIns) == VERR_PDM_NO_ATTACHED_DRIVER,
    402404                    ("Configuration error: Not possible to attach anything to this driver!\n"),
    403405                    VERR_PDM_DRVINS_NO_ATTACH);
     
    474476            LogRel(("Failed to load Shared Folders service %Rrc\n", rc));
    475477
    476         pDrvIns->pDrvHlp->pfnSSMRegister(pDrvIns, "HGCM", 0, HGCM_SSM_VERSION, 4096/* bad guess */, NULL, iface_hgcmSave, NULL, NULL, iface_hgcmLoad, NULL);
     478
     479        rc = PDMDrvHlpSSMRegisterEx(pDrvIns, HGCM_SSM_VERSION, 4096 /* bad guess */,
     480                                    NULL, NULL, NULL,
     481                                    NULL, iface_hgcmSave, NULL,
     482                                    NULL, iface_hgcmLoad, NULL);
     483        if (RT_FAILURE(rc))
     484            return rc;
     485
    477486    }
    478487#endif /* VBOX_WITH_HGCM */
     
    490499    PDM_DRVREG_VERSION,
    491500    /* szDriverName */
    492     "MainVMMDev",
     501    "HGCM",
    493502    /* pszDescription */
    494503    "Main VMMDev driver (Main as in the API).",
     
    518527    NULL,
    519528    /* pfnDetach */
    520     NULL, 
     529    NULL,
    521530    /* pfnPowerOff */
    522     NULL, 
     531    NULL,
    523532    /* pfnSoftReset */
    524533    NULL,
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