From f3b5c2fe1e2c6351a8b2a57822131fd900dc4e9e Mon Sep 17 00:00:00 2001 From: Pierre Schweitzer Date: Thu, 3 Sep 2015 20:34:47 +0000 Subject: [PATCH] [CDFS] [FASTFAT] [MUP] [NTFS] Mark DriverEntry() and associated functions as INIT svn path=/trunk/; revision=68965 --- reactos/drivers/filesystems/cdfs/cdfs.c | 1 + reactos/drivers/filesystems/cdfs/cdfs.h | 8 ++++++++ reactos/drivers/filesystems/fastfat/iface.c | 1 + reactos/drivers/filesystems/fastfat/vfat.h | 8 ++++++++ reactos/drivers/filesystems/mup/mup.c | 4 ++++ reactos/drivers/filesystems/mup/mup.h | 8 ++++++++ reactos/drivers/filesystems/ntfs/ntfs.c | 2 ++ reactos/drivers/filesystems/ntfs/ntfs.h | 8 ++++++++ 8 files changed, 40 insertions(+) diff --git a/reactos/drivers/filesystems/cdfs/cdfs.c b/reactos/drivers/filesystems/cdfs/cdfs.c index 539f2210a32..8ae777800af 100644 --- a/reactos/drivers/filesystems/cdfs/cdfs.c +++ b/reactos/drivers/filesystems/cdfs/cdfs.c @@ -39,6 +39,7 @@ PCDFS_GLOBAL_DATA CdfsGlobalData; /* FUNCTIONS ****************************************************************/ +INIT_FUNCTION NTSTATUS NTAPI DriverEntry(PDRIVER_OBJECT DriverObject, PUNICODE_STRING RegistryPath) diff --git a/reactos/drivers/filesystems/cdfs/cdfs.h b/reactos/drivers/filesystems/cdfs/cdfs.h index 0e5a2bb705b..e60e7c84f1b 100644 --- a/reactos/drivers/filesystems/cdfs/cdfs.h +++ b/reactos/drivers/filesystems/cdfs/cdfs.h @@ -5,6 +5,14 @@ #include #include +#ifdef __GNUC__ +#define INIT_SECTION __attribute__((section ("INIT"))) +#define INIT_FUNCTION INIT_SECTION +#else +#define INIT_SECTION /* Done via alloc_text for MSC */ +#define INIT_FUNCTION INIT_SECTION +#endif + #define CDFS_BASIC_SECTOR 2048 #define CDFS_PRIMARY_DESCRIPTOR_LOCATION 16 #define BLOCKSIZE CDFS_BASIC_SECTOR diff --git a/reactos/drivers/filesystems/fastfat/iface.c b/reactos/drivers/filesystems/fastfat/iface.c index b6d61430b51..0a509b37f57 100644 --- a/reactos/drivers/filesystems/fastfat/iface.c +++ b/reactos/drivers/filesystems/fastfat/iface.c @@ -43,6 +43,7 @@ PVFAT_GLOBAL_DATA VfatGlobalData; * RegistryPath = path to our configuration entries * RETURNS: Success or failure */ +INIT_FUNCTION NTSTATUS NTAPI DriverEntry( diff --git a/reactos/drivers/filesystems/fastfat/vfat.h b/reactos/drivers/filesystems/fastfat/vfat.h index 2c4a6afb519..0fec5d3a182 100644 --- a/reactos/drivers/filesystems/fastfat/vfat.h +++ b/reactos/drivers/filesystems/fastfat/vfat.h @@ -6,6 +6,14 @@ #include #include +#ifdef __GNUC__ +#define INIT_SECTION __attribute__((section ("INIT"))) +#define INIT_FUNCTION INIT_SECTION +#else +#define INIT_SECTION /* Done via alloc_text for MSC */ +#define INIT_FUNCTION INIT_SECTION +#endif + #define USE_ROS_CC_AND_FS #if 0 #ifndef _MSC_VER diff --git a/reactos/drivers/filesystems/mup/mup.c b/reactos/drivers/filesystems/mup/mup.c index dadafa304cb..60fce94b378 100644 --- a/reactos/drivers/filesystems/mup/mup.c +++ b/reactos/drivers/filesystems/mup/mup.c @@ -53,6 +53,7 @@ NTSTATUS MupOrderedErrorList[] = { STATUS_UNSUCCESSFUL, /* FUNCTIONS ****************************************************************/ +INIT_FUNCTION VOID MupInitializeData() { @@ -78,6 +79,7 @@ MupUninitializeData() ExDeleteResourceLite(&MupVcbLock); } +INIT_FUNCTION VOID MupInitializeVcb(PMUP_VCB Vcb) { @@ -2512,6 +2514,7 @@ MupUnload(PDRIVER_OBJECT DriverObject) MupUninitializeData(); } +INIT_FUNCTION NTSTATUS DfsDriverEntry(PDRIVER_OBJECT DriverObject, PUNICODE_STRING RegistryPath) @@ -2530,6 +2533,7 @@ DfsDriverEntry(PDRIVER_OBJECT DriverObject, * RegistryPath = path to our configuration entries * RETURNS: Success or failure */ +INIT_FUNCTION NTSTATUS NTAPI DriverEntry(PDRIVER_OBJECT DriverObject, diff --git a/reactos/drivers/filesystems/mup/mup.h b/reactos/drivers/filesystems/mup/mup.h index add94aafd4f..0b43541a5a5 100644 --- a/reactos/drivers/filesystems/mup/mup.h +++ b/reactos/drivers/filesystems/mup/mup.h @@ -6,6 +6,14 @@ #include #include +#ifdef __GNUC__ +#define INIT_SECTION __attribute__((section ("INIT"))) +#define INIT_FUNCTION INIT_SECTION +#else +#define INIT_SECTION /* Done via alloc_text for MSC */ +#define INIT_FUNCTION INIT_SECTION +#endif + #define ROUND_UP(N, S) ((((N) + (S) - 1) / (S)) * (S)) #define IO_METHOD_FROM_CTL_CODE(C) (C & 0x00000003) diff --git a/reactos/drivers/filesystems/ntfs/ntfs.c b/reactos/drivers/filesystems/ntfs/ntfs.c index 7646a5049d2..51d62a2b7ee 100644 --- a/reactos/drivers/filesystems/ntfs/ntfs.c +++ b/reactos/drivers/filesystems/ntfs/ntfs.c @@ -44,6 +44,7 @@ PNTFS_GLOBAL_DATA NtfsGlobalData = NULL; * RegistryPath = path to our configuration entries * RETURNS: Success or failure */ +INIT_FUNCTION NTSTATUS NTAPI DriverEntry(PDRIVER_OBJECT DriverObject, @@ -122,6 +123,7 @@ DriverEntry(PDRIVER_OBJECT DriverObject, * DriverObject = object describing this driver * RETURNS: Nothing */ +INIT_FUNCTION VOID NTAPI NtfsInitializeFunctionPointers(PDRIVER_OBJECT DriverObject) diff --git a/reactos/drivers/filesystems/ntfs/ntfs.h b/reactos/drivers/filesystems/ntfs/ntfs.h index 6366b3cff02..d162c59da38 100644 --- a/reactos/drivers/filesystems/ntfs/ntfs.h +++ b/reactos/drivers/filesystems/ntfs/ntfs.h @@ -4,6 +4,14 @@ #include #include +#ifdef __GNUC__ +#define INIT_SECTION __attribute__((section ("INIT"))) +#define INIT_FUNCTION INIT_SECTION +#else +#define INIT_SECTION /* Done via alloc_text for MSC */ +#define INIT_FUNCTION INIT_SECTION +#endif + #define CACHEPAGESIZE(pDeviceExt) \ ((pDeviceExt)->NtfsInfo.UCHARsPerCluster > PAGE_SIZE ? \ (pDeviceExt)->NtfsInfo.UCHARsPerCluster : PAGE_SIZE) -- 2.17.1