Changeset 22277 in vbox for trunk/src/VBox/Devices
- Timestamp:
- Aug 16, 2009 9:12:50 PM (16 years ago)
- svn:sync-xref-src-repo-rev:
- 51119
- Location:
- trunk/src/VBox/Devices
- Files:
-
- 29 edited
Legend:
- Unmodified
- Added
- Removed
-
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);
Note:
See TracChangeset
for help on using the changeset viewer.