VirtualBox

Ignore:
Timestamp:
Aug 16, 2009 9:12:50 PM (16 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
51119
Message:

PDMDRVREG change (big changeset).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Devices/Network/DrvTAP.cpp

    r20708 r22277  
    882882 * Construct a TAP network transport driver instance.
    883883 *
    884  * @returns VBox status.
    885  * @param   pDrvIns     The driver instance data.
    886  *                      If the registration structure is needed, pDrvIns->pDrvReg points to it.
    887  * @param   pCfgHandle  Configuration node handle for the driver. Use this to obtain the configuration
    888  *                      of the driver instance. It's also found in pDrvIns->pCfgHandle, but like
    889  *                      iInstance it's expected to be used a bit in this function.
    890  */
    891 static DECLCALLBACK(int) drvTAPConstruct(PPDMDRVINS pDrvIns, PCFGMNODE pCfgHandle)
     884 * @copydoc FNPDMDRVCONSTRUCT
     885 */
     886static DECLCALLBACK(int) drvTAPConstruct(PPDMDRVINS pDrvIns, PCFGMNODE pCfgHandle, uint32_t fFlags)
    892887{
    893888    PDRVTAP pThis = PDMINS_2_DATA(pDrvIns, PDRVTAP);
     
    926921     * Check that no-one is attached to us.
    927922     */
    928     int rc = pDrvIns->pDrvHlp->pfnAttach(pDrvIns, NULL);
    929     if (rc != VERR_PDM_NO_ATTACHED_DRIVER)
    930         return PDMDRV_SET_ERROR(pDrvIns, VERR_PDM_DRVINS_NO_ATTACH,
    931                                 N_("Configuration error: Cannot attach drivers to the TAP driver"));
     923    AssertMsgReturn(PDMDrvHlpNoAttach(pDrvIns) == VERR_PDM_NO_ATTACHED_DRIVER,
     924                    ("Configuration error: Not possible to attach anything to this driver!\n"),
     925                    VERR_PDM_DRVINS_NO_ATTACH);
    932926
    933927    /*
     
    942936     * Read the configuration.
    943937     */
     938    int rc;
    944939#if defined(RT_OS_SOLARIS)   /** @todo Other platforms' TAP code should be moved here from ConsoleImpl & VBoxBFE. */
    945940    rc = CFGMR3QueryStringAlloc(pCfgHandle, "TAPSetupApplication", &pThis->pszSetupApplication);
     
    10961091    /* pfnResume */
    10971092    NULL,
     1093    /* pfnAttach */
     1094    NULL,
    10981095    /* pfnDetach */
     1096    NULL,
     1097    /* pfnPowerOff */
     1098    NULL,
     1099    /* pfnSoftReset */
    10991100    NULL,
    1100     /* pfnPowerOff */
    1101     NULL
     1101    /* u32EndVersion */
     1102    PDM_DRVREG_VERSION
    11021103};
     1104
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