Changeset 17802 in vbox
- Timestamp:
- Mar 13, 2009 10:36:35 AM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/Network/DevINIP.cpp
r17800 r17802 736 736 PDM_DEVREG_VERSION 737 737 }; 738 739 740 /*******************************************************************************741 * Header Files *742 *******************************************************************************/743 #define LOG_GROUP LOG_GROUP_DEV744 #include <VBox/pdm.h>745 #include <VBox/version.h>746 #include <VBox/err.h>747 #include <VBox/usb.h>748 749 #include <VBox/log.h>750 #include <iprt/assert.h>751 752 #include "Builtins.h"753 754 755 /*******************************************************************************756 * Global Variables *757 *******************************************************************************/758 const void *g_apvVBoxDDDependencies[] =759 {760 NULL,761 };762 763 764 /**765 * Register builtin devices.766 *767 * @returns VBox status code.768 * @param pCallbacks Pointer to the callback table.769 * @param u32Version VBox version number.770 */771 extern "C" DECLEXPORT(int) VBoxDevicesRegister(PPDMDEVREGCB pCallbacks, uint32_t u32Version)772 {773 LogFlow(("VBoxDevicesRegister: u32Version=%#x\n", u32Version));774 AssertReleaseMsg(u32Version == VBOX_VERSION, ("u32Version=%#x VBOX_VERSION=%#x\n", u32Version, VBOX_VERSION));775 int rc;776 777 rc = pCallbacks->pfnRegister(pCallbacks, &g_DevicePCI);778 if (RT_FAILURE(rc))779 return rc;780 rc = pCallbacks->pfnRegister(pCallbacks, &g_DevicePcArch);781 if (RT_FAILURE(rc))782 return rc;783 rc = pCallbacks->pfnRegister(pCallbacks, &g_DevicePcBios);784 if (RT_FAILURE(rc))785 return rc;786 rc = pCallbacks->pfnRegister(pCallbacks, &g_DevicePS2KeyboardMouse);787 if (RT_FAILURE(rc))788 return rc;789 rc = pCallbacks->pfnRegister(pCallbacks, &g_DevicePIIX3IDE);790 if (RT_FAILURE(rc))791 return rc;792 rc = pCallbacks->pfnRegister(pCallbacks, &g_DeviceI8254);793 if (RT_FAILURE(rc))794 return rc;795 rc = pCallbacks->pfnRegister(pCallbacks, &g_DeviceI8259);796 if (RT_FAILURE(rc))797 return rc;798 #ifdef VBOX_WITH_HPET799 rc = pCallbacks->pfnRegister(pCallbacks, &g_DeviceHPET);800 if (RT_FAILURE(rc))801 return rc;802 #endif803 #ifdef VBOX_WITH_SMC804 rc = pCallbacks->pfnRegister(pCallbacks, &g_DeviceSMC);805 if (RT_FAILURE(rc))806 return rc;807 #endif808 #ifdef VBOX_WITH_LPC809 rc = pCallbacks->pfnRegister(pCallbacks, &g_DeviceLPC);810 if (RT_FAILURE(rc))811 return rc;812 #endif813 #ifdef VBOX_WITH_EFI814 rc = pCallbacks->pfnRegister(pCallbacks, &g_DeviceEFI);815 if (RT_FAILURE(rc))816 return rc;817 #endif818 rc = pCallbacks->pfnRegister(pCallbacks, &g_DeviceMC146818);819 if (RT_FAILURE(rc))820 return rc;821 rc = pCallbacks->pfnRegister(pCallbacks, &g_DeviceVga);822 if (RT_FAILURE(rc))823 return rc;824 rc = pCallbacks->pfnRegister(pCallbacks, &g_DeviceVMMDev);825 if (RT_FAILURE(rc))826 return rc;827 rc = pCallbacks->pfnRegister(pCallbacks, &g_DevicePCNet);828 if (RT_FAILURE(rc))829 return rc;830 #ifdef VBOX_WITH_E1000831 rc = pCallbacks->pfnRegister(pCallbacks, &g_DeviceE1000);832 if (RT_FAILURE(rc))833 return rc;834 #endif835 #ifdef VBOX_WITH_INIP836 rc = pCallbacks->pfnRegister(pCallbacks, &g_DeviceINIP);837 if (RT_FAILURE(rc))838 return rc;839 #endif840 rc = pCallbacks->pfnRegister(pCallbacks, &g_DeviceICHAC97);841 if (RT_FAILURE(rc))842 return rc;843 rc = pCallbacks->pfnRegister(pCallbacks, &g_DeviceSB16);844 if (RT_FAILURE(rc))845 return rc;846 rc = pCallbacks->pfnRegister(pCallbacks, &g_DeviceAudioSniffer);847 if (RT_FAILURE(rc))848 return rc;849 #ifdef VBOX_WITH_USB850 rc = pCallbacks->pfnRegister(pCallbacks, &g_DeviceOHCI);851 if (RT_FAILURE(rc))852 return rc;853 #endif854 #ifdef VBOX_WITH_EHCI855 rc = pCallbacks->pfnRegister(pCallbacks, &g_DeviceEHCI);856 if (RT_FAILURE(rc))857 return rc;858 #endif859 #ifdef VBOX_ACPI860 rc = pCallbacks->pfnRegister(pCallbacks, &g_DeviceACPI);861 if (RT_FAILURE(rc))862 return rc;863 #endif864 rc = pCallbacks->pfnRegister(pCallbacks, &g_DeviceDMA);865 if (RT_FAILURE(rc))866 return rc;867 rc = pCallbacks->pfnRegister(pCallbacks, &g_DeviceFloppyController);868 if (RT_FAILURE(rc))869 return rc;870 rc = pCallbacks->pfnRegister(pCallbacks, &g_DeviceSerialPort);871 if (RT_FAILURE(rc))872 return rc;873 rc = pCallbacks->pfnRegister(pCallbacks, &g_DeviceParallelPort);874 if (RT_FAILURE(rc))875 return rc;876 #ifdef VBOX_WITH_AHCI877 rc = pCallbacks->pfnRegister(pCallbacks, &g_DeviceAHCI);878 if (RT_FAILURE(rc))879 return rc;880 #endif881 #ifdef VBOX_WITH_BUSLOGIC882 rc = pCallbacks->pfnRegister(pCallbacks, &g_DeviceBusLogic);883 if (RT_FAILURE(rc))884 return rc;885 #endif886 rc = pCallbacks->pfnRegister(pCallbacks, &g_DevicePCIBridge);887 if (RT_FAILURE(rc))888 return rc;889 #ifdef VBOX_WITH_LSILOGIC890 rc = pCallbacks->pfnRegister(pCallbacks, &g_DeviceLsiLogicSCSI);891 if (VBOX_FAILURE(rc))892 return rc;893 #endif894 895 return VINF_SUCCESS;896 }897 898 899 /**900 * Register builtin drivers.901 *902 * @returns VBox status code.903 * @param pCallbacks Pointer to the callback table.904 * @param u32Version VBox version number.905 */906 extern "C" DECLEXPORT(int) VBoxDriversRegister(PCPDMDRVREGCB pCallbacks, uint32_t u32Version)907 {908 LogFlow(("VBoxDriversRegister: u32Version=%#x\n", u32Version));909 AssertReleaseMsg(u32Version == VBOX_VERSION, ("u32Version=%#x VBOX_VERSION=%#x\n", u32Version, VBOX_VERSION));910 911 int rc = pCallbacks->pfnRegister(pCallbacks, &g_DrvMouseQueue);912 if (RT_FAILURE(rc))913 return rc;914 rc = pCallbacks->pfnRegister(pCallbacks, &g_DrvKeyboardQueue);915 if (RT_FAILURE(rc))916 return rc;917 rc = pCallbacks->pfnRegister(pCallbacks, &g_DrvBlock);918 if (RT_FAILURE(rc))919 return rc;920 rc = pCallbacks->pfnRegister(pCallbacks, &g_DrvVD);921 if (RT_FAILURE(rc))922 return rc;923 #if defined(RT_OS_DARWIN) || defined(RT_OS_LINUX) || defined(RT_OS_SOLARIS) || defined(RT_OS_WINDOWS)924 rc = pCallbacks->pfnRegister(pCallbacks, &g_DrvHostDVD);925 if (RT_FAILURE(rc))926 return rc;927 #endif928 #if defined(RT_OS_LINUX) || defined(RT_OS_WINDOWS)929 rc = pCallbacks->pfnRegister(pCallbacks, &g_DrvHostFloppy);930 if (RT_FAILURE(rc))931 return rc;932 #endif933 rc = pCallbacks->pfnRegister(pCallbacks, &g_DrvMediaISO);934 if (RT_FAILURE(rc))935 return rc;936 rc = pCallbacks->pfnRegister(pCallbacks, &g_DrvRawImage);937 if (RT_FAILURE(rc))938 return rc;939 #ifndef RT_OS_L4940 rc = pCallbacks->pfnRegister(pCallbacks, &g_DrvNAT);941 if (RT_FAILURE(rc))942 return rc;943 #endif944 #if defined(RT_OS_L4) || defined(RT_OS_LINUX) || defined(RT_OS_OS2) || (defined(RT_OS_SOLARIS) && !defined(RT_OS_SOLARIS_10)) || defined(RT_OS_WINDOWS)945 rc = pCallbacks->pfnRegister(pCallbacks, &g_DrvHostInterface);946 if (RT_FAILURE(rc))947 return rc;948 #endif949 rc = pCallbacks->pfnRegister(pCallbacks, &g_DrvIntNet);950 if (RT_FAILURE(rc))951 return rc;952 rc = pCallbacks->pfnRegister(pCallbacks, &g_DrvNetSniffer);953 if (RT_FAILURE(rc))954 return rc;955 rc = pCallbacks->pfnRegister(pCallbacks, &g_DrvAUDIO);956 if (RT_FAILURE(rc))957 return rc;958 rc = pCallbacks->pfnRegister(pCallbacks, &g_DrvACPI);959 if (RT_FAILURE(rc))960 return rc;961 962 #ifdef VBOX_WITH_USB963 rc = pCallbacks->pfnRegister(pCallbacks, &g_DrvVUSBRootHub);964 if (RT_FAILURE(rc))965 return rc;966 #endif967 968 #if !defined(RT_OS_L4)969 rc = pCallbacks->pfnRegister(pCallbacks, &g_DrvNamedPipe);970 if (RT_FAILURE(rc))971 return rc;972 rc = pCallbacks->pfnRegister(pCallbacks, &g_DrvChar);973 if (RT_FAILURE(rc))974 return rc;975 #endif976 977 #if defined(RT_OS_LINUX)978 rc = pCallbacks->pfnRegister(pCallbacks, &g_DrvHostParallel);979 if (RT_FAILURE(rc))980 return rc;981 #endif982 983 #if defined(RT_OS_DARWIN) || defined(RT_OS_LINUX) || defined(RT_OS_SOLARIS) || defined(RT_OS_WINDOWS)984 rc = pCallbacks->pfnRegister(pCallbacks, &g_DrvHostSerial);985 if (RT_FAILURE(rc))986 return rc;987 #endif988 989 #if defined(VBOX_WITH_PDM_ASYNC_COMPLETION)990 rc = pCallbacks->pfnRegister(pCallbacks, &g_DrvRawImageAsync);991 if (RT_FAILURE(rc))992 return rc;993 994 rc = pCallbacks->pfnRegister(pCallbacks, &g_DrvTransportAsync);995 if (RT_FAILURE(rc))996 return rc;997 #endif998 #ifdef VBOX_WITH_SCSI999 rc = pCallbacks->pfnRegister(pCallbacks, &g_DrvSCSI);1000 if (RT_FAILURE(rc))1001 return rc;1002 1003 #if defined(RT_OS_LINUX)1004 rc = pCallbacks->pfnRegister(pCallbacks, &g_DrvSCSIHost);1005 if (RT_FAILURE(rc))1006 return rc;1007 #endif1008 #endif1009 1010 #ifdef VBOX_WITH_FAULT_INJECTION1011 rc = pCallbacks->pfnRegister(pCallbacks, &g_DrvFaultInject);1012 if (RT_FAILURE(rc))1013 return rc;1014 #endif1015 1016 return VINF_SUCCESS;1017 }1018 1019 1020 #ifdef VBOX_WITH_USB1021 /**1022 * Register builtin USB device.1023 *1024 * @returns VBox status code.1025 * @param pCallbacks Pointer to the callback table.1026 * @param u32Version VBox version number.1027 */1028 extern "C" DECLEXPORT(int) VBoxUsbRegister(PCPDMUSBREGCB pCallbacks, uint32_t u32Version)1029 {1030 int rc = pCallbacks->pfnRegister(pCallbacks, &g_UsbDevProxy);1031 if (RT_FAILURE(rc))1032 return rc;1033 1034 return VINF_SUCCESS;1035 }1036 #endif
Note:
See TracChangeset
for help on using the changeset viewer.