https://git.reactos.org/?p=reactos.git;a=commitdiff;h=53abbb06b532fd052d575…
commit 53abbb06b532fd052d575231a219ca5683e05514
Author: Hermès Bélusca-Maïto <hermes.belusca-maito(a)reactos.org>
AuthorDate: Sun Jan 27 02:34:20 2019 +0100
Commit: Hermès Bélusca-Maïto <hermes.belusca-maito(a)reactos.org>
CommitDate: Sun Jan 27 02:40:11 2019 +0100
[MOUNTMGR][MUP] Use global definition of INIT_FUNCTION/INIT_SECTION (Addendum to
71fefa32).
---
drivers/filesystems/mup/dfs.h | 9 +--------
drivers/filters/mountmgr/mntmgr.h | 9 ++-------
drivers/filters/mountmgr/mountmgr.c | 4 ++--
3 files changed, 5 insertions(+), 17 deletions(-)
diff --git a/drivers/filesystems/mup/dfs.h b/drivers/filesystems/mup/dfs.h
index d158a055ab..49194bdc7f 100644
--- a/drivers/filesystems/mup/dfs.h
+++ b/drivers/filesystems/mup/dfs.h
@@ -1,14 +1,7 @@
#ifndef _DFS_PCH_
#define _DFS_PCH_
-#ifndef INIT_SECTION
-#ifdef __GNUC__
-#define INIT_SECTION __attribute__((section ("INIT")))
-#else
-#define INIT_SECTION /* Done via alloc_text for MSC */
-#endif
-#define INIT_FUNCTION INIT_SECTION
-#endif
+#include <section_attribs.h>
#define DFS_OPEN_CONTEXT 0xFF444653
#define DFS_DOWNLEVEL_OPEN_CONTEXT 0x11444653
diff --git a/drivers/filters/mountmgr/mntmgr.h b/drivers/filters/mountmgr/mntmgr.h
index 4153add678..dacbfa7d69 100644
--- a/drivers/filters/mountmgr/mntmgr.h
+++ b/drivers/filters/mountmgr/mntmgr.h
@@ -8,12 +8,7 @@
#include <wdmguid.h>
#include <ndk/psfuncs.h>
#include <ntdddisk.h>
-
-#ifdef __GNUC__
-#define INIT_SECTION __attribute__((section ("INIT")))
-#else
-#define INIT_SECTION /* Done via alloc_text for MSC */
-#endif
+#include <section_attribs.h>
typedef struct _DEVICE_EXTENSION
{
@@ -233,7 +228,7 @@ HasDriveLetter(
IN PDEVICE_INFORMATION DeviceInformation
);
-INIT_SECTION
+INIT_FUNCTION
BOOLEAN
MountmgrReadNoAutoMount(
IN PUNICODE_STRING RegistryPath
diff --git a/drivers/filters/mountmgr/mountmgr.c b/drivers/filters/mountmgr/mountmgr.c
index 0e273b3957..0b2fe8e7ba 100644
--- a/drivers/filters/mountmgr/mountmgr.c
+++ b/drivers/filters/mountmgr/mountmgr.c
@@ -908,7 +908,7 @@ MountMgrUnload(IN struct _DRIVER_OBJECT *DriverObject)
/*
* @implemented
*/
-INIT_SECTION
+INIT_FUNCTION
BOOLEAN
MountmgrReadNoAutoMount(IN PUNICODE_STRING RegistryPath)
{
@@ -1802,7 +1802,7 @@ MountMgrShutdown(IN PDEVICE_OBJECT DeviceObject,
/* FUNCTIONS ****************************************************************/
-INIT_SECTION
+INIT_FUNCTION
NTSTATUS
NTAPI
DriverEntry(IN PDRIVER_OBJECT DriverObject,