VirtualBox

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/Devices/Network/DevPCNet.cpp

    r22369 r22480  
    43304330 * @param   pDevIns     The device instance.
    43314331 * @param   pSSMHandle  The handle to the saved state.
    4332  * @param   u32Version  The data unit version number.
    4333  */
    4334 static DECLCALLBACK(int) pcnetLoadExec(PPDMDEVINS pDevIns, PSSMHANDLE pSSMHandle, uint32_t u32Version)
     4332 * @param   uVersion  The data unit version number.
     4333 * @param   uPhase      The data phase.
     4334 */
     4335static DECLCALLBACK(int) pcnetLoadExec(PPDMDEVINS pDevIns, PSSMHANDLE pSSMHandle, uint32_t uVersion, uint32_t uPhase)
    43354336{
    43364337    PCNetState *pThis = PDMINS_2_DATA(pDevIns, PCNetState *);
    43374338    RTMAC       Mac;
    4338     if (   SSM_VERSION_MAJOR_CHANGED(u32Version, PCNET_SAVEDSTATE_VERSION)
    4339         || SSM_VERSION_MINOR(u32Version) < 7)
     4339    if (   SSM_VERSION_MAJOR_CHANGED(uVersion, PCNET_SAVEDSTATE_VERSION)
     4340        || SSM_VERSION_MINOR(uVersion) < 7)
    43404341        return VERR_SSM_UNSUPPORTED_DATA_UNIT_VERSION;
     4342    Assert(uPhase == SSM_PHASE_FINAL); NOREF(uPhase);
    43414343
    43424344    /* restore data */
     
    43454347    SSMR3GetS32(pSSMHandle, &pThis->iISR);
    43464348    SSMR3GetU32(pSSMHandle, &pThis->u32Lnkst);
    4347     if (   SSM_VERSION_MAJOR(u32Version) >  0
    4348         || SSM_VERSION_MINOR(u32Version) >= 9)
     4349    if (   SSM_VERSION_MAJOR(uVersion) >  0
     4350        || SSM_VERSION_MINOR(uVersion) >= 9)
    43494351    {
    43504352        SSMR3GetBool(pSSMHandle, &pThis->fPrivIfEnabled);
     
    43524354            LogRel(("PCNet#%d: Enabling private interface\n", PCNET_INST_NR));
    43534355    }
    4354     if (   SSM_VERSION_MAJOR(u32Version) >  0
    4355         || SSM_VERSION_MINOR(u32Version) >= 10)
     4356    if (   SSM_VERSION_MAJOR(uVersion) >  0
     4357        || SSM_VERSION_MINOR(uVersion) >= 10)
    43564358    {
    43574359        SSMR3GetBool(pSSMHandle, &pThis->fSignalRxMiss);
     
    43754377    if (pThis->fAm79C973)
    43764378    {
    4377         if (   SSM_VERSION_MAJOR(u32Version) >  0
    4378             || SSM_VERSION_MINOR(u32Version) >= 8)
     4379        if (   SSM_VERSION_MAJOR(uVersion) >  0
     4380            || SSM_VERSION_MINOR(uVersion) >= 8)
    43794381            TMR3TimerLoad(pThis->CTX_SUFF(pTimerSoftInt), pSSMHandle);
    43804382    }
     
    50875089        return rc;
    50885090
    5089     rc = PDMDevHlpSSMRegister(pDevIns, pDevIns->pDevReg->szDeviceName, iInstance,
    5090                               PCNET_SAVEDSTATE_VERSION, sizeof(*pThis),
    5091                               pcnetSavePrep, pcnetSaveExec, NULL,
    5092                               pcnetLoadPrep, pcnetLoadExec, NULL);
     5091    rc = PDMDevHlpSSMRegisterEx(pDevIns, PCNET_SAVEDSTATE_VERSION, sizeof(*pThis), NULL,
     5092                                NULL, NULL, NULL,
     5093                                pcnetSavePrep, pcnetSaveExec, NULL,
     5094                                pcnetLoadPrep, pcnetLoadExec, NULL);
    50935095    if (RT_FAILURE(rc))
    50945096        return rc;
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