Changeset 22277 in vbox for trunk/src/VBox/Frontends/VBoxBFE/StatusImpl.cpp
- Timestamp:
- Aug 16, 2009 9:12:50 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VBoxBFE/StatusImpl.cpp
r13837 r22277 129 129 * Construct a status driver instance. 130 130 * 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 */ 133 DECLCALLBACK(int) VMStatus::drvConstruct(PPDMDRVINS pDrvIns, PCFGMNODE pCfgHandle, uint32_t fFlags) 139 134 { 140 135 PDRVMAINSTATUS pData = PDMINS_2_DATA(pDrvIns, PDRVMAINSTATUS); … … 146 141 if (!CFGMR3AreValuesValid(pCfgHandle, "papLeds\0First\0Last\0")) 147 142 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); 155 146 156 147 /* … … 163 154 * Read config. 164 155 */ 165 rc = CFGMR3QueryPtr(pCfgHandle, "papLeds", (void **)&pData->papLeds);156 int rc = CFGMR3QueryPtr(pCfgHandle, "papLeds", (void **)&pData->papLeds); 166 157 if (RT_FAILURE(rc)) 167 158 { … … 244 235 /* pfnResume */ 245 236 NULL, 237 /* pfnAttach */ 238 NULL, 246 239 /* pfnDetach */ 247 NULL 240 NULL, 241 /* pfnPowerOff */ 242 NULL, 243 /* pfnSoftReset */ 244 NULL, 245 /* u32EndVersion */ 246 PDM_DRVREG_VERSION 248 247 }; 248
Note:
See TracChangeset
for help on using the changeset viewer.