VirtualBox

Changeset 92071 in vbox for trunk/include/VBox/vmm


Ignore:
Timestamp:
Oct 26, 2021 9:34:31 AM (3 years ago)
Author:
vboxsync
Message:

VMM/DevHlp: Added PDMDevHlpSSMRegisterLegacy for dealing with renamed and merged devices. bugref:8651

File:
1 edited

Legend:

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

    r91980 r92071  
    24252425
    24262426/** Current PDMDEVHLPR3 version number. */
    2427 #define PDM_DEVHLPR3_VERSION                    PDM_VERSION_MAKE_PP(0xffe7, 60, 0)
     2427#define PDM_DEVHLPR3_VERSION                    PDM_VERSION_MAKE_PP(0xffe7, 61, 0)
    24282428
    24292429/**
     
    28432843                                              PFNSSMDEVSAVEPREP pfnSavePrep, PFNSSMDEVSAVEEXEC pfnSaveExec, PFNSSMDEVSAVEDONE pfnSaveDone,
    28442844                                              PFNSSMDEVLOADPREP pfnLoadPrep, PFNSSMDEVLOADEXEC pfnLoadExec, PFNSSMDEVLOADDONE pfnLoadDone));
     2845
     2846    /**
     2847     * Register a save state data unit for backward compatibility.
     2848     *
     2849     * This is for migrating from an old device name to a new one or for merging
     2850     * devices.  It will only help loading old saved states.
     2851     *
     2852     * @returns VBox status.
     2853     * @param   pDevIns             The device instance.
     2854     * @param   pszOldName          The old unit name.
     2855     * @param   pfnLoadPrep         Prepare load callback, optional.
     2856     * @param   pfnLoadExec         Execute load callback, optional.
     2857     * @param   pfnLoadDone         Done load callback, optional.
     2858     * @remarks Caller enters the device critical section prior to invoking the
     2859     *          registered callback methods.
     2860     */
     2861    DECLR3CALLBACKMEMBER(int, pfnSSMRegisterLegacy,(PPDMDEVINS pDevIns, const char *pszOldName, PFNSSMDEVLOADPREP pfnLoadPrep,
     2862                                                    PFNSSMDEVLOADEXEC pfnLoadExec, PFNSSMDEVLOADDONE pfnLoadDone));
    28452863
    28462864    /** @name Exported SSM Functions
     
    68346852
    68356853/**
     6854 * @copydoc PDMDEVHLPR3::pfnSSMRegisterLegacy
     6855 */
     6856DECLINLINE(int) PDMDevHlpSSMRegisterLegacy(PPDMDEVINS pDevIns, const char *pszOldName, PFNSSMDEVLOADPREP pfnLoadPrep,
     6857                                           PFNSSMDEVLOADEXEC pfnLoadExec, PFNSSMDEVLOADDONE pfnLoadDone)
     6858{
     6859    return pDevIns->pHlpR3->pfnSSMRegisterLegacy(pDevIns, pszOldName, pfnLoadPrep, pfnLoadExec, pfnLoadDone);
     6860}
     6861
     6862/**
    68366863 * @copydoc PDMDEVHLPR3::pfnTimerCreate
    68376864 */
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