Author: sginsberg
Date: Thu Sep 10 12:00:28 2015
New Revision: 69170

URL: http://svn.reactos.org/svn/reactos?rev=69170&view=rev
Log:
Fix the FSDs to use the INIT_SECTION-style and add the alloc_text-s required 
for MSVC. Please make sure to add section declarations for both compilers for 
any new functions!

Modified:
    trunk/reactos/drivers/filesystems/cdfs/cdfs.c
    trunk/reactos/drivers/filesystems/cdfs/cdfs.h
    trunk/reactos/drivers/filesystems/fastfat/iface.c
    trunk/reactos/drivers/filesystems/fastfat/vfat.h
    trunk/reactos/drivers/filesystems/mup/mup.c
    trunk/reactos/drivers/filesystems/mup/mup.h
    trunk/reactos/drivers/filesystems/ntfs/ntfs.c
    trunk/reactos/drivers/filesystems/ntfs/ntfs.h

Modified: trunk/reactos/drivers/filesystems/cdfs/cdfs.c
URL: 
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/filesystems/cdfs/cdfs.c?rev=69170&r1=69169&r2=69170&view=diff
==============================================================================
--- trunk/reactos/drivers/filesystems/cdfs/cdfs.c       [iso-8859-1] (original)
+++ trunk/reactos/drivers/filesystems/cdfs/cdfs.c       [iso-8859-1] Thu Sep 10 
12:00:28 2015
@@ -32,6 +32,10 @@
 #define NDEBUG
 #include <debug.h>
 
+#if defined(ALLOC_PRAGMA)
+#pragma alloc_text(INIT, DriverEntry)
+#endif
+
 /* GLOBALS ******************************************************************/
 
 PCDFS_GLOBAL_DATA CdfsGlobalData;
@@ -39,7 +43,7 @@
 
 /* FUNCTIONS ****************************************************************/
 
-INIT_FUNCTION
+INIT_SECTION
 NTSTATUS NTAPI
 DriverEntry(PDRIVER_OBJECT DriverObject,
             PUNICODE_STRING RegistryPath)

Modified: trunk/reactos/drivers/filesystems/cdfs/cdfs.h
URL: 
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/filesystems/cdfs/cdfs.h?rev=69170&r1=69169&r2=69170&view=diff
==============================================================================
--- trunk/reactos/drivers/filesystems/cdfs/cdfs.h       [iso-8859-1] (original)
+++ trunk/reactos/drivers/filesystems/cdfs/cdfs.h       [iso-8859-1] Thu Sep 10 
12:00:28 2015
@@ -7,10 +7,8 @@
 
 #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

Modified: trunk/reactos/drivers/filesystems/fastfat/iface.c
URL: 
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/filesystems/fastfat/iface.c?rev=69170&r1=69169&r2=69170&view=diff
==============================================================================
--- trunk/reactos/drivers/filesystems/fastfat/iface.c   [iso-8859-1] (original)
+++ trunk/reactos/drivers/filesystems/fastfat/iface.c   [iso-8859-1] Thu Sep 10 
12:00:28 2015
@@ -30,6 +30,11 @@
 #define NDEBUG
 #include <debug.h>
 
+#if defined(ALLOC_PRAGMA)
+#pragma alloc_text(INIT, DriverEntry)
+#endif
+
+
 /* GLOBALS *****************************************************************/
 
 PVFAT_GLOBAL_DATA VfatGlobalData;
@@ -43,7 +48,7 @@
  *           RegistryPath = path to our configuration entries
  * RETURNS: Success or failure
  */
-INIT_FUNCTION
+INIT_SECTION
 NTSTATUS
 NTAPI
 DriverEntry(

Modified: trunk/reactos/drivers/filesystems/fastfat/vfat.h
URL: 
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/filesystems/fastfat/vfat.h?rev=69170&r1=69169&r2=69170&view=diff
==============================================================================
--- trunk/reactos/drivers/filesystems/fastfat/vfat.h    [iso-8859-1] (original)
+++ trunk/reactos/drivers/filesystems/fastfat/vfat.h    [iso-8859-1] Thu Sep 10 
12:00:28 2015
@@ -8,10 +8,8 @@
 
 #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

Modified: trunk/reactos/drivers/filesystems/mup/mup.c
URL: 
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/filesystems/mup/mup.c?rev=69170&r1=69169&r2=69170&view=diff
==============================================================================
--- trunk/reactos/drivers/filesystems/mup/mup.c [iso-8859-1] (original)
+++ trunk/reactos/drivers/filesystems/mup/mup.c [iso-8859-1] Thu Sep 10 
12:00:28 2015
@@ -32,6 +32,36 @@
 #define NDEBUG
 #include <debug.h>
 
+NTSTATUS
+NTAPI
+DriverEntry(
+    PDRIVER_OBJECT DriverObject,
+    PUNICODE_STRING RegistryPath
+);
+
+NTSTATUS
+DfsDriverEntry(
+    PDRIVER_OBJECT DriverObject,
+    PUNICODE_STRING RegistryPath
+);
+
+VOID
+MupInitializeData(
+    VOID
+);
+
+VOID
+MupInitializeVcb(
+    PMUP_VCB Vcb
+);
+
+#if defined(ALLOC_PRAGMA)
+#pragma alloc_text(INIT, DriverEntry)
+#pragma alloc_text(INIT, DfsDriverEntry)
+#pragma alloc_text(INIT, MupInitializeData)
+#pragma alloc_text(INIT, MupInitializeVcb)
+#endif
+
 ERESOURCE MupGlobalLock;
 ERESOURCE MupPrefixTableLock;
 ERESOURCE MupCcbListLock;
@@ -53,9 +83,9 @@
 
 /* FUNCTIONS ****************************************************************/
 
-INIT_FUNCTION
+INIT_SECTION
 VOID
-MupInitializeData()
+MupInitializeData(VOID)
 {
     ExInitializeResourceLite(&MupGlobalLock);
     ExInitializeResourceLite(&MupPrefixTableLock);
@@ -79,7 +109,7 @@
   ExDeleteResourceLite(&MupVcbLock);
 }
 
-INIT_FUNCTION
+INIT_SECTION
 VOID
 MupInitializeVcb(PMUP_VCB Vcb)
 {
@@ -2522,7 +2552,7 @@
     MupUninitializeData();
 }
 
-INIT_FUNCTION
+INIT_SECTION
 NTSTATUS
 DfsDriverEntry(PDRIVER_OBJECT DriverObject,
                PUNICODE_STRING RegistryPath)
@@ -2541,7 +2571,7 @@
  *           RegistryPath = path to our configuration entries
  * RETURNS: Success or failure
  */
-INIT_FUNCTION
+INIT_SECTION
 NTSTATUS
 NTAPI
 DriverEntry(PDRIVER_OBJECT DriverObject,

Modified: trunk/reactos/drivers/filesystems/mup/mup.h
URL: 
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/filesystems/mup/mup.h?rev=69170&r1=69169&r2=69170&view=diff
==============================================================================
--- trunk/reactos/drivers/filesystems/mup/mup.h [iso-8859-1] (original)
+++ trunk/reactos/drivers/filesystems/mup/mup.h [iso-8859-1] Thu Sep 10 
12:00:28 2015
@@ -8,10 +8,8 @@
 
 #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))

Modified: trunk/reactos/drivers/filesystems/ntfs/ntfs.c
URL: 
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/filesystems/ntfs/ntfs.c?rev=69170&r1=69169&r2=69170&view=diff
==============================================================================
--- trunk/reactos/drivers/filesystems/ntfs/ntfs.c       [iso-8859-1] (original)
+++ trunk/reactos/drivers/filesystems/ntfs/ntfs.c       [iso-8859-1] Thu Sep 10 
12:00:28 2015
@@ -31,6 +31,11 @@
 #define NDEBUG
 #include <debug.h>
 
+#if defined(ALLOC_PRAGMA)
+#pragma alloc_text(INIT, DriverEntry)
+#pragma alloc_text(INIT, NtfsInitializeFunctionPointers)
+#endif
+
 /* GLOBALS *****************************************************************/
 
 PNTFS_GLOBAL_DATA NtfsGlobalData = NULL;
@@ -44,7 +49,7 @@
  *           RegistryPath = path to our configuration entries
  * RETURNS: Success or failure
  */
-INIT_FUNCTION
+INIT_SECTION
 NTSTATUS
 NTAPI
 DriverEntry(PDRIVER_OBJECT DriverObject,
@@ -123,7 +128,7 @@
  *           DriverObject = object describing this driver
  * RETURNS: Nothing
  */
-INIT_FUNCTION
+INIT_SECTION
 VOID
 NTAPI
 NtfsInitializeFunctionPointers(PDRIVER_OBJECT DriverObject)

Modified: trunk/reactos/drivers/filesystems/ntfs/ntfs.h
URL: 
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/filesystems/ntfs/ntfs.h?rev=69170&r1=69169&r2=69170&view=diff
==============================================================================
--- trunk/reactos/drivers/filesystems/ntfs/ntfs.h       [iso-8859-1] (original)
+++ trunk/reactos/drivers/filesystems/ntfs/ntfs.h       [iso-8859-1] Thu Sep 10 
12:00:28 2015
@@ -6,10 +6,8 @@
 
 #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) \


Reply via email to