mirror of
https://github.com/reactos/reactos.git
synced 2025-01-01 03:54:02 +00:00
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!
svn path=/trunk/; revision=69170
This commit is contained in:
parent
317b564ba0
commit
7fc480a7c1
8 changed files with 53 additions and 17 deletions
|
@ -32,6 +32,10 @@
|
||||||
#define NDEBUG
|
#define NDEBUG
|
||||||
#include <debug.h>
|
#include <debug.h>
|
||||||
|
|
||||||
|
#if defined(ALLOC_PRAGMA)
|
||||||
|
#pragma alloc_text(INIT, DriverEntry)
|
||||||
|
#endif
|
||||||
|
|
||||||
/* GLOBALS ******************************************************************/
|
/* GLOBALS ******************************************************************/
|
||||||
|
|
||||||
PCDFS_GLOBAL_DATA CdfsGlobalData;
|
PCDFS_GLOBAL_DATA CdfsGlobalData;
|
||||||
|
@ -39,7 +43,7 @@ PCDFS_GLOBAL_DATA CdfsGlobalData;
|
||||||
|
|
||||||
/* FUNCTIONS ****************************************************************/
|
/* FUNCTIONS ****************************************************************/
|
||||||
|
|
||||||
INIT_FUNCTION
|
INIT_SECTION
|
||||||
NTSTATUS NTAPI
|
NTSTATUS NTAPI
|
||||||
DriverEntry(PDRIVER_OBJECT DriverObject,
|
DriverEntry(PDRIVER_OBJECT DriverObject,
|
||||||
PUNICODE_STRING RegistryPath)
|
PUNICODE_STRING RegistryPath)
|
||||||
|
|
|
@ -7,10 +7,8 @@
|
||||||
|
|
||||||
#ifdef __GNUC__
|
#ifdef __GNUC__
|
||||||
#define INIT_SECTION __attribute__((section ("INIT")))
|
#define INIT_SECTION __attribute__((section ("INIT")))
|
||||||
#define INIT_FUNCTION INIT_SECTION
|
|
||||||
#else
|
#else
|
||||||
#define INIT_SECTION /* Done via alloc_text for MSC */
|
#define INIT_SECTION /* Done via alloc_text for MSC */
|
||||||
#define INIT_FUNCTION INIT_SECTION
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define CDFS_BASIC_SECTOR 2048
|
#define CDFS_BASIC_SECTOR 2048
|
||||||
|
|
|
@ -30,6 +30,11 @@
|
||||||
#define NDEBUG
|
#define NDEBUG
|
||||||
#include <debug.h>
|
#include <debug.h>
|
||||||
|
|
||||||
|
#if defined(ALLOC_PRAGMA)
|
||||||
|
#pragma alloc_text(INIT, DriverEntry)
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
/* GLOBALS *****************************************************************/
|
/* GLOBALS *****************************************************************/
|
||||||
|
|
||||||
PVFAT_GLOBAL_DATA VfatGlobalData;
|
PVFAT_GLOBAL_DATA VfatGlobalData;
|
||||||
|
@ -43,7 +48,7 @@ PVFAT_GLOBAL_DATA VfatGlobalData;
|
||||||
* RegistryPath = path to our configuration entries
|
* RegistryPath = path to our configuration entries
|
||||||
* RETURNS: Success or failure
|
* RETURNS: Success or failure
|
||||||
*/
|
*/
|
||||||
INIT_FUNCTION
|
INIT_SECTION
|
||||||
NTSTATUS
|
NTSTATUS
|
||||||
NTAPI
|
NTAPI
|
||||||
DriverEntry(
|
DriverEntry(
|
||||||
|
|
|
@ -8,10 +8,8 @@
|
||||||
|
|
||||||
#ifdef __GNUC__
|
#ifdef __GNUC__
|
||||||
#define INIT_SECTION __attribute__((section ("INIT")))
|
#define INIT_SECTION __attribute__((section ("INIT")))
|
||||||
#define INIT_FUNCTION INIT_SECTION
|
|
||||||
#else
|
#else
|
||||||
#define INIT_SECTION /* Done via alloc_text for MSC */
|
#define INIT_SECTION /* Done via alloc_text for MSC */
|
||||||
#define INIT_FUNCTION INIT_SECTION
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define USE_ROS_CC_AND_FS
|
#define USE_ROS_CC_AND_FS
|
||||||
|
|
|
@ -32,6 +32,36 @@
|
||||||
#define NDEBUG
|
#define NDEBUG
|
||||||
#include <debug.h>
|
#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 MupGlobalLock;
|
||||||
ERESOURCE MupPrefixTableLock;
|
ERESOURCE MupPrefixTableLock;
|
||||||
ERESOURCE MupCcbListLock;
|
ERESOURCE MupCcbListLock;
|
||||||
|
@ -53,9 +83,9 @@ NTSTATUS MupOrderedErrorList[] = { STATUS_UNSUCCESSFUL,
|
||||||
|
|
||||||
/* FUNCTIONS ****************************************************************/
|
/* FUNCTIONS ****************************************************************/
|
||||||
|
|
||||||
INIT_FUNCTION
|
INIT_SECTION
|
||||||
VOID
|
VOID
|
||||||
MupInitializeData()
|
MupInitializeData(VOID)
|
||||||
{
|
{
|
||||||
ExInitializeResourceLite(&MupGlobalLock);
|
ExInitializeResourceLite(&MupGlobalLock);
|
||||||
ExInitializeResourceLite(&MupPrefixTableLock);
|
ExInitializeResourceLite(&MupPrefixTableLock);
|
||||||
|
@ -79,7 +109,7 @@ MupUninitializeData()
|
||||||
ExDeleteResourceLite(&MupVcbLock);
|
ExDeleteResourceLite(&MupVcbLock);
|
||||||
}
|
}
|
||||||
|
|
||||||
INIT_FUNCTION
|
INIT_SECTION
|
||||||
VOID
|
VOID
|
||||||
MupInitializeVcb(PMUP_VCB Vcb)
|
MupInitializeVcb(PMUP_VCB Vcb)
|
||||||
{
|
{
|
||||||
|
@ -2522,7 +2552,7 @@ MupUnload(PDRIVER_OBJECT DriverObject)
|
||||||
MupUninitializeData();
|
MupUninitializeData();
|
||||||
}
|
}
|
||||||
|
|
||||||
INIT_FUNCTION
|
INIT_SECTION
|
||||||
NTSTATUS
|
NTSTATUS
|
||||||
DfsDriverEntry(PDRIVER_OBJECT DriverObject,
|
DfsDriverEntry(PDRIVER_OBJECT DriverObject,
|
||||||
PUNICODE_STRING RegistryPath)
|
PUNICODE_STRING RegistryPath)
|
||||||
|
@ -2541,7 +2571,7 @@ DfsDriverEntry(PDRIVER_OBJECT DriverObject,
|
||||||
* RegistryPath = path to our configuration entries
|
* RegistryPath = path to our configuration entries
|
||||||
* RETURNS: Success or failure
|
* RETURNS: Success or failure
|
||||||
*/
|
*/
|
||||||
INIT_FUNCTION
|
INIT_SECTION
|
||||||
NTSTATUS
|
NTSTATUS
|
||||||
NTAPI
|
NTAPI
|
||||||
DriverEntry(PDRIVER_OBJECT DriverObject,
|
DriverEntry(PDRIVER_OBJECT DriverObject,
|
||||||
|
|
|
@ -8,10 +8,8 @@
|
||||||
|
|
||||||
#ifdef __GNUC__
|
#ifdef __GNUC__
|
||||||
#define INIT_SECTION __attribute__((section ("INIT")))
|
#define INIT_SECTION __attribute__((section ("INIT")))
|
||||||
#define INIT_FUNCTION INIT_SECTION
|
|
||||||
#else
|
#else
|
||||||
#define INIT_SECTION /* Done via alloc_text for MSC */
|
#define INIT_SECTION /* Done via alloc_text for MSC */
|
||||||
#define INIT_FUNCTION INIT_SECTION
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define ROUND_UP(N, S) ((((N) + (S) - 1) / (S)) * (S))
|
#define ROUND_UP(N, S) ((((N) + (S) - 1) / (S)) * (S))
|
||||||
|
|
|
@ -31,6 +31,11 @@
|
||||||
#define NDEBUG
|
#define NDEBUG
|
||||||
#include <debug.h>
|
#include <debug.h>
|
||||||
|
|
||||||
|
#if defined(ALLOC_PRAGMA)
|
||||||
|
#pragma alloc_text(INIT, DriverEntry)
|
||||||
|
#pragma alloc_text(INIT, NtfsInitializeFunctionPointers)
|
||||||
|
#endif
|
||||||
|
|
||||||
/* GLOBALS *****************************************************************/
|
/* GLOBALS *****************************************************************/
|
||||||
|
|
||||||
PNTFS_GLOBAL_DATA NtfsGlobalData = NULL;
|
PNTFS_GLOBAL_DATA NtfsGlobalData = NULL;
|
||||||
|
@ -44,7 +49,7 @@ PNTFS_GLOBAL_DATA NtfsGlobalData = NULL;
|
||||||
* RegistryPath = path to our configuration entries
|
* RegistryPath = path to our configuration entries
|
||||||
* RETURNS: Success or failure
|
* RETURNS: Success or failure
|
||||||
*/
|
*/
|
||||||
INIT_FUNCTION
|
INIT_SECTION
|
||||||
NTSTATUS
|
NTSTATUS
|
||||||
NTAPI
|
NTAPI
|
||||||
DriverEntry(PDRIVER_OBJECT DriverObject,
|
DriverEntry(PDRIVER_OBJECT DriverObject,
|
||||||
|
@ -123,7 +128,7 @@ DriverEntry(PDRIVER_OBJECT DriverObject,
|
||||||
* DriverObject = object describing this driver
|
* DriverObject = object describing this driver
|
||||||
* RETURNS: Nothing
|
* RETURNS: Nothing
|
||||||
*/
|
*/
|
||||||
INIT_FUNCTION
|
INIT_SECTION
|
||||||
VOID
|
VOID
|
||||||
NTAPI
|
NTAPI
|
||||||
NtfsInitializeFunctionPointers(PDRIVER_OBJECT DriverObject)
|
NtfsInitializeFunctionPointers(PDRIVER_OBJECT DriverObject)
|
||||||
|
|
|
@ -6,10 +6,8 @@
|
||||||
|
|
||||||
#ifdef __GNUC__
|
#ifdef __GNUC__
|
||||||
#define INIT_SECTION __attribute__((section ("INIT")))
|
#define INIT_SECTION __attribute__((section ("INIT")))
|
||||||
#define INIT_FUNCTION INIT_SECTION
|
|
||||||
#else
|
#else
|
||||||
#define INIT_SECTION /* Done via alloc_text for MSC */
|
#define INIT_SECTION /* Done via alloc_text for MSC */
|
||||||
#define INIT_FUNCTION INIT_SECTION
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define CACHEPAGESIZE(pDeviceExt) \
|
#define CACHEPAGESIZE(pDeviceExt) \
|
||||||
|
|
Loading…
Reference in a new issue