Based on a patch by Herve Poussineau <poussine@freesurf.fr>:

- Clean up #includes.
- Get rid of ROSRTL dependancy.

svn path=/trunk/; revision=12960
This commit is contained in:
Filip Navara 2005-01-12 12:33:57 +00:00
parent 19c59e79f0
commit d8fda17a06
19 changed files with 15 additions and 111 deletions

View file

@ -10,11 +10,7 @@
/* INCLUDES *****************************************************************/
#include <ddk/ntddk.h>
#define NDEBUG
#include <debug.h>
#include "vfat.h"
/* FUNCTIONS ***************************************************************/

View file

@ -10,11 +10,7 @@
/* INCLUDES *****************************************************************/
#include <ddk/ntddk.h>
#define NDEBUG
#include <debug.h>
#include "vfat.h"
/* FUNCTIONS ****************************************************************/

View file

@ -10,11 +10,7 @@
/* INCLUDES *****************************************************************/
#include <ddk/ntddk.h>
#define NDEBUG
#include <debug.h>
#include "vfat.h"
/* FUNCTIONS ****************************************************************/

View file

@ -27,13 +27,7 @@
/* INCLUDES *****************************************************************/
#include <ddk/ntddk.h>
#include <wchar.h>
#include <limits.h>
#define NDEBUG
#include <debug.h>
#include "vfat.h"
/* FUNCTIONS *****************************************************************/

View file

@ -10,21 +10,16 @@
*/
#include <ddk/ntddk.h>
#include <wchar.h>
#define NDEBUG
#include <debug.h>
#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;

View file

@ -13,13 +13,7 @@
/* ------------------------------------------------------- INCLUDES */
#include <ddk/ntddk.h>
#include <wchar.h>
#include <limits.h>
#define NDEBUG
#include <debug.h>
#include "vfat.h"
ULONG

View file

@ -9,14 +9,7 @@
/* INCLUDES *****************************************************************/
#include <ddk/ntddk.h>
#include <ctype.h>
#include <wchar.h>
#include <string.h>
#define NDEBUG
#include <debug.h>
#include "vfat.h"
NTSTATUS

View file

@ -27,13 +27,7 @@
/* INCLUDES *****************************************************************/
#include <ddk/ntddk.h>
#include <wchar.h>
#include <limits.h>
#define NDEBUG
#include <debug.h>
#include "vfat.h"
/* FUNCTIONS *****************************************************************/

View file

@ -12,13 +12,7 @@
/* INCLUDES *****************************************************************/
#include <ddk/ntddk.h>
#include <wchar.h>
#include <ntos/minmax.h>
#define NDEBUG
#include <debug.h>
#include "vfat.h"
/* GLOBALS ******************************************************************/

View file

@ -13,14 +13,9 @@
/* ------------------------------------------------------- INCLUDES */
#include <ddk/ntddk.h>
#include <wchar.h>
#include <limits.h>
#include <rosrtl/string.h>
#include <wctype.h> /* towlower prototype */
#define NDEBUG
#include <debug.h>
#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))
{

View file

@ -12,12 +12,7 @@
/* INCLUDES *****************************************************************/
#include <ddk/ntddk.h>
#include <wchar.h>
#define NDEBUG
#include <debug.h>
#include "vfat.h"
/* FUNCTIONS ****************************************************************/

View file

@ -9,11 +9,8 @@
/* INCLUDES *****************************************************************/
#include <ddk/ntddk.h>
#include "vfat.h"
#define NDEBUG
#include <debug.h>
#include "vfat.h"
/* FUNCTIONS ****************************************************************/

View file

@ -26,13 +26,7 @@
/* INCLUDES *****************************************************************/
#include <ddk/ntddk.h>
#include <rosrtl/string.h>
#include <wchar.h>
#define NDEBUG
#include <debug.h>
#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;

View file

@ -27,12 +27,7 @@
/* INCLUDES *****************************************************************/
#include <ddk/ntddk.h>
#include <rosrtl/string.h>
#define NDEBUG
#include <debug.h>
#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,

View file

@ -10,12 +10,7 @@
/* INCLUDES *****************************************************************/
#include <ddk/ntddk.h>
#include <wchar.h>
#define NDEBUG
#include <debug.h>
#include "vfat.h"
/* FUNCTIONS ****************************************************************/

View file

@ -9,11 +9,7 @@
/* INCLUDES *****************************************************************/
#include <ddk/ntddk.h>
#define NDEBUG
#include <debug.h>
#include "vfat.h"
/* FUNCTIONS ****************************************************************/

View file

@ -11,12 +11,7 @@
/* INCLUDES *****************************************************************/
#include <ddk/ntddk.h>
#include <wchar.h>
#define NDEBUG
#include <debug.h>
#include "vfat.h"
/* FUNCTIONS ****************************************************************/

View file

@ -2,7 +2,8 @@
#include <ddk/ntifs.h>
#include <ddk/ntdddisk.h>
#undef DeleteFile /* FIXME */
#include <limits.h>
#include <debug.h>
#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

View file

@ -11,12 +11,7 @@
/* INCLUDES *****************************************************************/
#include <ddk/ntddk.h>
#include <wchar.h>
#define NDEBUG
#include <debug.h>
#include "vfat.h"
/* FUNCTIONS ****************************************************************/