Changeset 22277 in vbox
- Timestamp:
- Aug 16, 2009 9:12:50 PM (16 years ago)
- svn:sync-xref-src-repo-rev:
- 51119
- Location:
- trunk
- Files:
-
- 1 added
- 59 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/VBox/err.h
r21927 r22277 1001 1001 * The PDMDEVREG::pfnAttach callback function is NULL. */ 1002 1002 #define VERR_PDM_DEVICE_NO_RT_ATTACH (-2853) 1003 /** The device doesn't support runtime driver detaching. 1004 * The PDMDEVREG::pfnDetach callback function is NULL. */ 1005 #define VERR_PDM_DEVICE_NO_RT_DETACH (-2854) 1003 1006 1004 /** Invalid host interface version. */ 1007 1005 #define VERR_PDM_HIF_INVALID_VERSION (-2855) -
trunk/include/VBox/pdmapi.h
r21217 r22277 107 107 VMMR3DECL(int) PDMR3QueryDeviceLun(PVM pVM, const char *pszDevice, unsigned iInstance, unsigned iLun, PPPDMIBASE ppBase); 108 108 VMMR3DECL(int) PDMR3QueryLun(PVM pVM, const char *pszDevice, unsigned iInstance, unsigned iLun, PPPDMIBASE ppBase); 109 VMMR3DECL(int) PDMR3DeviceAttach(PVM pVM, const char *pszDevice, unsigned iInstance, unsigned iLun, PPPDMIBASE ppBase, uint32_t fFlags);109 VMMR3DECL(int) PDMR3DeviceAttach(PVM pVM, const char *pszDevice, unsigned iInstance, unsigned iLun, uint32_t fFlags, PPDMIBASE *ppBase); 110 110 VMMR3DECL(int) PDMR3DeviceDetach(PVM pVM, const char *pszDevice, unsigned iInstance, unsigned iLun, uint32_t fFlags); 111 VMMR3DECL(int) PDMR3DriverAttach(PVM pVM, const char *pszDevice, unsigned iDevIns, unsigned iLun, 112 const char *pszDriver, unsigned iOccurance, uint32_t fFlags, PPPDMIBASE ppBase); 113 VMMR3DECL(int) PDMR3DriverDetach(PVM pVM, const char *pszDevice, unsigned iDevIns, unsigned iLun, 114 const char *pszDriver, unsigned iOccurance, uint32_t fFlags); 111 115 VMMR3DECL(void) PDMR3DmaRun(PVM pVM); 112 116 VMMR3DECL(int) PDMR3LockCall(PVM pVM); -
trunk/include/VBox/pdmdev.h
r21820 r22277 36 36 #include <VBox/pdmifs.h> 37 37 #include <VBox/pdmins.h> 38 #include <VBox/pdmdevdrv.h> 38 39 #include <VBox/iom.h> 39 40 #include <VBox/tm.h> … … 174 175 typedef FNPDMDEVPOWEROFF *PFNPDMDEVPOWEROFF; 175 176 176 /** PDM Device attach/detach callback Flags.177 * @{ */178 /** The attach/detach command is not a hotplug event. */179 #define PDMDEVATT_FLAGS_NOT_HOT_PLUG RT_BIT_32(0)180 /* @} */181 182 177 /** 183 178 * Attach command. … … 192 187 * @param pDevIns The device instance. 193 188 * @param iLUN The logical unit which is being detached. 194 * @param fFlags Flags, combination of the PDM DEVATT_FLAGS_* \#defines.189 * @param fFlags Flags, combination of the PDM_TACH_FLAGS_* \#defines. 195 190 */ 196 191 typedef DECLCALLBACK(int) FNPDMDEVATTACH(PPDMDEVINS pDevIns, unsigned iLUN, uint32_t fFlags); -
trunk/include/VBox/pdmdrv.h
r21363 r22277 36 36 #include <VBox/pdmifs.h> 37 37 #include <VBox/pdmins.h> 38 #include <VBox/pdmdevdrv.h> 38 39 #include <VBox/tm.h> 39 40 #include <VBox/ssm.h> … … 64 65 * of the driver instance. It's also found in pDrvIns->pCfgHandle as it's expected 65 66 * to be used frequently in this function. 66 */ 67 typedef DECLCALLBACK(int) FNPDMDRVCONSTRUCT(PPDMDRVINS pDrvIns, PCFGMNODE pCfgHandle); 67 * @param fFlags Flags, combination of the PDM_TACH_FLAGS_* \#defines. 68 */ 69 typedef DECLCALLBACK(int) FNPDMDRVCONSTRUCT(PPDMDRVINS pDrvIns, PCFGMNODE pCfgHandle, uint32_t fFlags); 68 70 /** Pointer to a FNPDMDRVCONSTRUCT() function. */ 69 71 typedef FNPDMDRVCONSTRUCT *PFNPDMDRVCONSTRUCT; … … 152 154 153 155 /** 156 * Attach command. 157 * 158 * This is called to let the drive attach to a driver at runtime. This is not 159 * called during VM construction, the driver constructor have to do this by 160 * calling PDMDrvHlpAttach. 161 * 162 * This is like plugging in the keyboard or mouse after turning on the PC. 163 * 164 * @returns VBox status code. 165 * @param pDrvIns The driver instance. 166 * @param fFlags Flags, combination of the PDM_TACH_FLAGS_* \#defines. 167 */ 168 typedef DECLCALLBACK(int) FNPDMDRVATTACH(PPDMDRVINS pDrvIns, uint32_t fFlags); 169 /** Pointer to a FNPDMDRVATTACH() function. */ 170 typedef FNPDMDRVATTACH *PFNPDMDRVATTACH; 171 172 /** 154 173 * Detach notification. 155 174 * … … 159 178 * This is like ejecting a cdrom or floppy. 160 179 * 161 * @param pDrvIns The driver instance. 162 */ 163 typedef DECLCALLBACK(void) FNPDMDRVDETACH(PPDMDRVINS pDrvIns); 180 * @param pDrvIns The driver instance. 181 * @param fFlags PDM_TACH_FLAGS_NOT_HOT_PLUG or 0. 182 */ 183 typedef DECLCALLBACK(void) FNPDMDRVDETACH(PPDMDRVINS pDrvIns, uint32_t fFlags); 164 184 /** Pointer to a FNPDMDRVDETACH() function. */ 165 185 typedef FNPDMDRVDETACH *PFNPDMDRVDETACH; … … 205 225 /** Resume notification - optional. */ 206 226 PFNPDMDRVRESUME pfnResume; 227 /** Attach command - optional. */ 228 PFNPDMDRVATTACH pfnAttach; 207 229 /** Detach notification - optional. */ 208 230 PFNPDMDRVDETACH pfnDetach; 209 231 /** Power off notification - optional. */ 210 232 PFNPDMDRVPOWEROFF pfnPowerOff; 211 233 /** @todo */ 234 PFNRT pfnSoftReset; 235 /** Initialization safty marker. */ 236 uint32_t u32VersionEnd; 212 237 } PDMDRVREG; 213 238 /** Pointer to a PDM Driver Structure. */ … … 217 242 218 243 /** Current DRVREG version number. */ 219 #define PDM_DRVREG_VERSION 0x800 10000220 221 /** PDM D eviceFlags.244 #define PDM_DRVREG_VERSION 0x80020000 245 246 /** PDM Driver Flags. 222 247 * @{ */ 223 248 /** @def PDM_DRVREG_FLAGS_HOST_BITS_DEFAULT … … 364 389 * @returns VBox status code. 365 390 * @param pDrvIns Driver instance. 391 * @param fFlags PDM_TACH_FLAGS_NOT_HOT_PLUG or 0. 366 392 * @param ppBaseInterface Where to store the pointer to the base interface. 367 393 */ 368 DECLR3CALLBACKMEMBER(int, pfnAttach,(PPDMDRVINS pDrvIns, PPDMIBASE *ppBaseInterface));394 DECLR3CALLBACKMEMBER(int, pfnAttach,(PPDMDRVINS pDrvIns, uint32_t fFlags, PPDMIBASE *ppBaseInterface)); 369 395 370 396 /** … … 372 398 * 373 399 * @returns VBox status code. 374 * @param pDrvIns Driver instance. 375 */ 376 DECLR3CALLBACKMEMBER(int, pfnDetach,(PPDMDRVINS pDrvIns)); 400 * @param pDrvIns Driver instance. 401 * @param fFlags PDM_TACH_FLAGS_NOT_HOT_PLUG or 0. 402 */ 403 DECLR3CALLBACKMEMBER(int, pfnDetach,(PPDMDRVINS pDrvIns, uint32_t fFlags)); 377 404 378 405 /** … … 382 409 * @returns VBox status code. 383 410 * @param pDrvIns Driver instance. 384 */ 385 DECLR3CALLBACKMEMBER(int, pfnDetachSelf,(PPDMDRVINS pDrvIns)); 411 * @param fFlags PDM_TACH_FLAGS_NOT_HOT_PLUG or 0. 412 */ 413 DECLR3CALLBACKMEMBER(int, pfnDetachSelf,(PPDMDRVINS pDrvIns, uint32_t fFlags)); 386 414 387 415 /** … … 816 844 817 845 /** 846 * @copydoc PDMDRVHLP::pfnAttach 847 */ 848 DECLINLINE(int) PDMDrvHlpAttach(PPDMDRVINS pDrvIns, uint32_t fFlags, PPDMIBASE *ppBaseInterface) 849 { 850 return pDrvIns->pDrvHlp->pfnAttach(pDrvIns, fFlags, ppBaseInterface); 851 } 852 853 /** 854 * Check that there is no driver below the us that we should attach to. 855 * 856 * @returns VERR_PDM_NO_ATTACHED_DRIVER if there is no driver. 857 * @param pDrvIns The driver instance. 858 */ 859 DECLINLINE(int) PDMDrvHlpNoAttach(PPDMDRVINS pDrvIns) 860 { 861 return pDrvIns->pDrvHlp->pfnAttach(pDrvIns, 0, NULL); 862 } 863 864 /** 865 * @copydoc PDMDRVHLP::pfnDetach 866 */ 867 DECLINLINE(int) PDMDrvHlpDetach(PPDMDRVINS pDrvIns, uint32_t fFlags) 868 { 869 return pDrvIns->pDrvHlp->pfnDetach(pDrvIns, fFlags); 870 } 871 872 /** 873 * @copydoc PDMDRVHLP::pfnDetachSelf 874 */ 875 DECLINLINE(int) PDMDrvHlpDetachSelf(PPDMDRVINS pDrvIns, uint32_t fFlags) 876 { 877 return pDrvIns->pDrvHlp->pfnDetachSelf(pDrvIns, fFlags); 878 } 879 880 /** 818 881 * @copydoc PDMDRVHLP::pfnPDMQueueCreate 819 882 */ -
trunk/src/VBox/Devices/Audio/audio.c
r20501 r22277 1971 1971 /** 1972 1972 * Construct an AUDIO driver instance. 1973 * 1974 * @returns VBox status. 1975 * @param pDrvIns The driver instance data. 1976 * If the registration structure is needed, pDrvIns->pDrvReg points to it. 1977 * @param pCfgHandle Configuration node handle for the driver. Use this to obtain the configuration 1978 * of the driver instance. It's also found in pDrvIns->pCfgHandle, but like 1979 * iInstance it's expected to be used a bit in this function. 1973 * 1974 * @copydoc FNPDMDRVCONSTRUCT 1980 1975 */ 1981 static DECLCALLBACK(int) drvAudioConstruct(PPDMDRVINS pDrvIns, PCFGMNODE pCfgHandle )1982 { 1983 int rc;1984 PDRVAUDIO pThis = PDMINS_2_DATA(pDrvIns, PDRVAUDIO);1985 char *drvname;1976 static DECLCALLBACK(int) drvAudioConstruct(PPDMDRVINS pDrvIns, PCFGMNODE pCfgHandle, uint32_t fFlags) 1977 { 1978 PDRVAUDIO pThis = PDMINS_2_DATA(pDrvIns, PDRVAUDIO); 1979 char *drvname; 1980 int rc; 1986 1981 1987 1982 LogFlow(("drvAUDIOConstruct:\n")); 1983 1988 1984 /* 1989 1985 * Validate the config. … … 2077 2073 /* pfnResume */ 2078 2074 audioResume, 2075 /* pfnAttach */ 2076 NULL, 2079 2077 /* pfnDetach */ 2080 2078 NULL, 2081 2079 /* pfnPowerOff */ 2082 drvAudioPowerOff 2080 drvAudioPowerOff, 2081 /* pfnSoftReset */ 2082 NULL, 2083 /* u32EndVersion */ 2084 PDM_DRVREG_VERSION 2083 2085 }; 2086 -
trunk/src/VBox/Devices/Graphics/DevVGA.cpp
r22274 r22277 5535 5535 PVGASTATE pThis = PDMINS_2_DATA(pDevIns, PVGASTATE); 5536 5536 5537 AssertMsgReturn(fFlags & PDM DEVATT_FLAGS_NOT_HOT_PLUG,5537 AssertMsgReturn(fFlags & PDM_TACH_FLAGS_NOT_HOT_PLUG, 5538 5538 ("VGA device does not support hotplugging\n"), 5539 5539 VERR_INVALID_PARAMETER); … … 5615 5615 PVGASTATE pThis = PDMINS_2_DATA(pDevIns, PVGASTATE); 5616 5616 5617 AssertMsg(fFlags & PDM DEVATT_FLAGS_NOT_HOT_PLUG,5617 AssertMsg(fFlags & PDM_TACH_FLAGS_NOT_HOT_PLUG, 5618 5618 ("VGA device does not support hotplugging\n")); 5619 5619 … … 5989 5989 * Attach to the display. 5990 5990 */ 5991 rc = vgaAttach(pDevIns, 0 /* display LUN # */, PDM DEVATT_FLAGS_NOT_HOT_PLUG);5991 rc = vgaAttach(pDevIns, 0 /* display LUN # */, PDM_TACH_FLAGS_NOT_HOT_PLUG); 5992 5992 if (RT_FAILURE(rc)) 5993 5993 return rc; -
trunk/src/VBox/Devices/Input/DevPS2.cpp
r21188 r22277 1537 1537 KBDState *pThis = PDMINS_2_DATA(pDevIns, KBDState *); 1538 1538 1539 AssertMsgReturn(fFlags & PDM DEVATT_FLAGS_NOT_HOT_PLUG,1539 AssertMsgReturn(fFlags & PDM_TACH_FLAGS_NOT_HOT_PLUG, 1540 1540 ("PS/2 device does not support hotplugging\n"), 1541 1541 VERR_INVALID_PARAMETER); … … 1730 1730 * Attach to the keyboard and mouse drivers. 1731 1731 */ 1732 rc = kbdAttach(pDevIns, 0 /* keyboard LUN # */, PDM DEVATT_FLAGS_NOT_HOT_PLUG);1732 rc = kbdAttach(pDevIns, 0 /* keyboard LUN # */, PDM_TACH_FLAGS_NOT_HOT_PLUG); 1733 1733 if (RT_FAILURE(rc)) 1734 1734 return rc; 1735 rc = kbdAttach(pDevIns, 1 /* aux/mouse LUN # */, PDM DEVATT_FLAGS_NOT_HOT_PLUG);1735 rc = kbdAttach(pDevIns, 1 /* aux/mouse LUN # */, PDM_TACH_FLAGS_NOT_HOT_PLUG); 1736 1736 if (RT_FAILURE(rc)) 1737 1737 return rc; -
trunk/src/VBox/Devices/Input/DrvKeyboardQueue.cpp
r21363 r22277 240 240 * Construct a keyboard driver instance. 241 241 * 242 * @returns VBox status. 243 * @param pDrvIns The driver instance data. 244 * If the registration structure is needed, pDrvIns->pDrvReg points to it. 245 * @param pCfgHandle Configuration node handle for the driver. Use this to obtain the configuration 246 * of the driver instance. It's also found in pDrvIns->pCfgHandle, but like 247 * iInstance it's expected to be used a bit in this function. 248 */ 249 static DECLCALLBACK(int) drvKbdQueueConstruct(PPDMDRVINS pDrvIns, PCFGMNODE pCfgHandle) 242 * @copydoc FNPDMDRVCONSTRUCT 243 */ 244 static DECLCALLBACK(int) drvKbdQueueConstruct(PPDMDRVINS pDrvIns, PCFGMNODE pCfgHandle, uint32_t fFlags) 250 245 { 251 246 PDRVKBDQUEUE pDrv = PDMINS_2_DATA(pDrvIns, PDRVKBDQUEUE); … … 283 278 */ 284 279 PPDMIBASE pDownBase; 285 int rc = pDrvIns->pDrvHlp->pfnAttach(pDrvIns, &pDownBase);280 int rc = PDMDrvHlpAttach(pDrvIns, fFlags, &pDownBase); 286 281 if (RT_FAILURE(rc)) 287 282 { … … 363 358 /* pfnResume */ 364 359 drvKbdQueueResume, 360 /* pfnAttach */ 361 NULL, 365 362 /* pfnDetach */ 366 363 NULL, 367 /** pfnPowerOff */ 368 drvKbdQueuePowerOff 364 /* pfnPowerOff */ 365 drvKbdQueuePowerOff, 366 /* pfnSoftReset */ 367 NULL, 368 /* u32EndVersion */ 369 PDM_DRVREG_VERSION 369 370 }; 370 371 -
trunk/src/VBox/Devices/Input/DrvMouseQueue.cpp
r21363 r22277 226 226 227 227 /** 228 * Construct a mouse driver instance. 229 * 230 * @returns VBox status. 231 * @param pDrvIns The driver instance data. 232 * If the registration structure is needed, pDrvIns->pDrvReg points to it. 233 * @param pCfgHandle Configuration node handle for the driver. Use this to obtain the configuration 234 * of the driver instance. It's also found in pDrvIns->pCfgHandle, but like 235 * iInstance it's expected to be used a bit in this function. 236 */ 237 static DECLCALLBACK(int) drvMouseQueueConstruct(PPDMDRVINS pDrvIns, PCFGMNODE pCfgHandle) 228 * Construct a mouse driver instance. 229 * 230 * @copydoc FNPDMDRVCONSTRUCT 231 */ 232 static DECLCALLBACK(int) drvMouseQueueConstruct(PPDMDRVINS pDrvIns, PCFGMNODE pCfgHandle, uint32_t fFlags) 238 233 { 239 234 PDRVMOUSEQUEUE pDrv = PDMINS_2_DATA(pDrvIns, PDRVMOUSEQUEUE); … … 269 264 */ 270 265 PPDMIBASE pDownBase; 271 int rc = pDrvIns->pDrvHlp->pfnAttach(pDrvIns, &pDownBase);266 int rc = PDMDrvHlpAttach(pDrvIns, fFlags, &pDownBase); 272 267 if (RT_FAILURE(rc)) 273 268 { … … 349 344 /* pfnResume */ 350 345 drvMouseQueueResume, 346 /* pfnAttach */ 347 NULL, 351 348 /* pfnDetach */ 352 349 NULL, 353 /** pfnPowerOff */ 354 drvMouseQueuePowerOff 350 /* pfnPowerOff */ 351 drvMouseQueuePowerOff, 352 /* pfnSoftReset */ 353 NULL, 354 /* u32EndVersion */ 355 PDM_DRVREG_VERSION 355 356 }; 356 357 357 -
trunk/src/VBox/Devices/Network/DrvIntNet.cpp
r20708 r22277 743 743 * Construct a TAP network transport driver instance. 744 744 * 745 * @returns VBox status. 746 * @param pDrvIns The driver instance data. 747 * If the registration structure is needed, pDrvIns->pDrvReg points to it. 748 * @param pCfgHandle Configuration node handle for the driver. Use this to obtain the configuration 749 * of the driver instance. It's also found in pDrvIns->pCfgHandle, but like 750 * iInstance it's expected to be used a bit in this function. 751 */ 752 static DECLCALLBACK(int) drvIntNetConstruct(PPDMDRVINS pDrvIns, PCFGMNODE pCfgHandle) 745 * @copydoc FNPDMDRVCONSTRUCT 746 */ 747 static DECLCALLBACK(int) drvIntNetConstruct(PPDMDRVINS pDrvIns, PCFGMNODE pCfgHandle, uint32_t fFlags) 753 748 { 754 749 PDRVINTNET pThis = PDMINS_2_DATA(pDrvIns, PDRVINTNET); … … 796 791 * Check that no-one is attached to us. 797 792 */ 798 int rc = pDrvIns->pDrvHlp->pfnAttach(pDrvIns, NULL); 799 if (rc != VERR_PDM_NO_ATTACHED_DRIVER) 800 { 801 AssertMsgFailed(("Configuration error: Cannot attach drivers to the TAP driver!\n")); 802 return VERR_PDM_DRVINS_NO_ATTACH; 803 } 793 AssertMsgReturn(PDMDrvHlpNoAttach(pDrvIns) == VERR_PDM_NO_ATTACHED_DRIVER, 794 ("Configuration error: Not possible to attach anything to this driver!\n"), 795 VERR_PDM_DRVINS_NO_ATTACH); 804 796 805 797 /* … … 826 818 * The name of the internal network to connect to. 827 819 */ 828 rc = CFGMR3QueryString(pCfgHandle, "Network", OpenReq.szNetwork, sizeof(OpenReq.szNetwork));820 int rc = CFGMR3QueryString(pCfgHandle, "Network", OpenReq.szNetwork, sizeof(OpenReq.szNetwork)); 829 821 if (RT_FAILURE(rc)) 830 822 return PDMDRV_SET_ERROR(pDrvIns, rc, … … 1141 1133 /* pfnResume */ 1142 1134 drvIntNetResume, 1135 /* pfnAttach */ 1136 NULL, 1143 1137 /* pfnDetach */ 1144 1138 NULL, 1145 1139 /* pfnPowerOff */ 1146 drvIntNetPowerOff 1140 drvIntNetPowerOff, 1141 /* pfnSoftReset */ 1142 NULL, 1143 /* u32EndVersion */ 1144 PDM_DRVREG_VERSION 1147 1145 }; 1148 1146 -
trunk/src/VBox/Devices/Network/DrvNAT.cpp
r22252 r22277 855 855 * Construct a NAT network transport driver instance. 856 856 * 857 * @returns VBox status. 858 * @param pDrvIns The driver instance data. 859 * If the registration structure is needed, pDrvIns->pDrvReg points to it. 860 * @param pCfgHandle Configuration node handle for the driver. Use this to obtain the configuration 861 * of the driver instance. It's also found in pDrvIns->pCfgHandle, but like 862 * iInstance it's expected to be used a bit in this function. 863 */ 864 static DECLCALLBACK(int) drvNATConstruct(PPDMDRVINS pDrvIns, PCFGMNODE pCfgHandle) 857 * @copydoc FNPDMDRVCONSTRUCT 858 */ 859 static DECLCALLBACK(int) drvNATConstruct(PPDMDRVINS pDrvIns, PCFGMNODE pCfgHandle, uint32_t fFlags) 865 860 { 866 861 PDRVNAT pThis = PDMINS_2_DATA(pDrvIns, PDRVNAT); 867 char szNetAddr[16];868 char szNetwork[32]; /* xxx.xxx.xxx.xxx/yy */869 862 870 863 LogFlow(("drvNATConstruct:\n")); … … 873 866 * Validate the config. 874 867 */ 875 if (!CFGMR3AreValuesValid(pCfgHandle, "PassDomain\0TFTPPrefix\0BootFile\0Network" 876 "\0NextServer\0DNSProxy\0BindIP\0" 877 "SocketRcvBuf\0SocketSndBuf\0TcpRcvSpace\0TcpSndSpace\0")) 868 if (!CFGMR3AreValuesValid(pCfgHandle, 869 "PassDomain\0TFTPPrefix\0BootFile\0Network" 870 "\0NextServer\0DNSProxy\0BindIP\0" 871 "SocketRcvBuf\0SocketSndBuf\0TcpRcvSpace\0TcpSndSpace\0")) 878 872 return PDMDRV_SET_ERROR(pDrvIns, VERR_PDM_DRVINS_UNKNOWN_CFG_VALUES, 879 873 N_("Unknown NAT configuration option, only supports PassDomain," … … 928 922 929 923 /* Generate a network address for this network card. */ 924 char szNetwork[32]; /* xxx.xxx.xxx.xxx/yy */ 930 925 GET_STRING(rc, pThis, pCfgHandle, "Network", szNetwork[0], sizeof(szNetwork)); 931 926 if (rc == VERR_CFGM_VALUE_NOT_FOUND) … … 940 935 pDrvIns->iInstance, szNetwork); 941 936 937 char szNetAddr[16]; 942 938 RTStrPrintf(szNetAddr, sizeof(szNetAddr), "%d.%d.%d.%d", 943 939 (Network & 0xFF000000) >> 24, (Network & 0xFF0000) >> 16, … … 979 975 #ifdef VBOX_WITH_STATISTICS 980 976 PDMDrvHlpSTAMRegisterF(pDrvIns, &pThis->StatQueuePktSent, STAMTYPE_COUNTER, 981 STAMVISIBILITY_ALWAYS, STAMUNIT_COUNT, "counting packet sent viai "982 "PDM queue", "/Drivers/NAT%u/QueuePacketSent", pDrvIns->iInstance);977 STAMVISIBILITY_ALWAYS, STAMUNIT_COUNT, "counting packet sent viai " 978 "PDM queue", "/Drivers/NAT%u/QueuePacketSent", pDrvIns->iInstance); 983 979 PDMDrvHlpSTAMRegisterF(pDrvIns, &pThis->StatQueuePktDropped, STAMTYPE_COUNTER, 984 STAMVISIBILITY_ALWAYS, STAMUNIT_COUNT, "counting packet sent via PDM"985 " queue", "/Drivers/NAT%u/QueuePacketDropped", pDrvIns->iInstance);980 STAMVISIBILITY_ALWAYS, STAMUNIT_COUNT, "counting packet sent via PDM" 981 " queue", "/Drivers/NAT%u/QueuePacketDropped", pDrvIns->iInstance); 986 982 PDMDrvHlpSTAMRegisterF(pDrvIns, &pThis->StatConsumerFalse, STAMTYPE_COUNTER, 987 STAMVISIBILITY_ALWAYS, STAMUNIT_COUNT, "counting PDM consumer false"988 " queue", "/Drivers/NAT%u/PDMConsumerFalse", pDrvIns->iInstance);983 STAMVISIBILITY_ALWAYS, STAMUNIT_COUNT, "counting PDM consumer false" 984 " queue", "/Drivers/NAT%u/PDMConsumerFalse", pDrvIns->iInstance); 989 985 # ifdef SLIRP_SPLIT_CAN_OUTPUT 990 986 PDMDrvHlpSTAMRegisterF(pDrvIns, &pThis->StatNATRxWakeups, STAMTYPE_COUNTER, 991 STAMVISIBILITY_ALWAYS, STAMUNIT_COUNT, "counting wakeups of NATRX"992 " thread", "/Drivers/NAT%u/NATRxWakeups", pDrvIns->iInstance);987 STAMVISIBILITY_ALWAYS, STAMUNIT_COUNT, "counting wakeups of NATRX" 988 " thread", "/Drivers/NAT%u/NATRxWakeups", pDrvIns->iInstance); 993 989 # endif 994 990 #endif … … 1112 1108 /* pfnResume */ 1113 1109 NULL, 1110 /* pfnAttach */ 1111 NULL, 1114 1112 /* pfnDetach */ 1113 NULL, 1114 /* pfnPowerOff */ 1115 NULL, 1116 /* pfnSoftReset */ 1115 1117 NULL, 1116 /* pfnPowerOff*/1117 NULL1118 /* u32EndVersion */ 1119 PDM_DRVREG_VERSION 1118 1120 }; 1121 -
trunk/src/VBox/Devices/Network/DrvNetSniffer.cpp
r15518 r22277 302 302 * Construct a NAT network transport driver instance. 303 303 * 304 * @returns VBox status. 305 * @param pDrvIns The driver instance data. 306 * If the registration structure is needed, pDrvIns->pDrvReg points to it. 307 * @param pCfgHandle Configuration node handle for the driver. Use this to obtain the configuration 308 * of the driver instance. It's also found in pDrvIns->pCfgHandle, but like 309 * iInstance it's expected to be used a bit in this function. 310 */ 311 static DECLCALLBACK(int) drvNetSnifferConstruct(PPDMDRVINS pDrvIns, PCFGMNODE pCfgHandle) 304 * @copydoc FNPDMDRVCONSTRUCT 305 */ 306 static DECLCALLBACK(int) drvNetSnifferConstruct(PPDMDRVINS pDrvIns, PCFGMNODE pCfgHandle, uint32_t fFlags) 312 307 { 313 308 PDRVNETSNIFFER pThis = PDMINS_2_DATA(pDrvIns, PDRVNETSNIFFER); … … 380 375 */ 381 376 PPDMIBASE pBaseDown; 382 rc = pDrvIns->pDrvHlp->pfnAttach(pDrvIns, &pBaseDown);377 rc = PDMDrvHlpAttach(pDrvIns, fFlags, &pBaseDown); 383 378 if (rc == VERR_PDM_NO_ATTACHED_DRIVER) 384 379 pThis->pConnector = NULL; … … 458 453 /* pfnResume */ 459 454 NULL, 455 /* pfnAttach */ 456 NULL, 460 457 /* pfnDetach */ 461 NULL, 458 NULL, 462 459 /* pfnPowerOff */ 463 NULL 460 NULL, 461 /* pfnSoftReset */ 462 NULL, 463 /* u32EndVersion */ 464 PDM_DRVREG_VERSION 464 465 }; 465 466 -
trunk/src/VBox/Devices/Network/DrvTAP.cpp
r20708 r22277 882 882 * Construct a TAP network transport driver instance. 883 883 * 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 */ 886 static DECLCALLBACK(int) drvTAPConstruct(PPDMDRVINS pDrvIns, PCFGMNODE pCfgHandle, uint32_t fFlags) 892 887 { 893 888 PDRVTAP pThis = PDMINS_2_DATA(pDrvIns, PDRVTAP); … … 926 921 * Check that no-one is attached to us. 927 922 */ 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); 932 926 933 927 /* … … 942 936 * Read the configuration. 943 937 */ 938 int rc; 944 939 #if defined(RT_OS_SOLARIS) /** @todo Other platforms' TAP code should be moved here from ConsoleImpl & VBoxBFE. */ 945 940 rc = CFGMR3QueryStringAlloc(pCfgHandle, "TAPSetupApplication", &pThis->pszSetupApplication); … … 1096 1091 /* pfnResume */ 1097 1092 NULL, 1093 /* pfnAttach */ 1094 NULL, 1098 1095 /* pfnDetach */ 1096 NULL, 1097 /* pfnPowerOff */ 1098 NULL, 1099 /* pfnSoftReset */ 1099 1100 NULL, 1100 /* pfnPowerOff*/1101 NULL1101 /* u32EndVersion */ 1102 PDM_DRVREG_VERSION 1102 1103 }; 1104 -
trunk/src/VBox/Devices/PC/DrvACPI.cpp
r19967 r22277 724 724 * Construct an ACPI driver instance. 725 725 * 726 * @returns VBox status. 727 * @param pDrvIns The driver instance data. 728 * If the registration structure is needed, pDrvIns->pDrvReg points to it. 729 * @param pCfgHandle Configuration node handle for the driver. Use this to obtain the configuration 730 * of the driver instance. It's also found in pDrvIns->pCfgHandle, but like 731 * iInstance it's expected to be used a bit in this function. 726 * @copydoc FNPDMDRVCONSTRUCT 732 727 */ 733 static DECLCALLBACK(int) drvACPIConstruct(PPDMDRVINS pDrvIns, PCFGMNODE pCfgHandle )728 static DECLCALLBACK(int) drvACPIConstruct(PPDMDRVINS pDrvIns, PCFGMNODE pCfgHandle, uint32_t fFlags) 734 729 { 735 730 PDRVACPI pThis = PDMINS_2_DATA(pDrvIns, PDRVACPI); … … 754 749 * Check that no-one is attached to us. 755 750 */ 756 int rc = pDrvIns->pDrvHlp->pfnAttach(pDrvIns, NULL); 757 if (rc != VERR_PDM_NO_ATTACHED_DRIVER) 758 { 759 AssertMsgFailed(("Configuration error: Cannot attach drivers to the ACPI driver!\n")); 760 return VERR_PDM_DRVINS_NO_ATTACH; 761 } 751 AssertMsgReturn(PDMDrvHlpNoAttach(pDrvIns) == VERR_PDM_NO_ATTACHED_DRIVER, 752 ("Configuration error: Not possible to attach anything to this driver!\n"), 753 VERR_PDM_DRVINS_NO_ATTACH); 762 754 763 755 /* … … 768 760 if (!pThis->pPort) 769 761 { 770 AssertMsgFailed(("Configuration error: " 771 "the above device/driver didn't export the ACPI port interface!\n")); 762 AssertMsgFailed(("Configuration error: the above device/driver didn't export the ACPI port interface!\n")); 772 763 return VERR_PDM_MISSING_INTERFACE_ABOVE; 773 764 } … … 810 801 /* pfnResume */ 811 802 NULL, 803 /* pfnAttach */ 804 NULL, 812 805 /* pfnDetach */ 806 NULL, 807 /* pfnPowerOff */ 808 NULL, 809 /* pfnSoftReset */ 813 810 NULL, 814 /* pfnPowerOff*/815 NULL811 /* u32EndVersion */ 812 PDM_DRVREG_VERSION 816 813 }; 817 814 -
trunk/src/VBox/Devices/Parallel/DrvHostParallel.cpp
r20961 r22277 260 260 /** 261 261 * Construct a host parallel driver instance. 262 * 263 * @returns VBox status. 264 * @param pDrvIns The driver instance data. 265 * If the registration structure is needed, 266 * pDrvIns->pDrvReg points to it. 267 * @param pCfgHandle Configuration node handle for the driver. Use this to 268 * obtain the configuration of the driver instance. It's 269 * also found in pDrvIns->pCfgHandle as it's expected to 270 * be used frequently in this function. 271 */ 272 static DECLCALLBACK(int) drvHostParallelConstruct(PPDMDRVINS pDrvIns, PCFGMNODE pCfgHandle) 262 * 263 * @copydoc FNPDMDRVCONSTRUCT 264 */ 265 static DECLCALLBACK(int) drvHostParallelConstruct(PPDMDRVINS pDrvIns, PCFGMNODE pCfgHandle, uint32_t fFlags) 273 266 { 274 267 PDRVHOSTPARALLEL pThis = PDMINS_2_DATA(pDrvIns, PDRVHOSTPARALLEL); … … 437 430 /* pfnResume */ 438 431 NULL, 432 /* pfnAttach */ 433 NULL, 439 434 /* pfnDetach */ 440 NULL, 441 /** pfnPowerOff */ 442 NULL 435 NULL, 436 /* pfnPowerOff */ 437 NULL, 438 /* pfnSoftReset */ 439 NULL, 440 /* u32EndVersion */ 441 PDM_DRVREG_VERSION 443 442 }; 444 443 -
trunk/src/VBox/Devices/Serial/DrvChar.cpp
r19624 r22277 288 288 /** 289 289 * Construct a char driver instance. 290 * 291 * @returns VBox status. 292 * @param pDrvIns The driver instance data. 293 * If the registration structure is needed, 294 * pDrvIns->pDrvReg points to it. 295 * @param pCfgHandle Configuration node handle for the driver. Use this to 296 * obtain the configuration of the driver instance. It's 297 * also found in pDrvIns->pCfgHandle as it's expected to 298 * be used frequently in this function. 299 */ 300 static DECLCALLBACK(int) drvCharConstruct(PPDMDRVINS pDrvIns, PCFGMNODE pCfgHandle) 290 * 291 * @copydoc FNPDMDRVCONSTRUCT 292 */ 293 static DECLCALLBACK(int) drvCharConstruct(PPDMDRVINS pDrvIns, PCFGMNODE pCfgHandle, uint32_t fFlags) 301 294 { 302 295 PDRVCHAR pThis = PDMINS_2_DATA(pDrvIns, PDRVCHAR); … … 326 319 */ 327 320 PPDMIBASE pBase; 328 int rc = pDrvIns->pDrvHlp->pfnAttach(pDrvIns, &pBase);321 int rc = PDMDrvHlpAttach(pDrvIns, fFlags, &pBase); 329 322 if (RT_FAILURE(rc)) 330 323 return rc; /* Don't call PDMDrvHlpVMSetError here as we assume that the driver already set an appropriate error */ … … 428 421 /* pfnResume */ 429 422 NULL, 423 /* pfnAttach */ 424 NULL, 430 425 /* pfnDetach */ 431 NULL, 432 /** pfnPowerOff */ 433 NULL 426 NULL, 427 /* pfnPowerOff */ 428 NULL, 429 /* pfnSoftReset */ 430 NULL, 431 /* u32EndVersion */ 432 PDM_DRVREG_VERSION 434 433 }; 435 434 -
trunk/src/VBox/Devices/Serial/DrvHostSerial.cpp
r22072 r22277 1178 1178 /** 1179 1179 * Construct a char driver instance. 1180 * 1181 * @returns VBox status. 1182 * @param pDrvIns The driver instance data. 1183 * If the registration structure is needed, 1184 * pDrvIns->pDrvReg points to it. 1185 * @param pCfgHandle Configuration node handle for the driver. Use this to 1186 * obtain the configuration of the driver instance. It's 1187 * also found in pDrvIns->pCfgHandle as it's expected to 1188 * be used frequently in this function. 1180 * 1181 * @copydoc FNPDMDRVCONSTRUCT 1189 1182 */ 1190 static DECLCALLBACK(int) drvHostSerialConstruct(PPDMDRVINS pDrvIns, PCFGMNODE pCfgHandle )1183 static DECLCALLBACK(int) drvHostSerialConstruct(PPDMDRVINS pDrvIns, PCFGMNODE pCfgHandle, uint32_t fFlags) 1191 1184 { 1192 1185 PDRVHOSTSERIAL pThis = PDMINS_2_DATA(pDrvIns, PDRVHOSTSERIAL); … … 1465 1458 /* pfnResume */ 1466 1459 NULL, 1460 /* pfnAttach */ 1461 NULL, 1467 1462 /* pfnDetach */ 1463 NULL, 1464 /* pfnPowerOff */ 1465 NULL, 1466 /* pfnSoftReset */ 1468 1467 NULL, 1469 /* * pfnPowerOff*/1470 NULL1468 /* u32EndVersion */ 1469 PDM_DRVREG_VERSION 1471 1470 }; 1472 1471 -
trunk/src/VBox/Devices/Serial/DrvNamedPipe.cpp
r18443 r22277 396 396 * Construct a named pipe stream driver instance. 397 397 * 398 * @returns VBox status. 399 * @param pDrvIns The driver instance data. 400 * If the registration structure is needed, pDrvIns->pDrvReg points to it. 401 * @param pCfgHandle Configuration node handle for the driver. Use this to obtain the configuration 402 * of the driver instance. It's also found in pDrvIns->pCfgHandle, but like 403 * iInstance it's expected to be used a bit in this function. 404 */ 405 static DECLCALLBACK(int) drvNamedPipeConstruct(PPDMDRVINS pDrvIns, PCFGMNODE pCfgHandle) 398 * @copydoc FNPDMDRVCONSTRUCT 399 */ 400 static DECLCALLBACK(int) drvNamedPipeConstruct(PPDMDRVINS pDrvIns, PCFGMNODE pCfgHandle, uint32_t fFlags) 406 401 { 407 402 int rc; … … 646 641 /* pfnResume */ 647 642 NULL, 643 /* pfnAttach */ 644 NULL, 648 645 /* pfnDetach */ 649 646 NULL, 650 647 /* pfnPowerOff */ 651 648 drvNamedPipePowerOff, 649 /* pfnSoftReset */ 650 NULL, 651 /* u32EndVersion */ 652 PDM_DRVREG_VERSION 652 653 }; 654 -
trunk/src/VBox/Devices/Serial/DrvRawFile.cpp
r19626 r22277 1 /** @file 2 * 3 * VBox stream devices: 4 * Raw file output 1 /* $Id$ */ 2 /** @file 3 * VBox stream drivers - Raw file output. 5 4 */ 6 5 … … 25 24 * Header Files * 26 25 *******************************************************************************/ 27 #define LOG_GROUP LOG_GROUP_D RV_NAMEDPIPE26 #define LOG_GROUP LOG_GROUP_DEFAULT 28 27 #include <VBox/pdmdrv.h> 29 28 #include <iprt/assert.h> … … 60 59 PPDMDRVINS pDrvIns; 61 60 /** Pointer to the file name. (Freed by MM) */ 62 char 61 char *pszLocation; 63 62 /** Flag whether VirtualBox represents the server or client side. */ 64 63 RTFILE OutputFile; … … 121 120 * Construct a raw output stream driver instance. 122 121 * 123 * @returns VBox status. 124 * @param pDrvIns The driver instance data. 125 * If the registration structure is needed, pDrvIns->pDrvReg points to it. 126 * @param pCfgHandle Configuration node handle for the driver. Use this to obtain the configuration 127 * of the driver instance. It's also found in pDrvIns->pCfgHandle, but like 128 * iInstance it's expected to be used a bit in this function. 129 */ 130 static DECLCALLBACK(int) drvRawFileConstruct(PPDMDRVINS pDrvIns, PCFGMNODE pCfgHandle) 131 { 132 int rc; 133 char *pszLocation = NULL; 122 * @copydoc FNPDMDRVCONSTRUCT 123 */ 124 static DECLCALLBACK(int) drvRawFileConstruct(PPDMDRVINS pDrvIns, PCFGMNODE pCfgHandle, uint32_t fFlags) 125 { 134 126 PDRVRAWFILE pThis = PDMINS_2_DATA(pDrvIns, PDRVRAWFILE); 135 127 … … 149 141 */ 150 142 if (!CFGMR3AreValuesValid(pCfgHandle, "Location\0")) 151 { 152 rc = VERR_PDM_DRVINS_UNKNOWN_CFG_VALUES; 153 goto out; 154 } 155 156 rc = CFGMR3QueryStringAlloc(pCfgHandle, "Location", &pszLocation); 143 AssertFailedReturn(VERR_PDM_DRVINS_UNKNOWN_CFG_VALUES); 144 145 int rc = CFGMR3QueryStringAlloc(pCfgHandle, "Location", &pThis->pszLocation); 146 if (RT_FAILURE(rc)) 147 AssertMsgFailedReturn(("Configuration error: query \"Location\" resulted in %Rrc.\n", rc), rc); 148 149 /* 150 * Open the raw file. 151 */ 152 rc = RTFileOpen(&pThis->OutputFile, pThis->pszLocation, RTFILE_O_CREATE_REPLACE | RTFILE_O_WRITE | RTFILE_O_DENY_NONE); 157 153 if (RT_FAILURE(rc)) 158 154 { 159 AssertMsgFailed(("Configuration error: query \"Location\" resulted in %Rrc.\n", rc)); 160 goto out; 161 } 162 pThis->pszLocation = pszLocation; 163 164 rc = RTFileOpen(&pThis->OutputFile, pThis->pszLocation, RTFILE_O_WRITE | RTFILE_O_CREATE_REPLACE); 165 if (RT_FAILURE(rc)) 166 { 167 LogRel(("RawFile%d: CreateFile failed rc=%Rrc\n", pThis->pDrvIns->iInstance)); 168 return PDMDrvHlpVMSetError(pDrvIns, rc, RT_SRC_POS, N_("RawFile#%d failed to create the raw output file %s"), pDrvIns->iInstance, pszLocation); 169 } 170 171 out: 172 if (RT_FAILURE(rc)) 173 { 174 if (pszLocation) 175 MMR3HeapFree(pszLocation); 176 return PDMDrvHlpVMSetError(pDrvIns, rc, RT_SRC_POS, N_("RawFile#%d failed to initialize"), pDrvIns->iInstance); 177 } 178 179 LogFlow(("drvRawFileConstruct: location %s\n", pszLocation)); 180 LogRel(("RawFile: location %s\n", pszLocation)); 155 LogRel(("RawFile%d: CreateFile failed rc=%Rrc\n", pDrvIns->iInstance)); 156 return PDMDrvHlpVMSetError(pDrvIns, rc, RT_SRC_POS, N_("RawFile#%d failed to create the raw output file %s"), pDrvIns->iInstance, pThis->pszLocation); 157 } 158 159 LogFlow(("drvRawFileConstruct: location %s\n", pThis->pszLocation)); 160 LogRel(("RawFile#%u: location %s\n", pDrvIns->iInstance, pThis->pszLocation)); 181 161 return VINF_SUCCESS; 182 162 } … … 198 178 if (pThis->pszLocation) 199 179 MMR3HeapFree(pThis->pszLocation); 180 181 if (pThis->OutputFile != NIL_RTFILE) 182 { 183 RTFileClose(pThis->OutputFile); 184 pThis->OutputFile = NIL_RTFILE; 185 } 200 186 } 201 187 … … 214 200 215 201 if (pThis->OutputFile != NIL_RTFILE) 202 { 216 203 RTFileClose(pThis->OutputFile); 204 pThis->OutputFile = NIL_RTFILE; 205 } 217 206 } 218 207 … … 251 240 /* pfnResume */ 252 241 NULL, 242 /* pfnAttach */ 243 NULL, 253 244 /* pfnDetach */ 254 245 NULL, 255 246 /* pfnPowerOff */ 256 247 drvRawFilePowerOff, 248 /* pfnSoftReset */ 249 NULL, 250 /* u32EndVersion */ 251 PDM_DRVREG_VERSION 257 252 }; 253 -
trunk/src/VBox/Devices/Storage/DevATA.cpp
r21188 r22277 5715 5715 unsigned iInterface; 5716 5716 5717 AssertMsg(fFlags & PDM DEVATT_FLAGS_NOT_HOT_PLUG,5717 AssertMsg(fFlags & PDM_TACH_FLAGS_NOT_HOT_PLUG, 5718 5718 ("PIIX3IDE: Device does not support hotplugging\n")); 5719 5719 … … 5893 5893 unsigned iInterface; 5894 5894 5895 AssertMsgReturn(fFlags & PDM DEVATT_FLAGS_NOT_HOT_PLUG,5895 AssertMsgReturn(fFlags & PDM_TACH_FLAGS_NOT_HOT_PLUG, 5896 5896 ("PIIX3IDE: Device does not support hotplugging\n"), 5897 5897 VERR_INVALID_PARAMETER); -
trunk/src/VBox/Devices/Storage/DevBusLogic.cpp
r21363 r22277 2547 2547 Log(("%s:\n", __FUNCTION__)); 2548 2548 2549 AssertMsg(fFlags & PDM DEVATT_FLAGS_NOT_HOT_PLUG,2549 AssertMsg(fFlags & PDM_TACH_FLAGS_NOT_HOT_PLUG, 2550 2550 ("BusLogic: Device does not support hotplugging\n")); 2551 2551 … … 2574 2574 int rc; 2575 2575 2576 AssertMsgReturn(fFlags & PDM DEVATT_FLAGS_NOT_HOT_PLUG,2576 AssertMsgReturn(fFlags & PDM_TACH_FLAGS_NOT_HOT_PLUG, 2577 2577 ("BusLogic: Device does not support hotplugging\n"), 2578 2578 VERR_INVALID_PARAMETER); -
trunk/src/VBox/Devices/Storage/DevLsiLogicSCSI.cpp
r21363 r22277 5083 5083 PLSILOGICDEVICE pDevice = &pThis->aDeviceStates[iLUN]; 5084 5084 5085 AssertMsg(fFlags & PDM DEVATT_FLAGS_NOT_HOT_PLUG,5085 AssertMsg(fFlags & PDM_TACH_FLAGS_NOT_HOT_PLUG, 5086 5086 ("LsiLogic: Device does not support hotplugging\n")); 5087 5087 … … 5111 5111 int rc; 5112 5112 5113 AssertMsgReturn(fFlags & PDM DEVATT_FLAGS_NOT_HOT_PLUG,5113 AssertMsgReturn(fFlags & PDM_TACH_FLAGS_NOT_HOT_PLUG, 5114 5114 ("LsiLogic: Device does not support hotplugging\n"), 5115 5115 VERR_INVALID_PARAMETER); -
trunk/src/VBox/Devices/Storage/DrvBlock.cpp
r18498 r22277 515 515 * Attach the media driver and query it's interface. 516 516 */ 517 uint32_t fTachFlags = 0; /** @todo figure attachment flags for mount. */ 517 518 PPDMIBASE pBase; 518 int rc = pThis->pDrvIns->pDrvHlp->pfnAttach(pThis->pDrvIns, &pBase);519 int rc = PDMDrvHlpAttach(pThis->pDrvIns, fTachFlags, &pBase); 519 520 if (RT_FAILURE(rc)) 520 521 { … … 555 556 */ 556 557 AssertMsgFailed(("No media interface!\n")); 557 int rc2 = pThis->pDrvIns->pDrvHlp->pfnDetach(pThis->pDrvIns );558 int rc2 = pThis->pDrvIns->pDrvHlp->pfnDetach(pThis->pDrvIns, fTachFlags); 558 559 AssertRC(rc2); 559 560 pThis->pDrvMedia = NULL; … … 587 588 * Detach the media driver and query it's interface. 588 589 */ 589 int rc = pThis->pDrvIns->pDrvHlp->pfnDetach(pThis->pDrvIns );590 int rc = pThis->pDrvIns->pDrvHlp->pfnDetach(pThis->pDrvIns, 0 /*fFlags*/); 590 591 if (RT_FAILURE(rc)) 591 592 { … … 668 669 669 670 /** @copydoc FNPDMDRVDETACH. */ 670 static DECLCALLBACK(void) drvblockDetach(PPDMDRVINS pDrvIns )671 static DECLCALLBACK(void) drvblockDetach(PPDMDRVINS pDrvIns, uint32_t fFlags) 671 672 { 672 673 PDRVBLOCK pThis = PDMINS_2_DATA(pDrvIns, PDRVBLOCK); 673 674 pThis->pDrvMedia = NULL; 674 675 pThis->pDrvMediaAsync = NULL; 676 NOREF(fFlags); 675 677 } 676 678 … … 691 693 * Construct a block driver instance. 692 694 * 693 * @returns VBox status. 694 * @param pDrvIns The driver instance data. 695 * If the registration structure is needed, pDrvIns->pDrvReg points to it. 696 * @param pCfgHandle Configuration node handle for the driver. Use this to obtain the configuration 697 * of the driver instance. It's also found in pDrvIns->pCfgHandle, but like 698 * iInstance it's expected to be used a bit in this function. 695 * @copydoc FNPDMDRVCONSTRUCT 699 696 */ 700 static DECLCALLBACK(int) drvblockConstruct(PPDMDRVINS pDrvIns, PCFGMNODE pCfgHandle )697 static DECLCALLBACK(int) drvblockConstruct(PPDMDRVINS pDrvIns, PCFGMNODE pCfgHandle, uint32_t fFlags) 701 698 { 702 699 PDRVBLOCK pThis = PDMINS_2_DATA(pDrvIns, PDRVBLOCK); … … 867 864 */ 868 865 PPDMIBASE pBase; 869 rc = pDrvIns->pDrvHlp->pfnAttach(pDrvIns, &pBase);866 rc = PDMDrvHlpAttach(pDrvIns, fFlags, &pBase); 870 867 if ( rc == VERR_PDM_NO_ATTACHED_DRIVER 871 868 && pThis->enmType != PDMBLOCKTYPE_HARD_DISK) … … 926 923 /* pfnResume */ 927 924 NULL, 925 /* pfnAttach */ 926 NULL, 928 927 /* pfnDetach */ 929 drvblockDetach 928 drvblockDetach, 929 /* pfnPowerOff */ 930 NULL, 931 /* pfnSoftReset */ 932 NULL, 933 /* u32EndVersion */ 934 PDM_DRVREG_VERSION 930 935 }; 936 -
trunk/src/VBox/Devices/Storage/DrvHostBase.cpp
r21691 r22277 2045 2045 * Check that there are no drivers below us. 2046 2046 */ 2047 PPDMIBASE pBase; 2048 int rc = pDrvIns->pDrvHlp->pfnAttach(pDrvIns, &pBase); 2049 if (rc != VERR_PDM_NO_ATTACHED_DRIVER) 2050 { 2051 AssertMsgFailed(("Configuration error: No attached driver, please! (rc=%Rrc)\n", rc)); 2052 return VERR_PDM_DRVINS_NO_ATTACH; 2053 } 2047 AssertMsgReturn(PDMDrvHlpNoAttach(pDrvIns) == VERR_PDM_NO_ATTACHED_DRIVER, 2048 ("Configuration error: Not possible to attach anything to this driver!\n"), 2049 VERR_PDM_DRVINS_NO_ATTACH); 2054 2050 2055 2051 /* 2056 2052 * Register saved state. 2057 2053 */ 2058 rc = pDrvIns->pDrvHlp->pfnSSMRegister(pDrvIns, pDrvIns->pDrvReg->szDriverName, pDrvIns->iInstance, 1, 0,2059 NULL, NULL, NULL,2060 NULL, NULL, drvHostBaseLoadDone);2054 int rc = pDrvIns->pDrvHlp->pfnSSMRegister(pDrvIns, pDrvIns->pDrvReg->szDriverName, pDrvIns->iInstance, 1, 0, 2055 NULL, NULL, NULL, 2056 NULL, NULL, drvHostBaseLoadDone); 2061 2057 if (RT_FAILURE(rc)) 2062 2058 return rc; -
trunk/src/VBox/Devices/Storage/DrvHostDVD.cpp
r19968 r22277 741 741 * Construct a host dvd drive driver instance. 742 742 * 743 * @returns VBox status. 744 * @param pDrvIns The driver instance data. 745 * If the registration structure is needed, pDrvIns->pDrvReg points to it. 746 * @param pCfgHandle Configuration node handle for the driver. Use this to obtain the configuration 747 * of the driver instance. It's also found in pDrvIns->pCfgHandle, but like 748 * iInstance it's expected to be used a bit in this function. 749 */ 750 static DECLCALLBACK(int) drvHostDvdConstruct(PPDMDRVINS pDrvIns, PCFGMNODE pCfgHandle) 743 * @copydoc FNPDMDRVCONSTRUCT 744 */ 745 static DECLCALLBACK(int) drvHostDvdConstruct(PPDMDRVINS pDrvIns, PCFGMNODE pCfgHandle, uint32_t fFlags) 751 746 { 752 747 PDRVHOSTBASE pThis = PDMINS_2_DATA(pDrvIns, PDRVHOSTBASE); … … 862 857 /* pfnResume */ 863 858 NULL, 859 /* pfnAttach */ 860 NULL, 864 861 /* pfnDetach */ 865 NULL 862 NULL, 863 /* pfnPowerOff */ 864 NULL, 865 /* pfnSoftReset */ 866 NULL, 867 /* u32EndVersion */ 868 PDM_DRVREG_VERSION 866 869 }; 867 870 -
trunk/src/VBox/Devices/Storage/DrvHostFloppy.cpp
r11284 r22277 147 147 * @copydoc FNPDMDRVCONSTRUCT 148 148 */ 149 static DECLCALLBACK(int) drvHostFloppyConstruct(PPDMDRVINS pDrvIns, PCFGMNODE pCfgHandle )149 static DECLCALLBACK(int) drvHostFloppyConstruct(PPDMDRVINS pDrvIns, PCFGMNODE pCfgHandle, uint32_t fFlags) 150 150 { 151 151 PDRVHOSTFLOPPY pThis = PDMINS_2_DATA(pDrvIns, PDRVHOSTFLOPPY); … … 228 228 /* pfnResume */ 229 229 NULL, 230 /* pfnAttach */ 231 NULL, 230 232 /* pfnDetach */ 231 NULL 233 NULL, 234 /* pfnPowerOff */ 235 NULL, 236 /* pfnSoftReset */ 237 NULL, 238 /* u32EndVersion */ 239 PDM_DRVREG_VERSION 232 240 }; 233 241 -
trunk/src/VBox/Devices/Storage/DrvMediaISO.cpp
r13840 r22277 90 90 * Construct a ISO media driver instance. 91 91 * 92 * @returns VBox status. 93 * @param pDrvIns The driver instance data. 94 * If the registration structure is needed, pDrvIns->pDrvReg points to it. 95 * @param pCfgHandle Configuration node handle for the driver. Use this to obtain the configuration 96 * of the driver instance. It's also found in pDrvIns->pCfgHandle, but like 97 * iInstance it's expected to be used a bit in this function. 98 */ 99 static DECLCALLBACK(int) drvMediaISOConstruct(PPDMDRVINS pDrvIns, PCFGMNODE pCfgHandle) 92 * @copydoc FNPDMDRVCONSTRUCT 93 */ 94 static DECLCALLBACK(int) drvMediaISOConstruct(PPDMDRVINS pDrvIns, PCFGMNODE pCfgHandle, uint32_t fFlags) 100 95 { 101 96 PDRVMEDIAISO pThis = PDMINS_2_DATA(pDrvIns, PDRVMEDIAISO); … … 348 343 /* pfnResume */ 349 344 NULL, 345 /* pfnAttach */ 346 NULL, 350 347 /* pfnDetach */ 351 NULL, 348 NULL, 352 349 /* pfnPowerOff */ 353 NULL 350 NULL, 351 /* pfnSoftReset */ 352 NULL, 353 /* u32EndVersion */ 354 PDM_DRVREG_VERSION 354 355 }; 356 -
trunk/src/VBox/Devices/Storage/DrvRawImage.cpp
r13840 r22277 92 92 /** 93 93 * Construct a raw image driver instance. 94 * 95 * @returns VBox status. 96 * @param pDrvIns The driver instance data. 97 * If the registration structure is needed, pDrvIns->pDrvReg points to it. 98 * @param pCfgHandle Configuration node handle for the driver. Use this to obtain the configuration 99 * of the driver instance. It's also found in pDrvIns->pCfgHandle, but like 100 * iInstance it's expected to be used a bit in this function. 101 */ 102 static DECLCALLBACK(int) drvRawImageConstruct(PPDMDRVINS pDrvIns, PCFGMNODE pCfgHandle) 94 * 95 * @copydoc FNPDMDRVCONSTRUCT 96 */ 97 static DECLCALLBACK(int) drvRawImageConstruct(PPDMDRVINS pDrvIns, PCFGMNODE pCfgHandle, uint32_t fFlags) 103 98 { 104 99 PDRVRAWIMAGE pThis = PDMINS_2_DATA(pDrvIns, PDRVRAWIMAGE); … … 398 393 /* pfnResume */ 399 394 NULL, 395 /* pfnAttach */ 396 NULL, 400 397 /* pfnDetach */ 401 NULL, 398 NULL, 402 399 /* pfnPowerOff */ 403 NULL 400 NULL, 401 /* pfnSoftReset */ 402 NULL, 403 /* u32EndVersion */ 404 PDM_DRVREG_VERSION 404 405 }; -
trunk/src/VBox/Devices/Storage/DrvSCSI.cpp
r21321 r22277 753 753 * Construct a block driver instance. 754 754 * 755 * @returns VBox status. 756 * @param pDrvIns The driver instance data. 757 * If the registration structure is needed, pDrvIns->pDrvReg points to it. 758 * @param pCfgHandle Configuration node handle for the driver. Use this to obtain the configuration 759 * of the driver instance. It's also found in pDrvIns->pCfgHandle, but like 760 * iInstance it's expected to be used a bit in this function. 761 */ 762 static DECLCALLBACK(int) drvscsiConstruct(PPDMDRVINS pDrvIns, PCFGMNODE pCfgHandle) 763 { 764 int rc = VINF_SUCCESS; 765 PDMBLOCKTYPE enmType; 755 * @copydoc FNPDMDRVCONSTRUCT 756 */ 757 static DECLCALLBACK(int) drvscsiConstruct(PPDMDRVINS pDrvIns, PCFGMNODE pCfgHandle, uint32_t fFlags) 758 { 766 759 PDRVSCSI pThis = PDMINS_2_DATA(pDrvIns, PDRVSCSI); 767 760 … … 777 770 * Try attach driver below and query it's block interface. 778 771 */ 779 rc = pDrvIns->pDrvHlp->pfnAttach(pDrvIns, &pThis->pDrvBase);772 int rc = PDMDrvHlpAttach(pDrvIns, fFlags, &pThis->pDrvBase); 780 773 AssertMsgReturn(RT_SUCCESS(rc), ("Attaching driver below failed rc=%Rrc\n", rc), rc); 781 774 … … 817 810 pThis->pDrvBlockAsync = (PDMIBLOCKASYNC *)pThis->pDrvBase->pfnQueryInterface(pThis->pDrvBase, PDMINTERFACE_BLOCK_ASYNC); 818 811 819 enmType = pThis->pDrvBlock->pfnGetType(pThis->pDrvBlock);812 PDMBLOCKTYPE enmType = pThis->pDrvBlock->pfnGetType(pThis->pDrvBlock); 820 813 if (enmType != PDMBLOCKTYPE_HARD_DISK) 821 814 { … … 877 870 /* pfnResume */ 878 871 NULL, 872 /* pfnAttach */ 873 NULL, 879 874 /* pfnDetach */ 875 NULL, 876 /* pfnPowerOff */ 877 NULL, 878 /* pfnSoftReset */ 880 879 NULL, 881 /* pfnPowerOff*/882 NULL880 /* u32EndVersion */ 881 PDM_DRVREG_VERSION 883 882 }; -
trunk/src/VBox/Devices/Storage/DrvSCSIHost.cpp
r21321 r22277 441 441 * Construct a block driver instance. 442 442 * 443 * @returns VBox status. 444 * @param pDrvIns The driver instance data. 445 * If the registration structure is needed, pDrvIns->pDrvReg points to it. 446 * @param pCfgHandle Configuration node handle for the driver. Use this to obtain the configuration 447 * of the driver instance. It's also found in pDrvIns->pCfgHandle, but like 448 * iInstance it's expected to be used a bit in this function. 449 */ 450 static DECLCALLBACK(int) drvscsihostConstruct(PPDMDRVINS pDrvIns, PCFGMNODE pCfgHandle) 451 { 452 int rc = VINF_SUCCESS; 443 * @copydoc FNPDMDRVCONSTRUCT 444 */ 445 static DECLCALLBACK(int) drvscsihostConstruct(PPDMDRVINS pDrvIns, PCFGMNODE pCfgHandle, uint32_t fFlags) 446 { 453 447 PDRVSCSIHOST pThis = PDMINS_2_DATA(pDrvIns, PDRVSCSIHOST); 454 448 … … 475 469 476 470 /* Create request queue. */ 477 rc = RTReqCreateQueue(&pThis->pQueueRequests);471 int rc = RTReqCreateQueue(&pThis->pQueueRequests); 478 472 AssertMsgReturn(RT_SUCCESS(rc), ("Failed to create request queue rc=%Rrc\n"), rc); 479 473 … … 528 522 /* pfnSuspend */ 529 523 NULL, 530 /* pfn Resume*/524 /* pfnAttach */ 531 525 NULL, 532 526 /* pfnDetach */ 533 NULL 527 NULL, 528 /* pfnPowerOff */ 529 NULL, 530 /* pfnSoftReset */ 531 NULL, 532 /* u32EndVersion */ 533 PDM_DRVREG_VERSION 534 534 }; -
trunk/src/VBox/Devices/Storage/DrvVD.cpp
r21806 r22277 789 789 * Construct a VBox disk media driver instance. 790 790 * 791 * @returns VBox status. 792 * @param pDrvIns The driver instance data. 793 * If the registration structure is needed, pDrvIns->pDrvReg points to it. 794 * @param pCfgHandle Configuration node handle for the driver. Use this to obtain the configuration 795 * of the driver instance. It's also found in pDrvIns->pCfgHandle as it's expected 796 * to be used frequently in this function. 791 * @copydoc FNPDMDRVCONSTRUCT 797 792 */ 798 793 static DECLCALLBACK(int) drvvdConstruct(PPDMDRVINS pDrvIns, 799 PCFGMNODE pCfgHandle) 794 PCFGMNODE pCfgHandle, 795 uint32_t fFlags) 800 796 { 801 797 LogFlow(("%s:\n", __FUNCTION__)); … … 885 881 PPDMIBASE pBase; 886 882 887 rc = pDrvIns->pDrvHlp->pfnAttach(pDrvIns, &pBase);883 rc = PDMDrvHlpAttach(pDrvIns, fFlags, &pBase); 888 884 if (rc == VERR_PDM_NO_ATTACHED_DRIVER) 889 885 { … … 1308 1304 /* pfnResume */ 1309 1305 drvvdResume, 1306 /* pfnAttach */ 1307 NULL, 1310 1308 /* pfnDetach */ 1311 1309 NULL, 1312 1310 /* pfnPowerOff */ 1313 drvvdPowerOff 1311 drvvdPowerOff, 1312 /* pfnSoftReset */ 1313 NULL, 1314 /* u32EndVersion */ 1315 PDM_DRVREG_VERSION 1314 1316 }; 1317 -
trunk/src/VBox/Devices/Storage/ISCSIHDDCore.cpp
r22258 r22277 1249 1249 ISCSIREQ aISCSIReq[4]; 1250 1250 uint32_t aReqBHS[12]; 1251 LogFlow((" drvISCSIDetach: entering\n"));1251 LogFlow(("iscsiDetach: entering\n")); 1252 1252 1253 1253 RTSemMutexRequest(pImage->Mutex, RT_INDEFINITE_WAIT); … … 1317 1317 RTSemMutexRelease(pImage->Mutex); 1318 1318 1319 LogFlow((" drvISCSIDetach: leaving\n"));1319 LogFlow(("iscsiDetach: leaving\n")); 1320 1320 LogRel(("iSCSI: logout to target %s\n", pImage->pszTargetName)); 1321 1321 return VINF_SUCCESS; -
trunk/src/VBox/Devices/Storage/fdc.c
r21328 r22277 2665 2665 LogFlow (("ideDetach: iLUN=%u\n", iLUN)); 2666 2666 2667 AssertMsgReturn(fFlags & PDM DEVATT_FLAGS_NOT_HOT_PLUG,2667 AssertMsgReturn(fFlags & PDM_TACH_FLAGS_NOT_HOT_PLUG, 2668 2668 ("The FDC device does not support hotplugging\n"), 2669 2669 VERR_INVALID_PARAMETER); -
trunk/src/VBox/Frontends/VBoxBFE/DisplayImpl.cpp
r21227 r22277 1176 1176 * Construct a display driver instance. 1177 1177 * 1178 * @returns VBox status. 1179 * @param pDrvIns The driver instance data. 1180 * If the registration structure is needed, pDrvIns->pDrvReg points to it. 1181 * @param pCfgHandle Configuration node handle for the driver. Use this to obtain the configuration 1182 * of the driver instance. It's also found in pDrvIns->pCfgHandle, but like 1183 * iInstance it's expected to be used a bit in this function. 1184 */ 1185 DECLCALLBACK(int) VMDisplay::drvConstruct(PPDMDRVINS pDrvIns, PCFGMNODE pCfgHandle) 1178 * @copydoc FNPDMDRVCONSTRUCT 1179 */ 1180 DECLCALLBACK(int) VMDisplay::drvConstruct(PPDMDRVINS pDrvIns, PCFGMNODE pCfgHandle, uint32_t fFlags) 1186 1181 { 1187 1182 PDRVMAINDISPLAY pData = PDMINS_2_DATA(pDrvIns, PDRVMAINDISPLAY); … … 1194 1189 if (!CFGMR3AreValuesValid(pCfgHandle, "Object\0")) 1195 1190 return VERR_PDM_DRVINS_UNKNOWN_CFG_VALUES; 1196 PPDMIBASE pBaseIgnore; 1197 int rc = pDrvIns->pDrvHlp->pfnAttach(pDrvIns, &pBaseIgnore); 1198 if (rc != VERR_PDM_NO_ATTACHED_DRIVER) 1199 { 1200 AssertMsgFailed(("Configuration error: Not possible to attach anything to this driver!\n")); 1201 return VERR_PDM_DRVINS_NO_ATTACH; 1202 } 1191 AssertMsgReturn(PDMDrvHlpNoAttach(pDrvIns) == VERR_PDM_NO_ATTACHED_DRIVER, 1192 ("Configuration error: Not possible to attach anything to this driver!\n"), 1193 VERR_PDM_DRVINS_NO_ATTACH); 1203 1194 1204 1195 /* … … 1229 1220 */ 1230 1221 void *pv; 1231 rc = CFGMR3QueryPtr(pCfgHandle, "Object", &pv);1222 int rc = CFGMR3QueryPtr(pCfgHandle, "Object", &pv); 1232 1223 if (RT_FAILURE(rc)) 1233 1224 { … … 1286 1277 /* pfnResume */ 1287 1278 NULL, 1279 /* pfnAttach */ 1280 NULL, 1288 1281 /* pfnDetach */ 1289 NULL 1282 NULL, 1283 /* pfnPowerOff */ 1284 NULL, 1285 /* pfnSoftReset */ 1286 NULL, 1287 /* u32EndVersion */ 1288 PDM_DRVREG_VERSION 1290 1289 }; 1290 -
trunk/src/VBox/Frontends/VBoxBFE/DisplayImpl.h
r21227 r22277 69 69 70 70 static DECLCALLBACK(void*) drvQueryInterface(PPDMIBASE pInterface, PDMINTERFACE enmInterface); 71 static DECLCALLBACK(int) drvConstruct(PPDMDRVINS pDrvIns, PCFGMNODE pCfgHandle );71 static DECLCALLBACK(int) drvConstruct(PPDMDRVINS pDrvIns, PCFGMNODE pCfgHandle, uint32_t fFlags); 72 72 static DECLCALLBACK(int) displayResizeCallback(PPDMIDISPLAYCONNECTOR pInterface, uint32_t bpp, void *pvVRAM, uint32_t cbLine, uint32_t cx, uint32_t cy); 73 73 static DECLCALLBACK(void) displayUpdateCallback(PPDMIDISPLAYCONNECTOR pInterface, -
trunk/src/VBox/Frontends/VBoxBFE/KeyboardImpl.cpp
r13837 r22277 208 208 * Construct a keyboard driver instance. 209 209 * 210 * @returns VBox status. 211 * @param pDrvIns The driver instance data. 212 * If the registration structure is needed, pDrvIns->pDrvReg points to it. 213 * @param pCfgHandle Configuration node handle for the driver. Use this to obtain the configuration 214 * of the driver instance. It's also found in pDrvIns->pCfgHandle, but like 215 * iInstance it's expected to be used a bit in this function. 216 */ 217 DECLCALLBACK(int) Keyboard::drvConstruct(PPDMDRVINS pDrvIns, PCFGMNODE pCfgHandle) 210 * @copydoc FNPDMDRVCONSTRUCT 211 */ 212 DECLCALLBACK(int) Keyboard::drvConstruct(PPDMDRVINS pDrvIns, PCFGMNODE pCfgHandle, uint32_t fFlags) 218 213 { 219 214 PDRVMAINKEYBOARD pData = PDMINS_2_DATA(pDrvIns, PDRVMAINKEYBOARD); … … 225 220 if (!CFGMR3AreValuesValid(pCfgHandle, "Object\0")) 226 221 return VERR_PDM_DRVINS_UNKNOWN_CFG_VALUES; 227 PPDMIBASE pBaseIgnore; 228 int rc = pDrvIns->pDrvHlp->pfnAttach(pDrvIns, &pBaseIgnore); 229 if (rc != VERR_PDM_NO_ATTACHED_DRIVER) 230 { 231 AssertMsgFailed(("Configuration error: Not possible to attach anything to this driver!\n")); 232 return VERR_PDM_DRVINS_NO_ATTACH; 233 } 222 AssertMsgReturn(PDMDrvHlpNoAttach(pDrvIns) == VERR_PDM_NO_ATTACHED_DRIVER, 223 ("Configuration error: Not possible to attach anything to this driver!\n"), 224 VERR_PDM_DRVINS_NO_ATTACH); 234 225 235 226 /* … … 254 245 */ 255 246 void *pv; 256 rc = CFGMR3QueryPtr(pCfgHandle, "Object", &pv);247 int rc = CFGMR3QueryPtr(pCfgHandle, "Object", &pv); 257 248 if (RT_FAILURE(rc)) 258 249 { … … 300 291 /* pfnResume */ 301 292 NULL, 293 /* pfnAttach */ 294 NULL, 302 295 /* pfnDetach */ 303 NULL 296 NULL, 297 /* pfnPowerOff */ 298 NULL, 299 /* pfnSoftReset */ 300 NULL, 301 /* u32EndVersion */ 302 PDM_DRVREG_VERSION 304 303 }; -
trunk/src/VBox/Frontends/VBoxBFE/KeyboardImpl.h
r11661 r22277 57 57 58 58 static DECLCALLBACK(void *) drvQueryInterface(PPDMIBASE pInterface, PDMINTERFACE enmInterface); 59 static DECLCALLBACK(int) drvConstruct(PPDMDRVINS pDrvIns, PCFGMNODE pCfgHandle );59 static DECLCALLBACK(int) drvConstruct(PPDMDRVINS pDrvIns, PCFGMNODE pCfgHandle, uint32_t fFlags); 60 60 static DECLCALLBACK(void) drvDestruct(PPDMDRVINS pDrvIns); 61 61 -
trunk/src/VBox/Frontends/VBoxBFE/MouseImpl.cpp
r21226 r22277 216 216 * Construct a mouse driver instance. 217 217 * 218 * @returns VBox status. 219 * @param pDrvIns The driver instance data. 220 * If the registration structure is needed, pDrvIns->pDrvReg points to it. 221 * @param pCfgHandle Configuration node handle for the driver. Use this to obtain the configuration 222 * of the driver instance. It's also found in pDrvIns->pCfgHandle, but like 223 * iInstance it's expected to be used a bit in this function. 224 */ 225 DECLCALLBACK(int) Mouse::drvConstruct(PPDMDRVINS pDrvIns, PCFGMNODE pCfgHandle) 218 * @copydoc FNPDMDRVCONSTRUCT 219 */ 220 DECLCALLBACK(int) Mouse::drvConstruct(PPDMDRVINS pDrvIns, PCFGMNODE pCfgHandle, uint32_t fFlags) 226 221 { 227 222 PDRVMAINMOUSE pData = PDMINS_2_DATA(pDrvIns, PDRVMAINMOUSE); … … 233 228 if (!CFGMR3AreValuesValid(pCfgHandle, "Object\0")) 234 229 return VERR_PDM_DRVINS_UNKNOWN_CFG_VALUES; 235 236 PPDMIBASE pBaseIgnore; 237 int rc = pDrvIns->pDrvHlp->pfnAttach(pDrvIns, &pBaseIgnore); 238 if (rc != VERR_PDM_NO_ATTACHED_DRIVER) 239 { 240 AssertMsgFailed(("Configuration error: Not possible to attach anything to this driver!\n")); 241 return VERR_PDM_DRVINS_NO_ATTACH; 242 } 230 AssertMsgReturn(PDMDrvHlpNoAttach(pDrvIns) == VERR_PDM_NO_ATTACHED_DRIVER, 231 ("Configuration error: Not possible to attach anything to this driver!\n"), 232 VERR_PDM_DRVINS_NO_ATTACH); 243 233 244 234 /* … … 261 251 */ 262 252 void *pv; 263 rc = CFGMR3QueryPtr(pCfgHandle, "Object", &pv);253 int rc = CFGMR3QueryPtr(pCfgHandle, "Object", &pv); 264 254 if (RT_FAILURE(rc)) 265 255 { … … 308 298 /* pfnResume */ 309 299 NULL, 300 /* pfnAttach */ 301 NULL, 310 302 /* pfnDetach */ 311 NULL 303 NULL, 304 /* pfnPowerOff */ 305 NULL, 306 /* pfnSoftReset */ 307 NULL, 308 /* u32EndVersion */ 309 PDM_DRVREG_VERSION 312 310 }; 311 -
trunk/src/VBox/Frontends/VBoxBFE/MouseImpl.h
r8155 r22277 69 69 70 70 static DECLCALLBACK(void *) drvQueryInterface(PPDMIBASE pInterface, PDMINTERFACE enmInterface); 71 static DECLCALLBACK(int) drvConstruct(PPDMDRVINS pDrvIns, PCFGMNODE pCfgHandle );71 static DECLCALLBACK(int) drvConstruct(PPDMDRVINS pDrvIns, PCFGMNODE pCfgHandle, uint32_t fFlags); 72 72 static DECLCALLBACK(void) drvDestruct(PPDMDRVINS pDrvIns); 73 73 -
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 -
trunk/src/VBox/Frontends/VBoxBFE/StatusImpl.h
r8155 r22277 36 36 static DECLCALLBACK(void) drvUnitChanged(PPDMILEDCONNECTORS pInterface, unsigned iLUN); 37 37 static DECLCALLBACK(void *) drvQueryInterface(PPDMIBASE pInterface, PDMINTERFACE enmInterface); 38 static DECLCALLBACK(int) drvConstruct(PPDMDRVINS pDrvIns, PCFGMNODE pCfgHandle );38 static DECLCALLBACK(int) drvConstruct(PPDMDRVINS pDrvIns, PCFGMNODE pCfgHandle, uint32_t fFlags); 39 39 static DECLCALLBACK(void) drvDestruct(PPDMDRVINS pDrvIns); 40 40 }; -
trunk/src/VBox/Frontends/VBoxBFE/VMMDevInterface.cpp
r21227 r22277 387 387 * Construct a VMMDev driver instance. 388 388 * 389 * @returns VBox status. 390 * @param pDrvIns The driver instance data. 391 * If the registration structure is needed, pDrvIns->pDrvReg points to it. 392 * @param pCfgHandle Configuration node handle for the driver. Use this to obtain the configuration 393 * of the driver instance. It's also found in pDrvIns->pCfgHandle, but like 394 * iInstance it's expected to be used a bit in this function. 395 */ 396 DECLCALLBACK(int) VMMDev::drvConstruct(PPDMDRVINS pDrvIns, PCFGMNODE pCfgHandle) 389 * @copydoc FNPDMDRVCONSTRUCT 390 */ 391 DECLCALLBACK(int) VMMDev::drvConstruct(PPDMDRVINS pDrvIns, PCFGMNODE pCfgHandle, uint32_t fFlags) 397 392 { 398 393 PDRVMAINVMMDEV pData = PDMINS_2_DATA(pDrvIns, PDRVMAINVMMDEV); … … 404 399 if (!CFGMR3AreValuesValid(pCfgHandle, "Object\0")) 405 400 return VERR_PDM_DRVINS_UNKNOWN_CFG_VALUES; 406 407 PPDMIBASE pBaseIgnore; 408 int rc = pDrvIns->pDrvHlp->pfnAttach(pDrvIns, &pBaseIgnore); 409 if (rc != VERR_PDM_NO_ATTACHED_DRIVER) 410 { 411 AssertMsgFailed(("Configuration error: Not possible to attach anything to this driver!\n")); 412 return VERR_PDM_DRVINS_NO_ATTACH; 413 } 401 AssertMsgReturn(PDMDrvHlpNoAttach(pDrvIns) == VERR_PDM_NO_ATTACHED_DRIVER, 402 ("Configuration error: Not possible to attach anything to this driver!\n"), 403 VERR_PDM_DRVINS_NO_ATTACH); 414 404 415 405 /* … … 464 454 */ 465 455 void *pv; 466 rc = CFGMR3QueryPtr(pCfgHandle, "Object", &pv);456 int rc = CFGMR3QueryPtr(pCfgHandle, "Object", &pv); 467 457 if (RT_FAILURE(rc)) 468 458 { … … 525 515 /* pfnResume */ 526 516 NULL, 517 /* pfnAttach */ 518 NULL, 527 519 /* pfnDetach */ 528 NULL 520 NULL, 521 /* pfnPowerOff */ 522 NULL, 523 /* pfnSoftReset */ 524 NULL, 525 /* u32EndVersion */ 526 PDM_DRVREG_VERSION 529 527 }; 528 -
trunk/src/VBox/Frontends/VBoxBFE/VMMDevInterface.h
r8155 r22277 56 56 static DECLCALLBACK(void) UpdateMouseCapabilities(PPDMIVMMDEVCONNECTOR pInterface, uint32_t newCapabilities); 57 57 static DECLCALLBACK(void) UpdatePointerShape(PPDMIVMMDEVCONNECTOR pInterface, bool fVisible, bool fAlpha, 58 59 60 58 uint32_t xHot, uint32_t yHot, 59 uint32_t width, uint32_t height, 60 void *pShape); 61 61 static DECLCALLBACK(int) VideoModeSupported(PPDMIVMMDEVCONNECTOR pInterface, uint32_t width, uint32_t height, 62 62 uint32_t bpp, bool *fSupported); … … 64 64 65 65 static DECLCALLBACK(void *) drvQueryInterface(PPDMIBASE pInterface, PDMINTERFACE enmInterface); 66 static DECLCALLBACK(int) drvConstruct(PPDMDRVINS pDrvIns, PCFGMNODE pCfgHandle );66 static DECLCALLBACK(int) drvConstruct(PPDMDRVINS pDrvIns, PCFGMNODE pCfgHandle, uint32_t fFlags); 67 67 static DECLCALLBACK(void) drvDestruct(PPDMDRVINS pDrvIns); 68 68 }; -
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); -
trunk/src/VBox/VMM/PDMDevHlp.cpp
r21789 r22277 895 895 */ 896 896 pLun->pTop = pLun->pBottom = pNew; 897 rc = pDrv->pDrvReg->pfnConstruct(pNew, pNew->pCfgHandle );897 rc = pDrv->pDrvReg->pfnConstruct(pNew, pNew->pCfgHandle, 0 /*fFlags*/); 898 898 if (RT_SUCCESS(rc)) 899 899 { -
trunk/src/VBox/VMM/PDMDevice.cpp
r21363 r22277 790 790 * @thread EMT 791 791 */ 792 VMMR3DECL(int) PDMR3DeviceAttach(PVM pVM, const char *pszDevice, unsigned iInstance, unsigned iLun, PPDMIBASE *ppBase, uint32_t fFlags)792 VMMR3DECL(int) PDMR3DeviceAttach(PVM pVM, const char *pszDevice, unsigned iInstance, unsigned iLun, uint32_t fFlags, PPDMIBASE *ppBase) 793 793 { 794 794 VM_ASSERT_EMT(pVM); 795 LogFlow(("PDMR3DeviceAttach: pszDevice=%p:{%s} iInstance=%d iLun=%d ppBase=%p\n",796 pszDevice, pszDevice, iInstance, iLun, ppBase));795 LogFlow(("PDMR3DeviceAttach: pszDevice=%p:{%s} iInstance=%d iLun=%d fFlags=%#x ppBase=%p\n", 796 pszDevice, pszDevice, iInstance, iLun, fFlags, ppBase)); 797 797 798 798 /* … … 871 871 rc = VINF_PDM_NO_DRIVER_ATTACHED_TO_LUN; 872 872 } 873 else874 rc = VERR_PDM_DEVICE_NO_RT_DETACH;875 873 } 876 874 … … 879 877 } 880 878 879 880 /** 881 * Detaches the specified driver instance. 882 * 883 * This is used to replumb drivers at runtime for simulating hot plugging and 884 * media changes. 885 * 886 * This is a superset of PDMR3DeviceDetach. It allows detaching drivers from 887 * any driver or device by specifying the driver to start detaching at. The 888 * only prerequisite is that the driver or device above implements the 889 * pfnDetach callback (PDMDRVREG / PDMDEVREG). 890 * 891 * @returns VBox status code. 892 * @param pVM VM Handle. 893 * @param pszDevice Device name. 894 * @param iDevIns Device instance. 895 * @param iLun The Logical Unit in which to look for the driver. 896 * @param pszDriver The name of the driver which to detach. If NULL 897 * then the entire driver chain is detatched. 898 * @param iOccurance The occurance of that driver in the chain. This is 899 * usually 0. 900 * @param fFlags Flags, combination of the PDMDEVATT_FLAGS_* \#defines. 901 * @thread EMT 902 */ 903 VMMR3DECL(int) PDMR3DriverDetach(PVM pVM, const char *pszDevice, unsigned iDevIns, unsigned iLun, 904 const char *pszDriver, unsigned iOccurance, uint32_t fFlags) 905 { 906 LogFlow(("PDMR3DriverDetach: pszDevice=%p:{%s} iDevIns=%u iLun=%u pszDriver=%p:{%s} iOccurance=%u fFlags=%#x\n", 907 pszDevice, pszDevice, iDevIns, iLun, pszDriver, iOccurance, fFlags)); 908 VM_ASSERT_EMT(pVM); 909 AssertPtr(pszDevice); 910 AssertPtrNull(pszDriver); 911 Assert(iOccurance == 0 || pszDriver); 912 Assert(!(fFlags & ~(PDM_TACH_FLAGS_NOT_HOT_PLUG))); 913 914 /* 915 * Find the LUN in question. 916 */ 917 PPDMLUN pLun; 918 int rc = pdmR3DevFindLun(pVM, pszDevice, iDevIns, iLun, &pLun); 919 if (RT_SUCCESS(rc)) 920 { 921 /* 922 * Locate the driver. 923 */ 924 PPDMDRVINS pDrvIns = pLun->pTop; 925 if (pDrvIns) 926 { 927 if (pszDriver) 928 { 929 while (pDrvIns) 930 { 931 if (!strcmp(pDrvIns->pDrvReg->szDriverName, pszDriver)) 932 { 933 if (iOccurance == 0) 934 break; 935 iOccurance--; 936 } 937 pDrvIns = pDrvIns->Internal.s.pDown; 938 } 939 } 940 if (pDrvIns) 941 rc = pdmR3DrvDetach(pDrvIns, fFlags); 942 else 943 rc = VERR_PDM_DRIVER_INSTANCE_NOT_FOUND; 944 } 945 else 946 rc = VINF_PDM_NO_DRIVER_ATTACHED_TO_LUN; 947 } 948 949 LogFlow(("PDMR3DeviceDetach: returns %Rrc\n", rc)); 950 return rc; 951 } 952 -
trunk/src/VBox/VMM/PDMDriver.cpp
r21789 r22277 275 275 * Validate the registration structure. 276 276 */ 277 Assert(pDrvReg); 278 if (pDrvReg->u32Version != PDM_DRVREG_VERSION) 279 { 280 AssertMsgFailed(("Unknown struct version %#x!\n", pDrvReg->u32Version)); 281 return VERR_PDM_UNKNOWN_DRVREG_VERSION; 282 } 283 if ( !pDrvReg->szDriverName[0] 284 || strlen(pDrvReg->szDriverName) >= sizeof(pDrvReg->szDriverName)) 285 { 286 AssertMsgFailed(("Invalid name '%s'\n", pDrvReg->szDriverName)); 287 return VERR_PDM_INVALID_DRIVER_REGISTRATION; 288 } 289 if ((pDrvReg->fFlags & PDM_DRVREG_FLAGS_HOST_BITS_MASK) != PDM_DRVREG_FLAGS_HOST_BITS_DEFAULT) 290 { 291 AssertMsgFailed(("Invalid host bits flags! fFlags=%#x (Driver %s)\n", pDrvReg->fFlags, pDrvReg->szDriverName)); 292 return VERR_PDM_INVALID_DRIVER_HOST_BITS; 293 } 294 if (pDrvReg->cMaxInstances <= 0) 295 { 296 AssertMsgFailed(("Max instances %u! (Driver %s)\n", pDrvReg->cMaxInstances, pDrvReg->szDriverName)); 297 return VERR_PDM_INVALID_DRIVER_REGISTRATION; 298 } 299 if (pDrvReg->cbInstance > _1M) 300 { 301 AssertMsgFailed(("Instance size above 1MB, %d bytes! (Driver %s)\n", pDrvReg->cbInstance, pDrvReg->szDriverName)); 302 return VERR_PDM_INVALID_DRIVER_REGISTRATION; 303 } 304 if (!pDrvReg->pfnConstruct) 305 { 306 AssertMsgFailed(("No constructore! (Driver %s)\n", pDrvReg->szDriverName)); 307 return VERR_PDM_INVALID_DRIVER_REGISTRATION; 308 } 277 AssertPtrReturn(pDrvReg, VERR_INVALID_POINTER); 278 AssertMsgReturn(pDrvReg->u32Version == PDM_DRVREG_VERSION, ("%#x\n", pDrvReg->u32Version), VERR_PDM_UNKNOWN_DRVREG_VERSION); 279 AssertReturn(pDrvReg->szDriverName[0], VERR_PDM_INVALID_DRIVER_REGISTRATION); 280 AssertMsgReturn(memchr(pDrvReg->szDriverName, '\0', sizeof(pDrvReg->szDriverName)), 281 (".*s\n", sizeof(pDrvReg->szDriverName), pDrvReg->szDriverName), 282 VERR_PDM_INVALID_DRIVER_REGISTRATION); 283 AssertMsgReturn((pDrvReg->fFlags & PDM_DRVREG_FLAGS_HOST_BITS_MASK) == PDM_DRVREG_FLAGS_HOST_BITS_DEFAULT, 284 ("%s: fFlags=%#x\n", pDrvReg->szDriverName, pDrvReg->fFlags), 285 VERR_PDM_INVALID_DRIVER_HOST_BITS); 286 AssertMsgReturn(pDrvReg->cMaxInstances > 0, ("%s: %#x\n", pDrvReg->szDriverName, pDrvReg->cMaxInstances), 287 VERR_PDM_INVALID_DRIVER_REGISTRATION); 288 AssertMsgReturn(pDrvReg->cbInstance <= _1M, ("%s: %#x\n", pDrvReg->szDriverName, pDrvReg->cbInstance), 289 VERR_PDM_INVALID_DRIVER_REGISTRATION); 290 AssertMsgReturn(VALID_PTR(pDrvReg->pfnConstruct), ("%s: %p\n", pDrvReg->szDriverName, pDrvReg->pfnConstruct), 291 VERR_PDM_INVALID_DRIVER_REGISTRATION); 292 AssertMsgReturn(pDrvReg->pfnSoftReset == NULL, ("%s: %p\n", pDrvReg->szDriverName, pDrvReg->pfnSoftReset), 293 VERR_PDM_INVALID_DRIVER_REGISTRATION); 294 AssertMsgReturn(pDrvReg->u32VersionEnd == PDM_DRVREG_VERSION, ("%s: #x\n", pDrvReg->szDriverName, pDrvReg->u32VersionEnd), 295 VERR_PDM_INVALID_DRIVER_REGISTRATION); 309 296 310 297 /* … … 385 372 */ 386 373 if (pDrvIns->Internal.s.pUp 387 388 374 ? !pDrvIns->Internal.s.pUp->pDrvReg->pfnDetach 375 : !pDrvIns->Internal.s.pLun->pDevIns->pDevReg->pfnDetach) 389 376 { 390 377 AssertMsgFailed(("Cannot detach driver instance because the driver/device above doesn't support it!\n")); … … 406 393 * 407 394 * @param pDrvIns Pointer to the driver instance to start with. 408 * @param fFlags Flags, combination of the PDMDEVATT_FLAGS_* \#defines.395 * @param fFlags PDM_TACH_FLAGS_NOT_HOT_PLUG or 0. 409 396 */ 410 397 void pdmR3DrvDestroyChain(PPDMDRVINS pDrvIns, uint32_t fFlags) … … 442 429 443 430 if (pParent->pDrvReg->pfnDetach) 444 pParent->pDrvReg->pfnDetach(pParent );431 pParent->pDrvReg->pfnDetach(pParent, fFlags); 445 432 446 433 pParent->pDownBase = NULL; … … 492 479 493 480 /** @copydoc PDMDRVHLP::pfnAttach */ 494 static DECLCALLBACK(int) pdmR3DrvHlp_Attach(PPDMDRVINS pDrvIns, PPDMIBASE *ppBaseInterface)481 static DECLCALLBACK(int) pdmR3DrvHlp_Attach(PPDMDRVINS pDrvIns, uint32_t fFlags, PPDMIBASE *ppBaseInterface) 495 482 { 496 483 PDMDRV_ASSERT_DRVINS(pDrvIns); … … 498 485 LogFlow(("pdmR3DrvHlp_Attach: caller='%s'/%d:\n", 499 486 pDrvIns->pDrvReg->szDriverName, pDrvIns->iInstance)); 487 Assert(!(fFlags & ~(PDM_TACH_FLAGS_NOT_HOT_PLUG))); 500 488 501 489 /* … … 564 552 565 553 Log(("PDM: Constructing driver '%s' instance %d...\n", pNew->pDrvReg->szDriverName, pNew->iInstance)); 566 rc = pDrv->pDrvReg->pfnConstruct(pNew, pNew->pCfgHandle );554 rc = pDrv->pDrvReg->pfnConstruct(pNew, pNew->pCfgHandle, 0 /*fFlags*/); 567 555 if (RT_SUCCESS(rc)) 568 556 { … … 622 610 623 611 /** @copydoc PDMDRVHLP::pfnDetach */ 624 static DECLCALLBACK(int) pdmR3DrvHlp_Detach(PPDMDRVINS pDrvIns )625 { 626 PDMDRV_ASSERT_DRVINS(pDrvIns); 627 LogFlow(("pdmR3DrvHlp_Detach: caller='%s'/%d: \n",628 pDrvIns->pDrvReg->szDriverName, pDrvIns->iInstance ));612 static DECLCALLBACK(int) pdmR3DrvHlp_Detach(PPDMDRVINS pDrvIns, uint32_t fFlags) 613 { 614 PDMDRV_ASSERT_DRVINS(pDrvIns); 615 LogFlow(("pdmR3DrvHlp_Detach: caller='%s'/%d: fFlags=%#x\n", 616 pDrvIns->pDrvReg->szDriverName, pDrvIns->iInstance, fFlags)); 629 617 VM_ASSERT_EMT(pDrvIns->Internal.s.pVM); 630 618 … … 634 622 int rc; 635 623 if (pDrvIns->Internal.s.pDown) 636 { 637 /** @todo: Current assumption is that drivers will never initiate hot plug events. */ 638 rc = pdmR3DrvDetach(pDrvIns->Internal.s.pDown, PDMDEVATT_FLAGS_NOT_HOT_PLUG); 639 } 624 rc = pdmR3DrvDetach(pDrvIns->Internal.s.pDown, fFlags); 640 625 else 641 626 { … … 651 636 652 637 /** @copydoc PDMDRVHLP::pfnDetachSelf */ 653 static DECLCALLBACK(int) pdmR3DrvHlp_DetachSelf(PPDMDRVINS pDrvIns) 654 { 655 PDMDRV_ASSERT_DRVINS(pDrvIns); 656 LogFlow(("pdmR3DrvHlp_DetachSelf: caller='%s'/%d:\n", 657 pDrvIns->pDrvReg->szDriverName, pDrvIns->iInstance)); 658 VM_ASSERT_EMT(pDrvIns->Internal.s.pVM); 659 660 /** @todo: Current assumption is that drivers will never initiate hot plug events. */ 661 int rc = pdmR3DrvDetach(pDrvIns, PDMDEVATT_FLAGS_NOT_HOT_PLUG); 638 static DECLCALLBACK(int) pdmR3DrvHlp_DetachSelf(PPDMDRVINS pDrvIns, uint32_t fFlags) 639 { 640 PDMDRV_ASSERT_DRVINS(pDrvIns); 641 LogFlow(("pdmR3DrvHlp_DetachSelf: caller='%s'/%d: fFlags=%#x\n", 642 pDrvIns->pDrvReg->szDriverName, pDrvIns->iInstance, fFlags)); 643 VM_ASSERT_EMT(pDrvIns->Internal.s.pVM); 644 645 int rc = pdmR3DrvDetach(pDrvIns, fFlags); 662 646 663 647 LogFlow(("pdmR3DrvHlp_Detach: returns %Rrc\n", rc)); /* pDrvIns is freed by now. */
Note:
See TracChangeset
for help on using the changeset viewer.