VirtualBox

Ignore:
Timestamp:
Aug 16, 2009 9:12:50 PM (15 years ago)
Author:
vboxsync
Message:

PDMDRVREG change (big changeset).

File:
1 edited

Legend:

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

    r13837 r22277  
    129129 * Construct a status driver instance.
    130130 *
    131  * @returns VBox status.
    132  * @param   pDrvIns     The driver instance data.
    133  *                      If the registration structure is needed, pDrvIns->pDrvReg points to it.
    134  * @param   pCfgHandle  Configuration node handle for the driver. Use this to obtain the configuration
    135  *                      of the driver instance. It's also found in pDrvIns->pCfgHandle, but like
    136  *                      iInstance it's expected to be used a bit in this function.
    137  */
    138 DECLCALLBACK(int) VMStatus::drvConstruct(PPDMDRVINS pDrvIns, PCFGMNODE pCfgHandle)
     131 * @copydoc FNPDMDRVCONSTRUCT
     132 */
     133DECLCALLBACK(int) VMStatus::drvConstruct(PPDMDRVINS pDrvIns, PCFGMNODE pCfgHandle, uint32_t fFlags)
    139134{
    140135    PDRVMAINSTATUS pData = PDMINS_2_DATA(pDrvIns, PDRVMAINSTATUS);
     
    146141    if (!CFGMR3AreValuesValid(pCfgHandle, "papLeds\0First\0Last\0"))
    147142        return VERR_PDM_DRVINS_UNKNOWN_CFG_VALUES;
    148     PPDMIBASE pBaseIgnore;
    149     int rc = pDrvIns->pDrvHlp->pfnAttach(pDrvIns, &pBaseIgnore);
    150     if (rc != VERR_PDM_NO_ATTACHED_DRIVER)
    151     {
    152         AssertMsgFailed(("Configuration error: Not possible to attach anything to this driver!\n"));
    153         return VERR_PDM_DRVINS_NO_ATTACH;
    154     }
     143    AssertMsgReturn(PDMDrvHlpNoAttach(pDrvIns) == VERR_PDM_NO_ATTACHED_DRIVER,
     144                    ("Configuration error: Not possible to attach anything to this driver!\n"),
     145                    VERR_PDM_DRVINS_NO_ATTACH);
    155146
    156147    /*
     
    163154     * Read config.
    164155     */
    165     rc = CFGMR3QueryPtr(pCfgHandle, "papLeds", (void **)&pData->papLeds);
     156    int rc = CFGMR3QueryPtr(pCfgHandle, "papLeds", (void **)&pData->papLeds);
    166157    if (RT_FAILURE(rc))
    167158    {
     
    244235    /* pfnResume */
    245236    NULL,
     237    /* pfnAttach */
     238    NULL,
    246239    /* pfnDetach */
    247     NULL
     240    NULL,
     241    /* pfnPowerOff */
     242    NULL,
     243    /* pfnSoftReset */
     244    NULL,
     245    /* u32EndVersion */
     246    PDM_DRVREG_VERSION
    248247};
     248
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