diff --git a/reactos/drivers/fs/vfat/blockdev.c b/reactos/drivers/fs/vfat/blockdev.c index 0a2c68c12df..a653fe89567 100644 --- a/reactos/drivers/fs/vfat/blockdev.c +++ b/reactos/drivers/fs/vfat/blockdev.c @@ -10,11 +10,7 @@ /* INCLUDES *****************************************************************/ -#include - #define NDEBUG -#include - #include "vfat.h" /* FUNCTIONS ***************************************************************/ diff --git a/reactos/drivers/fs/vfat/cleanup.c b/reactos/drivers/fs/vfat/cleanup.c index d75c24cc16f..372fce4d872 100644 --- a/reactos/drivers/fs/vfat/cleanup.c +++ b/reactos/drivers/fs/vfat/cleanup.c @@ -10,11 +10,7 @@ /* INCLUDES *****************************************************************/ -#include - #define NDEBUG -#include - #include "vfat.h" /* FUNCTIONS ****************************************************************/ diff --git a/reactos/drivers/fs/vfat/close.c b/reactos/drivers/fs/vfat/close.c index b22206fc612..a3ae43f68c3 100644 --- a/reactos/drivers/fs/vfat/close.c +++ b/reactos/drivers/fs/vfat/close.c @@ -10,11 +10,7 @@ /* INCLUDES *****************************************************************/ -#include - #define NDEBUG -#include - #include "vfat.h" /* FUNCTIONS ****************************************************************/ diff --git a/reactos/drivers/fs/vfat/create.c b/reactos/drivers/fs/vfat/create.c index 604ec0ddda4..4d07cbe9f26 100644 --- a/reactos/drivers/fs/vfat/create.c +++ b/reactos/drivers/fs/vfat/create.c @@ -27,13 +27,7 @@ /* INCLUDES *****************************************************************/ -#include -#include -#include - #define NDEBUG -#include - #include "vfat.h" /* FUNCTIONS *****************************************************************/ diff --git a/reactos/drivers/fs/vfat/dir.c b/reactos/drivers/fs/vfat/dir.c index 9e0c9c20b90..12a2dbd4ad0 100644 --- a/reactos/drivers/fs/vfat/dir.c +++ b/reactos/drivers/fs/vfat/dir.c @@ -10,21 +10,16 @@ */ -#include -#include - #define NDEBUG -#include - #include "vfat.h" // function like DosDateTimeToFileTime BOOLEAN -FsdDosDateTimeToSystemTime (PDEVICE_EXTENSION DeviceExt, USHORT wDosDate, WORD wDosTime, PLARGE_INTEGER SystemTime) +FsdDosDateTimeToSystemTime (PDEVICE_EXTENSION DeviceExt, USHORT DosDate, USHORT DosTime, PLARGE_INTEGER SystemTime) { - PDOSTIME pdtime = (PDOSTIME) & wDosTime; - PDOSDATE pddate = (PDOSDATE) & wDosDate; + PDOSTIME pdtime = (PDOSTIME) &DosTime; + PDOSDATE pddate = (PDOSDATE) &DosDate; TIME_FIELDS TimeFields; LARGE_INTEGER LocalTime; diff --git a/reactos/drivers/fs/vfat/direntry.c b/reactos/drivers/fs/vfat/direntry.c index d6b12e61aac..46b4790ad7d 100644 --- a/reactos/drivers/fs/vfat/direntry.c +++ b/reactos/drivers/fs/vfat/direntry.c @@ -13,13 +13,7 @@ /* ------------------------------------------------------- INCLUDES */ -#include -#include -#include - #define NDEBUG -#include - #include "vfat.h" ULONG diff --git a/reactos/drivers/fs/vfat/dirwr.c b/reactos/drivers/fs/vfat/dirwr.c index 82c03528e43..d5e9855fe7e 100644 --- a/reactos/drivers/fs/vfat/dirwr.c +++ b/reactos/drivers/fs/vfat/dirwr.c @@ -9,14 +9,7 @@ /* INCLUDES *****************************************************************/ -#include -#include -#include -#include - #define NDEBUG -#include - #include "vfat.h" NTSTATUS diff --git a/reactos/drivers/fs/vfat/ea.c b/reactos/drivers/fs/vfat/ea.c index 93058681071..e597d4b27f4 100644 --- a/reactos/drivers/fs/vfat/ea.c +++ b/reactos/drivers/fs/vfat/ea.c @@ -27,13 +27,7 @@ /* INCLUDES *****************************************************************/ -#include -#include -#include - #define NDEBUG -#include - #include "vfat.h" /* FUNCTIONS *****************************************************************/ diff --git a/reactos/drivers/fs/vfat/fat.c b/reactos/drivers/fs/vfat/fat.c index 3ed65ea7e63..27ebe3f1d3a 100644 --- a/reactos/drivers/fs/vfat/fat.c +++ b/reactos/drivers/fs/vfat/fat.c @@ -12,13 +12,7 @@ /* INCLUDES *****************************************************************/ -#include -#include -#include - #define NDEBUG -#include - #include "vfat.h" /* GLOBALS ******************************************************************/ diff --git a/reactos/drivers/fs/vfat/fcb.c b/reactos/drivers/fs/vfat/fcb.c index 3d50cf969b7..dc13f02a97b 100644 --- a/reactos/drivers/fs/vfat/fcb.c +++ b/reactos/drivers/fs/vfat/fcb.c @@ -13,14 +13,9 @@ /* ------------------------------------------------------- INCLUDES */ -#include -#include -#include -#include +#include /* towlower prototype */ #define NDEBUG -#include - #include "vfat.h" /* -------------------------------------------------------- DEFINES */ @@ -372,9 +367,7 @@ vfatMakeRootFCB(PDEVICE_EXTENSION pVCB) PVFATFCB FCB; ULONG FirstCluster, CurrentCluster, Size = 0; NTSTATUS Status = STATUS_SUCCESS; - UNICODE_STRING NameU; - - RtlRosInitUnicodeStringFromLiteral(&NameU, L"\\"); + UNICODE_STRING NameU = RTL_CONSTANT_STRING(L"\\"); FCB = vfatNewFCB(pVCB, &NameU); if (FCB->Flags & FCB_IS_FATX_ENTRY) @@ -425,9 +418,7 @@ PVFATFCB vfatOpenRootFCB(PDEVICE_EXTENSION pVCB) { PVFATFCB FCB; - UNICODE_STRING NameU; - - RtlRosInitUnicodeStringFromLiteral(&NameU, L"\\"); + UNICODE_STRING NameU = RTL_CONSTANT_STRING(L"\\"); FCB = vfatGrabFCBFromTable (pVCB, &NameU); if (FCB == NULL) @@ -654,7 +645,7 @@ vfatGetFCBForFile (PDEVICE_EXTENSION pVCB, PVFATFCB FCB = NULL; PVFATFCB parentFCB; UNICODE_STRING NameU; - UNICODE_STRING RootNameU; + UNICODE_STRING RootNameU = RTL_CONSTANT_STRING(L"\\"); PWCHAR curr, prev, last; ULONG Length; @@ -668,8 +659,6 @@ vfatGetFCBForFile (PDEVICE_EXTENSION pVCB, if (parentFCB == NULL) { - RtlRosInitUnicodeStringFromLiteral(&RootNameU, L"\\"); - // Trivial case, open of the root directory on volume if (RtlEqualUnicodeString(pFileNameU, &RootNameU, FALSE)) { diff --git a/reactos/drivers/fs/vfat/finfo.c b/reactos/drivers/fs/vfat/finfo.c index 4aabf0a8783..f81640de34b 100644 --- a/reactos/drivers/fs/vfat/finfo.c +++ b/reactos/drivers/fs/vfat/finfo.c @@ -12,12 +12,7 @@ /* INCLUDES *****************************************************************/ -#include -#include - #define NDEBUG -#include - #include "vfat.h" /* FUNCTIONS ****************************************************************/ diff --git a/reactos/drivers/fs/vfat/flush.c b/reactos/drivers/fs/vfat/flush.c index f128dfdcf21..9326a224c6e 100644 --- a/reactos/drivers/fs/vfat/flush.c +++ b/reactos/drivers/fs/vfat/flush.c @@ -9,11 +9,8 @@ /* INCLUDES *****************************************************************/ -#include -#include "vfat.h" - #define NDEBUG -#include +#include "vfat.h" /* FUNCTIONS ****************************************************************/ diff --git a/reactos/drivers/fs/vfat/fsctl.c b/reactos/drivers/fs/vfat/fsctl.c index 0d337fbdaf0..fdc985e7f00 100644 --- a/reactos/drivers/fs/vfat/fsctl.c +++ b/reactos/drivers/fs/vfat/fsctl.c @@ -26,13 +26,7 @@ /* INCLUDES *****************************************************************/ -#include -#include -#include - #define NDEBUG -#include - #include "vfat.h" /* FUNCTIONS ****************************************************************/ @@ -385,7 +379,8 @@ VfatMount (PVFAT_IRP_CONTEXT IrpContext) PVFATFCB VolumeFcb = NULL; PVFATCCB Ccb = NULL; PDEVICE_OBJECT DeviceToMount; - UNICODE_STRING NameU; + UNICODE_STRING NameU = RTL_CONSTANT_STRING(L"\\$$Fat$$"); + UNICODE_STRING VolumeNameU = RTL_CONSTANT_STRING(L"\\$$Volume$$"); DPRINT("VfatMount(IrpContext %x)\n", IrpContext); @@ -495,7 +490,6 @@ VfatMount (PVFAT_IRP_CONTEXT IrpContext) DPRINT("FsDeviceObject %lx\n", DeviceObject); DeviceExt->FATFileObject = IoCreateStreamFileObject(NULL, DeviceExt->StorageDevice); - RtlRosInitUnicodeStringFromLiteral(&NameU, L"\\$$Fat$$"); Fcb = vfatNewFCB(DeviceExt, &NameU); if (Fcb == NULL) { @@ -541,9 +535,8 @@ VfatMount (PVFAT_IRP_CONTEXT IrpContext) ExInitializeResourceLite(&DeviceExt->FatResource); InitializeListHead(&DeviceExt->FcbListHead); - RtlRosInitUnicodeStringFromLiteral(&NameU, L"\\$$Volume$$"); - VolumeFcb = vfatNewFCB(DeviceExt, &NameU); + VolumeFcb = vfatNewFCB(DeviceExt, &VolumeNameU); if (VolumeFcb == NULL) { Status = STATUS_INSUFFICIENT_RESOURCES; diff --git a/reactos/drivers/fs/vfat/iface.c b/reactos/drivers/fs/vfat/iface.c index 124c645b241..ea0e1cfab22 100644 --- a/reactos/drivers/fs/vfat/iface.c +++ b/reactos/drivers/fs/vfat/iface.c @@ -27,12 +27,7 @@ /* INCLUDES *****************************************************************/ -#include -#include - #define NDEBUG -#include - #include "vfat.h" /* GLOBALS *****************************************************************/ @@ -53,7 +48,7 @@ DriverEntry(PDRIVER_OBJECT DriverObject, */ { PDEVICE_OBJECT DeviceObject; - UNICODE_STRING DeviceName = ROS_STRING_INITIALIZER(L"\\Fat"); + UNICODE_STRING DeviceName = RTL_CONSTANT_STRING(L"\\Fat"); NTSTATUS Status; Status = IoCreateDevice(DriverObject, diff --git a/reactos/drivers/fs/vfat/misc.c b/reactos/drivers/fs/vfat/misc.c index 7d464465f95..86be9b53659 100644 --- a/reactos/drivers/fs/vfat/misc.c +++ b/reactos/drivers/fs/vfat/misc.c @@ -10,12 +10,7 @@ /* INCLUDES *****************************************************************/ -#include -#include - #define NDEBUG -#include - #include "vfat.h" /* FUNCTIONS ****************************************************************/ diff --git a/reactos/drivers/fs/vfat/shutdown.c b/reactos/drivers/fs/vfat/shutdown.c index 28330e4547c..37e95be3da4 100644 --- a/reactos/drivers/fs/vfat/shutdown.c +++ b/reactos/drivers/fs/vfat/shutdown.c @@ -9,11 +9,7 @@ /* INCLUDES *****************************************************************/ -#include - #define NDEBUG -#include - #include "vfat.h" /* FUNCTIONS ****************************************************************/ diff --git a/reactos/drivers/fs/vfat/string.c b/reactos/drivers/fs/vfat/string.c index 4df78172c9d..2d5e485c42c 100644 --- a/reactos/drivers/fs/vfat/string.c +++ b/reactos/drivers/fs/vfat/string.c @@ -11,12 +11,7 @@ /* INCLUDES *****************************************************************/ -#include -#include - #define NDEBUG -#include - #include "vfat.h" /* FUNCTIONS ****************************************************************/ diff --git a/reactos/drivers/fs/vfat/vfat.h b/reactos/drivers/fs/vfat/vfat.h index 42bcb6295f5..1ba1edc604f 100644 --- a/reactos/drivers/fs/vfat/vfat.h +++ b/reactos/drivers/fs/vfat/vfat.h @@ -2,7 +2,8 @@ #include #include -#undef DeleteFile /* FIXME */ +#include +#include #define USE_ROS_CC_AND_FS @@ -11,6 +12,7 @@ NTSTATUS NTAPI RtlOemStringToUnicodeString(PUNICODE_STRING, CONST STRING *, BOOLEAN); NTSTATUS NTAPI RtlDowncaseUnicodeString(PUNICODE_STRING, PCUNICODE_STRING, BOOLEAN); NTSTATUS NTAPI RtlUnicodeStringToOemString(POEM_STRING, PCUNICODE_STRING, BOOLEAN); +#undef DeleteFile /* FIXME */ #endif #ifdef USE_ROS_CC_AND_FS diff --git a/reactos/drivers/fs/vfat/volume.c b/reactos/drivers/fs/vfat/volume.c index a2521002eb1..3ed1ad22c63 100644 --- a/reactos/drivers/fs/vfat/volume.c +++ b/reactos/drivers/fs/vfat/volume.c @@ -11,12 +11,7 @@ /* INCLUDES *****************************************************************/ -#include -#include - #define NDEBUG -#include - #include "vfat.h" /* FUNCTIONS ****************************************************************/