Changeset 22277 in vbox for trunk/src/VBox/Main
- Timestamp:
- Aug 16, 2009 9:12:50 PM (15 years ago)
- Location:
- trunk/src/VBox/Main
- Files:
-
- 13 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/AudioSnifferInterface.cpp
r14772 r22277 157 157 158 158 /** 159 * Construct a AudioSniffer driver instance. 160 * 161 * @returns VBox status. 162 * @param pDrvIns The driver instance data. 163 * If the registration structure is needed, pDrvIns->pDrvReg points to it. 164 * @param pCfgHandle Configuration node handle for the driver. Use this to obtain the configuration 165 * of the driver instance. It's also found in pDrvIns->pCfgHandle, but like 166 * iInstance it's expected to be used a bit in this function. 167 */ 168 DECLCALLBACK(int) AudioSniffer::drvConstruct(PPDMDRVINS pDrvIns, PCFGMNODE pCfgHandle) 159 * Construct a AudioSniffer driver instance. 160 * 161 * @copydoc FNPDMDRVCONSTRUCT 162 */ 163 DECLCALLBACK(int) AudioSniffer::drvConstruct(PPDMDRVINS pDrvIns, PCFGMNODE pCfgHandle, uint32_t fFlags) 169 164 { 170 165 PDRVAUDIOSNIFFER pData = PDMINS_2_DATA(pDrvIns, PDRVAUDIOSNIFFER); … … 176 171 */ 177 172 if (!CFGMR3AreValuesValid(pCfgHandle, "Object\0")) 178 {179 173 return VERR_PDM_DRVINS_UNKNOWN_CFG_VALUES; 180 } 181 182 PPDMIBASE pBaseIgnore; 183 int rc = pDrvIns->pDrvHlp->pfnAttach(pDrvIns, &pBaseIgnore); 184 if (rc != VERR_PDM_NO_ATTACHED_DRIVER) 185 { 186 AssertMsgFailed(("Configuration error: Not possible to attach anything to this driver!\n")); 187 return VERR_PDM_DRVINS_NO_ATTACH; 188 } 174 AssertMsgReturn(PDMDrvHlpNoAttach(pDrvIns) == VERR_PDM_NO_ATTACHED_DRIVER, 175 ("Configuration error: Not possible to attach anything to this driver!\n"), 176 VERR_PDM_DRVINS_NO_ATTACH); 189 177 190 178 /* … … 211 199 */ 212 200 void *pv; 213 rc = CFGMR3QueryPtr(pCfgHandle, "Object", &pv);201 int rc = CFGMR3QueryPtr(pCfgHandle, "Object", &pv); 214 202 if (RT_FAILURE(rc)) 215 203 { … … 257 245 /* pfnResume */ 258 246 NULL, 247 /* pfnAttach */ 248 NULL, 259 249 /* pfnDetach */ 260 NULL 250 NULL, 251 /* pfnPowerOff */ 252 NULL, 253 /* pfnSoftReset */ 254 NULL, 255 /* u32EndVersion */ 256 PDM_DRVREG_VERSION 261 257 }; 262 258 /* vi: set tabstop=4 shiftwidth=4 expandtab: */ -
trunk/src/VBox/Main/ConsoleImpl.cpp
r22173 r22277 3066 3066 case DriveState_HostDriveCaptured: 3067 3067 { 3068 rc = PDMR3DeviceDetach (pVM, pszDevice, uInstance, uLun, PDM DEVATT_FLAGS_NOT_HOT_PLUG);3068 rc = PDMR3DeviceDetach (pVM, pszDevice, uInstance, uLun, PDM_TACH_FLAGS_NOT_HOT_PLUG); 3069 3069 if (rc == VINF_PDM_NO_DRIVER_ATTACHED_TO_LUN) 3070 3070 rc = VINF_SUCCESS; … … 3102 3102 * Detach existing driver chain (block). 3103 3103 */ 3104 int rc = PDMR3DeviceDetach (pVM, pszDevice, uInstance, uLun, PDM DEVATT_FLAGS_NOT_HOT_PLUG);3104 int rc = PDMR3DeviceDetach (pVM, pszDevice, uInstance, uLun, PDM_TACH_FLAGS_NOT_HOT_PLUG); 3105 3105 if (VBOX_FAILURE (rc)) 3106 3106 { … … 3132 3132 * Attempt to attach the driver. 3133 3133 */ 3134 rc = PDMR3DeviceAttach (pVM, pszDevice, uInstance, uLun, NULL, PDMDEVATT_FLAGS_NOT_HOT_PLUG);3134 rc = PDMR3DeviceAttach(pVM, pszDevice, uInstance, uLun, PDM_TACH_FLAGS_NOT_HOT_PLUG, NULL /*ppBase*/); 3135 3135 AssertRC (rc); 3136 3136 } … … 3188 3188 * Attach the driver. 3189 3189 */ 3190 rc = PDMR3DeviceAttach (pVM, pszDevice, uInstance, uLun, &pBase, PDMDEVATT_FLAGS_NOT_HOT_PLUG);3190 rc = PDMR3DeviceAttach(pVM, pszDevice, uInstance, uLun, PDM_TACH_FLAGS_NOT_HOT_PLUG, &pBase); 3191 3191 RC_CHECK(); 3192 3192 } … … 7085 7085 * Detach the driver and replace the config node. 7086 7086 */ 7087 rc = PDMR3DeviceDetach(pVM, pcszDevice, 0, iLUN, PDM DEVATT_FLAGS_NOT_HOT_PLUG); RC_CHECK();7087 rc = PDMR3DeviceDetach(pVM, pcszDevice, 0, iLUN, PDM_TACH_FLAGS_NOT_HOT_PLUG); RC_CHECK(); 7088 7088 CFGMR3RemoveNode(pCfg); 7089 7089 rc = CFGMR3InsertNode(pLunL1, "Config", &pCfg); RC_CHECK(); … … 7186 7186 * Attach the new driver. 7187 7187 */ 7188 rc = PDMR3DeviceAttach(pVM, pcszDevice, 0, iLUN, NULL, PDMDEVATT_FLAGS_NOT_HOT_PLUG); RC_CHECK();7188 rc = PDMR3DeviceAttach(pVM, pcszDevice, 0, iLUN, PDM_TACH_FLAGS_NOT_HOT_PLUG, NULL /*ppBase*/); RC_CHECK(); 7189 7189 7190 7190 LogFlowFunc (("Returns success\n")); … … 7506 7506 * Construct a status driver instance. 7507 7507 * 7508 * @returns VBox status. 7509 * @param pDrvIns The driver instance data. 7510 * If the registration structure is needed, pDrvIns->pDrvReg points to it. 7511 * @param pCfgHandle Configuration node handle for the driver. Use this to obtain the configuration 7512 * of the driver instance. It's also found in pDrvIns->pCfgHandle, but like 7513 * iInstance it's expected to be used a bit in this function. 7508 * @copydoc FNPDMDRVCONSTRUCT 7514 7509 */ 7515 DECLCALLBACK(int) Console::drvStatus_Construct(PPDMDRVINS pDrvIns, PCFGMNODE pCfgHandle )7510 DECLCALLBACK(int) Console::drvStatus_Construct(PPDMDRVINS pDrvIns, PCFGMNODE pCfgHandle, uint32_t fFlags) 7516 7511 { 7517 7512 PDRVMAINSTATUS pData = PDMINS_2_DATA(pDrvIns, PDRVMAINSTATUS); … … 7523 7518 if (!CFGMR3AreValuesValid(pCfgHandle, "papLeds\0First\0Last\0")) 7524 7519 return VERR_PDM_DRVINS_UNKNOWN_CFG_VALUES; 7525 PPDMIBASE pBaseIgnore; 7526 int rc = pDrvIns->pDrvHlp->pfnAttach(pDrvIns, &pBaseIgnore); 7527 if (rc != VERR_PDM_NO_ATTACHED_DRIVER) 7528 { 7529 AssertMsgFailed(("Configuration error: Not possible to attach anything to this driver!\n")); 7530 return VERR_PDM_DRVINS_NO_ATTACH; 7531 } 7520 AssertMsgReturn(PDMDrvHlpNoAttach(pDrvIns) == VERR_PDM_NO_ATTACHED_DRIVER, 7521 ("Configuration error: Not possible to attach anything to this driver!\n"), 7522 VERR_PDM_DRVINS_NO_ATTACH); 7532 7523 7533 7524 /* … … 7540 7531 * Read config. 7541 7532 */ 7542 rc = CFGMR3QueryPtr(pCfgHandle, "papLeds", (void **)&pData->papLeds);7533 int rc = CFGMR3QueryPtr(pCfgHandle, "papLeds", (void **)&pData->papLeds); 7543 7534 if (VBOX_FAILURE(rc)) 7544 7535 { … … 7621 7612 /* pfnResume */ 7622 7613 NULL, 7614 /* pfnAttach */ 7615 NULL, 7623 7616 /* pfnDetach */ 7624 NULL 7617 NULL, 7618 /* pfnPowerOff */ 7619 NULL, 7620 /* pfnSoftReset */ 7621 NULL, 7622 /* u32EndVersion */ 7623 PDM_DRVREG_VERSION 7625 7624 }; 7626 7625 -
trunk/src/VBox/Main/ConsoleImpl2.cpp
r22265 r22277 2773 2773 if (fAttachDetach) 2774 2774 { 2775 rc = PDMR3DeviceAttach(pVM, pszDevice, uInstance, uLun, NULL, 0 /*fFlags*/);2775 rc = PDMR3DeviceAttach(pVM, pszDevice, uInstance, uLun, 0 /*fFlags*/, NULL /*ppBase*/); 2776 2776 AssertRC(rc); 2777 2777 } -
trunk/src/VBox/Main/DisplayImpl.cpp
r22215 r22277 2427 2427 * Construct a display driver instance. 2428 2428 * 2429 * @returns VBox status. 2430 * @param pDrvIns The driver instance data. 2431 * If the registration structure is needed, pDrvIns->pDrvReg points to it. 2432 * @param pCfgHandle Configuration node handle for the driver. Use this to obtain the configuration 2433 * of the driver instance. It's also found in pDrvIns->pCfgHandle, but like 2434 * iInstance it's expected to be used a bit in this function. 2435 */ 2436 DECLCALLBACK(int) Display::drvConstruct(PPDMDRVINS pDrvIns, PCFGMNODE pCfgHandle) 2429 * @copydoc FNPDMDRVCONSTRUCT 2430 */ 2431 DECLCALLBACK(int) Display::drvConstruct(PPDMDRVINS pDrvIns, PCFGMNODE pCfgHandle, uint32_t fFlags) 2437 2432 { 2438 2433 PDRVMAINDISPLAY pData = PDMINS_2_DATA(pDrvIns, PDRVMAINDISPLAY); … … 2444 2439 if (!CFGMR3AreValuesValid(pCfgHandle, "Object\0")) 2445 2440 return VERR_PDM_DRVINS_UNKNOWN_CFG_VALUES; 2446 PPDMIBASE pBaseIgnore; 2447 int rc = pDrvIns->pDrvHlp->pfnAttach(pDrvIns, &pBaseIgnore); 2448 if (rc != VERR_PDM_NO_ATTACHED_DRIVER) 2449 { 2450 AssertMsgFailed(("Configuration error: Not possible to attach anything to this driver!\n")); 2451 return VERR_PDM_DRVINS_NO_ATTACH; 2452 } 2441 AssertMsgReturn(PDMDrvHlpNoAttach(pDrvIns) == VERR_PDM_NO_ATTACHED_DRIVER, 2442 ("Configuration error: Not possible to attach anything to this driver!\n"), 2443 VERR_PDM_DRVINS_NO_ATTACH); 2453 2444 2454 2445 /* … … 2489 2480 */ 2490 2481 void *pv; 2491 rc = CFGMR3QueryPtr(pCfgHandle, "Object", &pv);2482 int rc = CFGMR3QueryPtr(pCfgHandle, "Object", &pv); 2492 2483 if (RT_FAILURE(rc)) 2493 2484 { … … 2545 2536 /* pfnResume */ 2546 2537 NULL, 2538 /* pfnAttach */ 2539 NULL, 2547 2540 /* pfnDetach */ 2548 NULL 2541 NULL, 2542 /* pfnPowerOff */ 2543 NULL, 2544 /* pfnSoftReset */ 2545 NULL, 2546 /* u32EndVersion */ 2547 PDM_DRVREG_VERSION 2549 2548 }; 2550 2549 /* vi: set tabstop=4 shiftwidth=4 expandtab: */ -
trunk/src/VBox/Main/KeyboardImpl.cpp
r21878 r22277 272 272 * Construct a keyboard driver instance. 273 273 * 274 * @returns VBox status. 275 * @param pDrvIns The driver instance data. 276 * If the registration structure is needed, pDrvIns->pDrvReg points to it. 277 * @param pCfgHandle Configuration node handle for the driver. Use this to obtain the configuration 278 * of the driver instance. It's also found in pDrvIns->pCfgHandle, but like 279 * iInstance it's expected to be used a bit in this function. 280 */ 281 DECLCALLBACK(int) Keyboard::drvConstruct (PPDMDRVINS pDrvIns, PCFGMNODE pCfgHandle) 274 * @copydoc FNPDMDRVCONSTRUCT 275 */ 276 DECLCALLBACK(int) Keyboard::drvConstruct (PPDMDRVINS pDrvIns, PCFGMNODE pCfgHandle, uint32_t fFlags) 282 277 { 283 278 PDRVMAINKEYBOARD pData = PDMINS_2_DATA (pDrvIns, PDRVMAINKEYBOARD); … … 289 284 if (!CFGMR3AreValuesValid (pCfgHandle, "Object\0")) 290 285 return VERR_PDM_DRVINS_UNKNOWN_CFG_VALUES; 291 PPDMIBASE pBaseIgnore; 292 int rc = pDrvIns->pDrvHlp->pfnAttach (pDrvIns, &pBaseIgnore); 293 if (rc != VERR_PDM_NO_ATTACHED_DRIVER) 294 { 295 AssertMsgFailed (("Configuration error: Not possible to attach anything to this driver!\n")); 296 return VERR_PDM_DRVINS_NO_ATTACH; 297 } 286 AssertMsgReturn(PDMDrvHlpNoAttach(pDrvIns) == VERR_PDM_NO_ATTACHED_DRIVER, 287 ("Configuration error: Not possible to attach anything to this driver!\n"), 288 VERR_PDM_DRVINS_NO_ATTACH); 298 289 299 290 /* … … 318 309 */ 319 310 void *pv; 320 rc = CFGMR3QueryPtr (pCfgHandle, "Object", &pv);311 int rc = CFGMR3QueryPtr (pCfgHandle, "Object", &pv); 321 312 if (RT_FAILURE(rc)) 322 313 { … … 364 355 /* pfnResume */ 365 356 NULL, 357 /* pfnAttach */ 358 NULL, 366 359 /* pfnDetach */ 367 NULL 360 NULL, 361 /* pfnPowerOff */ 362 NULL, 363 /* pfnSoftReset */ 364 NULL, 365 /* u32EndVersion */ 366 PDM_DRVREG_VERSION 368 367 }; 369 368 /* vi: set tabstop=4 shiftwidth=4 expandtab: */ -
trunk/src/VBox/Main/MouseImpl.cpp
r21878 r22277 389 389 * Construct a mouse driver instance. 390 390 * 391 * @returns VBox status. 392 * @param pDrvIns The driver instance data. 393 * If the registration structure is needed, pDrvIns->pDrvReg points to it. 394 * @param pCfgHandle Configuration node handle for the driver. Use this to obtain the configuration 395 * of the driver instance. It's also found in pDrvIns->pCfgHandle, but like 396 * iInstance it's expected to be used a bit in this function. 397 */ 398 DECLCALLBACK(int) Mouse::drvConstruct(PPDMDRVINS pDrvIns, PCFGMNODE pCfgHandle) 391 * @copydoc FNPDMDRVCONSTRUCT 392 */ 393 DECLCALLBACK(int) Mouse::drvConstruct(PPDMDRVINS pDrvIns, PCFGMNODE pCfgHandle, uint32_t fFlags) 399 394 { 400 395 PDRVMAINMOUSE pData = PDMINS_2_DATA(pDrvIns, PDRVMAINMOUSE); … … 406 401 if (!CFGMR3AreValuesValid(pCfgHandle, "Object\0")) 407 402 return VERR_PDM_DRVINS_UNKNOWN_CFG_VALUES; 408 PPDMIBASE pBaseIgnore; 409 int rc = pDrvIns->pDrvHlp->pfnAttach(pDrvIns, &pBaseIgnore); 410 if (rc != VERR_PDM_NO_ATTACHED_DRIVER) 411 { 412 AssertMsgFailed(("Configuration error: Not possible to attach anything to this driver!\n")); 413 return VERR_PDM_DRVINS_NO_ATTACH; 414 } 403 AssertMsgReturn(PDMDrvHlpNoAttach(pDrvIns) == VERR_PDM_NO_ATTACHED_DRIVER, 404 ("Configuration error: Not possible to attach anything to this driver!\n"), 405 VERR_PDM_DRVINS_NO_ATTACH); 415 406 416 407 /* … … 433 424 */ 434 425 void *pv; 435 rc = CFGMR3QueryPtr(pCfgHandle, "Object", &pv);426 int rc = CFGMR3QueryPtr(pCfgHandle, "Object", &pv); 436 427 if (RT_FAILURE(rc)) 437 428 { … … 479 470 /* pfnResume */ 480 471 NULL, 472 /* pfnAttach */ 473 NULL, 481 474 /* pfnDetach */ 482 NULL 475 NULL, 476 /* pfnPowerOff */ 477 NULL, 478 /* pfnSoftReset */ 479 NULL, 480 /* u32EndVersion */ 481 PDM_DRVREG_VERSION 483 482 }; 484 483 /* vi: set tabstop=4 shiftwidth=4 expandtab: */ -
trunk/src/VBox/Main/VMMDevInterface.cpp
r21878 r22277 704 704 * Construct a VMMDev driver instance. 705 705 * 706 * @returns VBox status. 707 * @param pDrvIns The driver instance data. 708 * If the registration structure is needed, pDrvIns->pDrvReg points to it. 709 * @param pCfgHandle Configuration node handle for the driver. Use this to obtain the configuration 710 * of the driver instance. It's also found in pDrvIns->pCfgHandle, but like 711 * iInstance it's expected to be used a bit in this function. 712 */ 713 DECLCALLBACK(int) VMMDev::drvConstruct(PPDMDRVINS pDrvIns, PCFGMNODE pCfgHandle) 706 * @copydoc FNPDMDRVCONSTRUCT 707 */ 708 DECLCALLBACK(int) VMMDev::drvConstruct(PPDMDRVINS pDrvIns, PCFGMNODE pCfgHandle, uint32_t fFlags) 714 709 { 715 710 PDRVMAINVMMDEV pData = PDMINS_2_DATA(pDrvIns, PDRVMAINVMMDEV); … … 721 716 if (!CFGMR3AreValuesValid(pCfgHandle, "Object\0")) 722 717 return VERR_PDM_DRVINS_UNKNOWN_CFG_VALUES; 723 724 PPDMIBASE pBaseIgnore; 725 int rc = pDrvIns->pDrvHlp->pfnAttach(pDrvIns, &pBaseIgnore); 726 if (rc != VERR_PDM_NO_ATTACHED_DRIVER) 727 { 728 AssertMsgFailed(("Configuration error: Not possible to attach anything to this driver!\n")); 729 return VERR_PDM_DRVINS_NO_ATTACH; 730 } 718 AssertMsgReturn(PDMDrvHlpNoAttach(pDrvIns) == VERR_PDM_NO_ATTACHED_DRIVER, 719 ("Configuration error: Not possible to attach anything to this driver!\n"), 720 VERR_PDM_DRVINS_NO_ATTACH); 731 721 732 722 /* … … 779 769 */ 780 770 void *pv; 781 rc = CFGMR3QueryPtr(pCfgHandle, "Object", &pv);771 int rc = CFGMR3QueryPtr(pCfgHandle, "Object", &pv); 782 772 if (RT_FAILURE(rc)) 783 773 { … … 862 852 /* pfnResume */ 863 853 NULL, 854 /* pfnAttach */ 855 NULL, 864 856 /* pfnDetach */ 865 NULL 857 NULL, 858 /* pfnPowerOff */ 859 NULL, 860 /* pfnSoftReset */ 861 NULL, 862 /* u32EndVersion */ 863 PDM_DRVREG_VERSION 866 864 }; 867 865 /* vi: set tabstop=4 shiftwidth=4 expandtab: */ -
trunk/src/VBox/Main/include/AudioSnifferInterface.h
r21878 r22277 45 45 private: 46 46 static DECLCALLBACK(void *) drvQueryInterface(PPDMIBASE pInterface, PDMINTERFACE enmInterface); 47 static DECLCALLBACK(int) drvConstruct(PPDMDRVINS pDrvIns, PCFGMNODE pCfgHandle );47 static DECLCALLBACK(int) drvConstruct(PPDMDRVINS pDrvIns, PCFGMNODE pCfgHandle, uint32_t fFlags); 48 48 static DECLCALLBACK(void) drvDestruct(PPDMDRVINS pDrvIns); 49 49 -
trunk/src/VBox/Main/include/ConsoleImpl.h
r22166 r22277 485 485 static DECLCALLBACK(void) drvStatus_UnitChanged(PPDMILEDCONNECTORS pInterface, unsigned iLUN); 486 486 static DECLCALLBACK(void) drvStatus_Destruct(PPDMDRVINS pDrvIns); 487 static DECLCALLBACK(int) drvStatus_Construct(PPDMDRVINS pDrvIns, PCFGMNODE pCfgHandle );487 static DECLCALLBACK(int) drvStatus_Construct(PPDMDRVINS pDrvIns, PCFGMNODE pCfgHandle, uint32_t fFlags); 488 488 489 489 int mcAudioRefs; -
trunk/src/VBox/Main/include/DisplayImpl.h
r21878 r22277 262 262 263 263 static DECLCALLBACK(void*) drvQueryInterface(PPDMIBASE pInterface, PDMINTERFACE enmInterface); 264 static DECLCALLBACK(int) drvConstruct(PPDMDRVINS pDrvIns, PCFGMNODE pCfgHandle );264 static DECLCALLBACK(int) drvConstruct(PPDMDRVINS pDrvIns, PCFGMNODE pCfgHandle, uint32_t fFlags); 265 265 static DECLCALLBACK(void) drvDestruct(PPDMDRVINS pDrvIns); 266 266 static DECLCALLBACK(int) displayResizeCallback(PPDMIDISPLAYCONNECTOR pInterface, uint32_t bpp, void *pvVRAM, uint32_t cbLine, uint32_t cx, uint32_t cy); -
trunk/src/VBox/Main/include/KeyboardImpl.h
r21878 r22277 97 97 98 98 static DECLCALLBACK(void *) drvQueryInterface(PPDMIBASE pInterface, PDMINTERFACE enmInterface); 99 static DECLCALLBACK(int) drvConstruct(PPDMDRVINS pDrvIns, PCFGMNODE pCfgHandle );99 static DECLCALLBACK(int) drvConstruct(PPDMDRVINS pDrvIns, PCFGMNODE pCfgHandle, uint32_t fFlags); 100 100 static DECLCALLBACK(void) drvDestruct(PPDMDRVINS pDrvIns); 101 101 -
trunk/src/VBox/Main/include/MouseImpl.h
r21878 r22277 98 98 99 99 static DECLCALLBACK(void *) drvQueryInterface(PPDMIBASE pInterface, PDMINTERFACE enmInterface); 100 static DECLCALLBACK(int) drvConstruct(PPDMDRVINS pDrvIns, PCFGMNODE pCfgHandle );100 static DECLCALLBACK(int) drvConstruct(PPDMDRVINS pDrvIns, PCFGMNODE pCfgHandle, uint32_t fFlags); 101 101 static DECLCALLBACK(void) drvDestruct(PPDMDRVINS pDrvIns); 102 102 -
trunk/src/VBox/Main/include/VMMDev.h
r21878 r22277 61 61 private: 62 62 static DECLCALLBACK(void *) drvQueryInterface(PPDMIBASE pInterface, PDMINTERFACE enmInterface); 63 static DECLCALLBACK(int) drvConstruct(PPDMDRVINS pDrvIns, PCFGMNODE pCfgHandle );63 static DECLCALLBACK(int) drvConstruct(PPDMDRVINS pDrvIns, PCFGMNODE pCfgHandle, uint32_t fFlags); 64 64 static DECLCALLBACK(void) drvDestruct(PPDMDRVINS pDrvIns); 65 65 static DECLCALLBACK(void) drvReset(PPDMDRVINS pDrvIns);
Note:
See TracChangeset
for help on using the changeset viewer.