VirtualBox

Ignore:
Timestamp:
Jan 25, 2010 2:21:13 PM (15 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
56881
Message:

PDM,*: Redid the PDM structure versions. Check the instance and helper versions in every device and driver constructor.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Devices/Audio/audiosniffer.c

    r25985 r26001  
    128128    PDMIBASE_RETURN_INTERFACE(pszIID, PDMIAUDIOSNIFFERPORT, &pThis->IPort);
    129129    return NULL;
     130}
     131
     132/**
     133 * Destruct a device instance.
     134 *
     135 * Most VM resources are freed by the VM. This callback is provided so that any non-VM
     136 * resources can be freed correctly.
     137 *
     138 * @returns VBox status.
     139 * @param   pDevIns     The device instance data.
     140 */
     141static DECLCALLBACK(int) audioSnifferR3Destruct(PPDMDEVINS pDevIns)
     142{
     143    PDMDEV_CHECK_VERSIONS_RETURN_QUIET(pDevIns);
     144
     145    /* Zero the global pointer. */
     146    g_pData = NULL;
     147
     148    return VINF_SUCCESS;
    130149}
    131150
     
    145164static DECLCALLBACK(int) audioSnifferR3Construct(PPDMDEVINS pDevIns, int iInstance, PCFGMNODE pCfgHandle)
    146165{
    147     int rc = VINF_SUCCESS;
    148 
     166    int                rc    = VINF_SUCCESS;
    149167    AUDIOSNIFFERSTATE *pThis = PDMINS_2_DATA(pDevIns, AUDIOSNIFFERSTATE *);
    150168
    151169    Assert(iInstance == 0);
     170    PDMDEV_CHECK_VERSIONS_RETURN(pDevIns);
    152171
    153172    /*
     
    208227
    209228    return rc;
    210 }
    211 
    212 /**
    213  * Destruct a device instance.
    214  *
    215  * Most VM resources are freed by the VM. This callback is provided so that any non-VM
    216  * resources can be freed correctly.
    217  *
    218  * @returns VBox status.
    219  * @param   pDevIns     The device instance data.
    220  */
    221 static DECLCALLBACK(int) audioSnifferR3Destruct(PPDMDEVINS pDevIns)
    222 {
    223     /* Zero the global pointer. */
    224     g_pData = NULL;
    225 
    226     return VINF_SUCCESS;
    227229}
    228230
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