NTOSKRNL.FSRtl MDL stubs added.

svn path=/trunk/; revision=1031
This commit is contained in:
Emanuele Aliberti 2000-03-05 19:17:43 +00:00
parent 9eac680002
commit 2634e901be
14 changed files with 549 additions and 15 deletions

View file

@ -1 +1,10 @@
#ifndef _NTOS_CCFUNCS_H
#define _NTOS_CCFUNCS_H
/* $Id: ccfuncs.h,v 1.4 2000/03/05 19:17:37 ea Exp $ */
VOID
STDCALL
CcMdlReadComplete (
IN PFILE_OBJECT FileObject,
IN PMDL MdlChain
);
#endif

View file

@ -1,6 +1,6 @@
#ifndef __INCLUDE_DDK_FSFUNCS_H
#define __INCLUDE_DDK_FSFUNCS_H
/* $Id: fsfuncs.h,v 1.7 2000/03/01 22:52:25 ea Exp $ */
/* $Id: fsfuncs.h,v 1.8 2000/03/05 19:17:37 ea Exp $ */
VOID
STDCALL
FsRtlAddLargeMcbEntry (
@ -313,6 +313,76 @@ FsRtlLookupMcbEntry (
DWORD Unknown3,
DWORD Unknown4
);
BOOLEAN
STDCALL
FsRtlMdlRead (
DWORD Unknown0,
DWORD Unknown1,
DWORD Unknown2,
DWORD Unknown3,
DWORD Unknown4,
DWORD Unknown5
);
BOOLEAN
STDCALL
FsRtlMdlReadComplete (
IN PFILE_OBJECT FileObject,
IN OUT PMDL Mdl
);
BOOLEAN
STDCALL
FsRtlMdlReadCompleteDev (
IN PFILE_OBJECT FileObject,
IN PMDL MdlChain,
IN PDEVICE_OBJECT DeviceObject
);
BOOLEAN
STDCALL
FsRtlMdlReadDev (
DWORD Unknown0,
DWORD Unknown1,
DWORD Unknown2,
DWORD Unknown3,
DWORD Unknown4,
DWORD Unknown5,
DWORD Unknown6
);
BOOLEAN
STDCALL
FsRtlMdlWriteComplete (
IN PFILE_OBJECT FileObject,
IN PLARGE_INTEGER FileOffset,
IN PMDL MdlChain
);
BOOLEAN
STDCALL
FsRtlMdlWriteCompleteDev (
IN PFILE_OBJECT FileObject,
IN PLARGE_INTEGER FileOffset,
IN PMDL MdlChain,
IN PDEVICE_OBJECT DeviceObject
);
BOOLEAN
STDCALL
FsRtlPrepareMdlWrite (
DWORD Unknown0,
DWORD Unknown1,
DWORD Unknown2,
DWORD Unknown3,
DWORD Unknown4,
DWORD Unknown5
);
BOOLEAN
STDCALL
FsRtlPrepareMdlWriteDev (
DWORD Unknown0,
DWORD Unknown1,
DWORD Unknown2,
DWORD Unknown3,
DWORD Unknown4,
DWORD Unknown5,
DWORD Unknown6
);
NTSTATUS
STDCALL
FsRtlNormalizeNtstatus (

View file

@ -1,4 +1,4 @@
/* $Id: iofuncs.h,v 1.5 1999/12/26 20:21:02 ea Exp $ */
/* $Id: iofuncs.h,v 1.6 2000/03/05 19:17:37 ea Exp $ */
/* IO MANAGER ***************************************************************/
BOOLEAN
@ -475,7 +475,11 @@ VOID
IoFreeMdl (
PMDL Mdl
);
PDEVICE_OBJECT
STDCALL
IoGetBaseFileSystemDeviceObject (
IN PFILE_OBJECT FileObject
);
PCONFIGURATION_INFORMATION
IoGetConfigurationInformation (VOID);
@ -524,6 +528,7 @@ IoGetNextIrpStackLocation (
);
PDEVICE_OBJECT
STDCALL
IoGetRelatedDeviceObject (
PFILE_OBJECT FileObject
);

View file

@ -1,4 +1,4 @@
/* $Id: iotypes.h,v 1.10 2000/02/26 09:58:06 ariadne Exp $
/* $Id: iotypes.h,v 1.11 2000/03/05 19:17:37 ea Exp $
*
*/
@ -393,6 +393,16 @@ typedef struct _DRIVER_EXTENSION
UNICODE_STRING ServiceKeyName;
} DRIVER_EXTENSION, *PDRIVER_EXTENSION;
#if 0
typedef
struct _FAST_IO_DISPATCH_TABLE
{
ULONG Count;
PFAST_IO_DISPATCH Dispatch;
} FAST_IO_DISPATCH_TABLE, * PFAST_IO_DISPATCH_TABLE;
#endif
typedef struct _DRIVER_OBJECT
{
CSHORT Type;
@ -405,7 +415,11 @@ typedef struct _DRIVER_OBJECT
PDRIVER_EXTENSION DriverExtension;
UNICODE_STRING DriverName;
PUNICODE_STRING HardwareDatabase;
#if 0
PFAST_IO_DISPATCH_TABLE FastIoDispatch;
#else
PFAST_IO_DISPATCH FastIoDispatch;
#endif
PDRIVER_INITIALIZE DriverInit;
PDRIVER_STARTIO DriverStartIo;
PDRIVER_UNLOAD DriverUnload;

View file

@ -0,0 +1,10 @@
#ifndef __INCLUDE_INTERNAL_CC_H
#define __INCLUDE_INTERNAL_CCS_H
/* $Id: cc.h,v 1.1 2000/03/05 19:17:39 ea Exp $ */
VOID
STDCALL
CcMdlReadCompleteDev (
IN PMDL MdlChain,
IN PDEVICE_OBJECT DeviceObject
);
#endif

View file

@ -1,4 +1,5 @@
/*
/* $Id: io.h,v 1.8 2000/03/05 19:17:39 ea Exp $
*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel
* FILE: include/internal/iomgr.h

View file

@ -1,4 +1,4 @@
/* $Id: view.c,v 1.7 2000/02/26 22:41:34 ea Exp $
/* $Id: view.c,v 1.8 2000/03/05 19:17:40 ea Exp $
*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel
@ -14,6 +14,7 @@
#include <ddk/ntddk.h>
#include <ddk/ntifs.h>
#include <internal/mm.h>
#include <internal/cc.h>
#define NDEBUG
#include <internal/debug.h>
@ -188,4 +189,63 @@ NTSTATUS STDCALL CcInitializeFileCache(PFILE_OBJECT FileObject,
}
/**********************************************************************
* NAME INTERNAL
* CcMdlReadCompleteDev@8
*
* DESCRIPTION
*
* ARGUMENTS
* MdlChain
* DeviceObject
*
* RETURN VALUE
* None.
*
* NOTE
* Used by CcMdlReadComplete@8 and FsRtl
*/
VOID
STDCALL
CcMdlReadCompleteDev (
IN PMDL MdlChain,
IN PDEVICE_OBJECT DeviceObject
)
{
UNIMPLEMENTED;
}
/**********************************************************************
* NAME EXPORTED
* CcMdlReadComplete@8
*
* DESCRIPTION
*
* ARGUMENTS
*
* RETURN VALUE
* None.
*
* NOTE
* From Bo Branten's ntifs.h v13.
*/
VOID
STDCALL
CcMdlReadComplete (
IN PFILE_OBJECT FileObject,
IN PMDL MdlChain
)
{
PDEVICE_OBJECT DeviceObject = NULL;
DeviceObject = IoGetRelatedDeviceObject (FileObject);
/* FIXME: try fast I/O first */
CcMdlReadCompleteDev (
MdlChain,
DeviceObject
);
}
/* EOF */

273
reactos/ntoskrnl/fs/mdl.c Normal file
View file

@ -0,0 +1,273 @@
/* $Id: mdl.c,v 1.1 2000/03/05 19:17:42 ea Exp $
*
* reactos/ntoskrnl/fs/mdl.c
*
*/
#include <ntos.h>
#include <internal/cc.h>
#include <ddk/ntifs.h>
/**********************************************************************
* NAME EXPORTED
* FsRtlMdlRead@24
*
* DESCRIPTION
*
* ARGUMENTS
*
* RETURN VALUE
*
*/
BOOLEAN
STDCALL
FsRtlMdlRead (
DWORD Unknown0,
DWORD Unknown1,
DWORD Unknown2,
DWORD Unknown3,
DWORD Unknown4,
DWORD Unknown5
)
{
return FALSE; /* FIXME: call FsRtlMdlReadDev ? */
}
/**********************************************************************
* NAME EXPORTED
* FsRtlMdlReadComplete@8
*
* DESCRIPTION
*
* ARGUMENTS
*
* RETURN VALUE
*
*/
BOOLEAN
STDCALL
FsRtlMdlReadComplete (
IN PFILE_OBJECT FileObject,
IN OUT PMDL Mdl
)
{
PDEVICE_OBJECT DeviceObject [2] = {NULL};
PDRIVER_OBJECT DriverObject = NULL;
/*
* Try fast I/O first
*/
DeviceObject [0] = IoGetRelatedDeviceObject (FileObject);
DriverObject = DeviceObject [0]->DriverObject;
if (NULL != DriverObject->FastIoDispatch)
{
#if 0
if (IRP_MJ_READ <= DriverObject->FastIoDispatch->Count)
{
return FALSE;
}
if (NULL == DriverObject->FastIoDispatch->Dispatch [IRP_MJ_READ])
{
return FALSE;
}
return DriverObject->FastIoDispatch->Dispatch
[IRP_MJ_READ] (
Mdl,
NULL /* FIXME: how to get the IRP? */
);
#endif
}
/*
* Default I/O path
*/
DeviceObject [1] = IoGetBaseFileSystemDeviceObject (FileObject);
/*
* Did IoGetBaseFileSystemDeviceObject ()
* returned the same device
* IoGetRelatedDeviceObject () returned?
*/
if (DeviceObject [1] != DeviceObject [0])
{
#if 0
DriverObject = DeviceObject [1]->DriverObject;
if (NULL != DriverObject->FastIoDispatch)
{
/*
* Check if the driver provides
* IRP_MJ_READ.
*/
if (IRP_MJ_READ <= DriverObject->FastIoDispatch->Count)
{
if (NULL == DriverObject->FastIoDispatch->Dispatch [IRP_MJ_READ])
{
return FALSE;
}
}
}
#endif
DeviceObject [0] = DeviceObject [1];
}
return FsRtlMdlReadCompleteDev (
FileObject,
Mdl,
DeviceObject [0]
);
}
/**********************************************************************
* NAME EXPORTED
* FsRtlMdlReadCompleteDev@12
*
* DESCRIPTION
*
* ARGUMENTS
*
* RETURN VALUE
*
* NOTE
* From Bo Branten's ntifs.h v13.
* (CcMdlReadCompleteDev declared in internal/cc.h)
*/
BOOLEAN
STDCALL
FsRtlMdlReadCompleteDev (
IN PFILE_OBJECT FileObject,
IN PMDL MdlChain,
IN PDEVICE_OBJECT DeviceObject
)
{
FileObject = FileObject; /* unused parameter */
CcMdlReadCompleteDev (MdlChain, DeviceObject);
return TRUE;
}
/**********************************************************************
* NAME EXPORTED
* FsRtlMdlReadDev@28
*
* DESCRIPTION
*
* ARGUMENTS
*
* RETURN VALUE
*
*/
BOOLEAN
STDCALL
FsRtlMdlReadDev (
DWORD Unknown0,
DWORD Unknown1,
DWORD Unknown2,
DWORD Unknown3,
DWORD Unknown4,
DWORD Unknown5,
DWORD Unknown6
)
{
return FALSE;
}
/**********************************************************************
* NAME EXPORTED
* FsRtlMdlWriteComplete@12
*
* DESCRIPTION
*
* ARGUMENTS
*
* RETURN VALUE
*
*/
BOOLEAN
STDCALL
FsRtlMdlWriteComplete (
IN PFILE_OBJECT FileObject,
IN PLARGE_INTEGER FileOffset,
IN PMDL MdlChain
)
{
return FALSE; /* FIXME: call FsRtlMdlWriteCompleteDev ? */
}
/**********************************************************************
* NAME EXPORTED
* FsRtlMdlWriteCompleteDev@16
*
* DESCRIPTION
*
* ARGUMENTS
*
* RETURN VALUE
*
*/
BOOLEAN
STDCALL
FsRtlMdlWriteCompleteDev (
IN PFILE_OBJECT FileObject,
IN PLARGE_INTEGER FileOffset,
IN PMDL MdlChain,
IN PDEVICE_OBJECT DeviceObject
)
{
return FALSE;
}
/**********************************************************************
* NAME EXPORTED
* FsRtlPrepareMdlWrite@24
*
* DESCRIPTION
*
* ARGUMENTS
*
* RETURN VALUE
*
*/
BOOLEAN
STDCALL
FsRtlPrepareMdlWrite (
DWORD Unknown0,
DWORD Unknown1,
DWORD Unknown2,
DWORD Unknown3,
DWORD Unknown4,
DWORD Unknown5
)
{
return FALSE; /* call FsRtlPrepareMdlWriteDev ? */
}
/**********************************************************************
* NAME EXPORTED
* FsRtlPrepareMdlWriteDev@28
*
* DESCRIPTION
*
* ARGUMENTS
*
* RETURN VALUE
*
*/
BOOLEAN
STDCALL
FsRtlPrepareMdlWriteDev (
DWORD Unknown0,
DWORD Unknown1,
DWORD Unknown2,
DWORD Unknown3,
DWORD Unknown4,
DWORD Unknown5,
DWORD Unknown6
)
{
return FALSE;
}
/* EOF */

View file

@ -1,4 +1,4 @@
/* $Id: device.c,v 1.14 2000/01/12 19:02:40 ekohl Exp $
/* $Id: device.c,v 1.15 2000/03/05 19:17:42 ea Exp $
*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel
@ -67,11 +67,16 @@ VOID IoDeleteDevice(PDEVICE_OBJECT DeviceObject)
}
PDEVICE_OBJECT IoGetRelatedDeviceObject(PFILE_OBJECT FileObject)
PDEVICE_OBJECT
STDCALL
IoGetRelatedDeviceObject (
IN PFILE_OBJECT FileObject
)
{
return(FileObject->DeviceObject);
return (FileObject->DeviceObject);
}
NTSTATUS IoGetDeviceObjectPointer(PUNICODE_STRING ObjectName,
ACCESS_MASK DesiredAccess,
PFILE_OBJECT* FileObject,

View file

@ -273,3 +273,64 @@ VOID IoUnregisterFileSystem(PDEVICE_OBJECT DeviceObject)
}
/**********************************************************************
* NAME EXPORTED
* IoGetBaseFileSystemDeviceObject@4
*
* DESCRIPTION
* Get the DEVICE_OBJECT associated to
* a FILE_OBJECT.
*
* ARGUMENTS
* FileObject
*
* RETURN VALUE
*
* NOTE
* From Bo Branten's ntifs.h v13.
*/
PDEVICE_OBJECT
STDCALL
IoGetBaseFileSystemDeviceObject (
IN PFILE_OBJECT FileObject
)
{
PDEVICE_OBJECT DeviceObject = NULL;
PVPB Vpb = NULL;
/*
* If the FILE_OBJECT's VPB is defined,
* get the device from it.
*/
if (NULL != (Vpb = FileObject->Vpb))
{
if (NULL != (DeviceObject = Vpb->DeviceObject))
{
/* Vpb->DeviceObject DEFINED! */
return DeviceObject;
}
}
/*
* If that failed, try the VPB
* in the FILE_OBJECT's DeviceObject.
*/
DeviceObject = FileObject->DeviceObject;
if (NULL == (Vpb = DeviceObject->Vpb))
{
/* DeviceObject->Vpb UNDEFINED! */
return DeviceObject;
}
/*
* If that pointer to the VPB is again
* undefined, return directly the
* device object from the FILE_OBJECT.
*/
return (
(NULL == Vpb->DeviceObject)
? DeviceObject
: Vpb->DeviceObject
);
}
/* EOF */

View file

@ -1,4 +1,5 @@
/*
/* $Id: mdl.c,v 1.4 2000/03/05 19:17:43 ea Exp $
*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel
* FILE: ntoskrnl/io/mdl.c
@ -66,3 +67,6 @@ VOID IoFreeMdl(PMDL Mdl)
MmUnlockPages(Mdl);
ExFreePool(Mdl);
}
/* EOF */

View file

@ -1,4 +1,4 @@
# $Id: makefile_rex,v 1.57 2000/03/04 13:41:56 ekohl Exp $
# $Id: makefile_rex,v 1.58 2000/03/05 19:17:39 ea Exp $
#
# ReactOS Operating System
#
@ -59,7 +59,7 @@ EX_OBJECTS = ex/work.o ex/fmutex.o ex/resource.o ex/time.o ex/interlck.o \
ex/stamp.o ex/init.o
FS_OBJECTS = fs/dbcsname.o fs/name.o fs/mcb.o fs/unc.o fs/util.o \
fs/filelock.o fs/pool.o
fs/filelock.o fs/pool.o fs/mdl.o
SE_OBJECTS = se/semgr.o se/acl.o se/sid.o se/sd.o se/token.o se/luid.o \
se/priv.o

View file

@ -1,4 +1,4 @@
; $Id: ntoskrnl.def,v 1.51 2000/03/04 22:00:21 ekohl Exp $
; $Id: ntoskrnl.def,v 1.52 2000/03/05 19:17:39 ea Exp $
;
; reactos/ntoskrnl/ntoskrnl.def
;
@ -7,6 +7,7 @@
EXPORTS
InitializeListHead
CcInitializeFileCache@8
CcMdlReadComplete@8
CcRequestCachePage@20
CcReleaseCachePage@12
CcReleaseFileCache@8
@ -120,11 +121,19 @@ FsRtlLookupLargeMcbEntry@32
FsRtlLookupLastLargeMcbEntry@12
FsRtlLookupLastMcbEntry@12
FsRtlLookupMcbEntry@20
FsRtlMdlRead@24
FsRtlMdlReadComplete@8
FsRtlMdlReadCompleteDev@12
FsRtlMdlReadDev@28
FsRtlMdlWriteComplete@12
FsRtlMdlWriteCompleteDev@16
FsRtlNormalizeNtstatus@8
FsRtlNumberOfRunsInLargeMcb@4
FsRtlNumberOfRunsInMcb@4
FsRtlPostPagingFileStackOverflow@12
FsRtlPostStackOverflow@12
FsRtlPrepareMdlWrite@24
FsRtlPrepareMdlWriteDev@28
FsRtlPrivateLock@48
FsRtlProcessFileLock@12
FsRtlRegisterUncProvider@12
@ -152,7 +161,9 @@ IoDeleteController
IoDeleteDevice
IoDisconnectInterrupt
IoFreeController
IoGetBaseFileSystemDeviceObject@4
IoGetCurrentIrpStackLocation
IoGetRelatedDeviceObject@4
IoInitializeDpcRequest
IoInitializeTimer
IoMarkIrpPending

View file

@ -1,4 +1,4 @@
; $Id: ntoskrnl.edf,v 1.38 2000/03/04 22:00:21 ekohl Exp $
; $Id: ntoskrnl.edf,v 1.39 2000/03/05 19:17:40 ea Exp $
;
; reactos/ntoskrnl/ntoskrnl.def
;
@ -7,6 +7,7 @@
EXPORTS
InitializeListHead
CcInitializeFileCache=CcInitializeFileCache@8
CcMdlReadComplete=CcMdlReadComplete@8
CcRequestCachePage=CcRequestCachePage@20
CcReleaseCachePage=CcReleaseCachePage@12
CcReleaseFileCache=CcReleaseFileCache@8
@ -120,11 +121,19 @@ FsRtlLookupLargeMcbEntry=FsRtlLookupLargeMcbEntry@32
FsRtlLookupLastLargeMcbEntry=FsRtlLookupLastLargeMcbEntry@12
FsRtlLookupLastMcbEntry=FsRtlLookupLastMcbEntry@12
FsRtlLookupMcbEntry=FsRtlLookupMcbEntry@20
FsRtlMdlRead=FsRtlMdlRead@24
FsRtlMdlReadComplete=FsRtlMdlReadComplete@8
FsRtlMdlReadCompleteDev=FsRtlMdlReadCompleteDev@12
FsRtlMdlReadDev=FsRtlMdlReadDev@28
FsRtlMdlWriteComplete=FsRtlMdlWriteComplete@12
FsRtlMdlWriteCompleteDev=FsRtlMdlWriteCompleteDev@16
FsRtlNormalizeNtstatus=FsRtlNormalizeNtstatus@8
FsRtlNumberOfRunsInLargeMcb=FsRtlNumberOfRunsInLargeMcb@4
FsRtlNumberOfRunsInMcb=FsRtlNumberOfRunsInMcb@4
FsRtlPostPagingFileStackOverflow=FsRtlPostPagingFileStackOverflow@12
FsRtlPostStackOverflow=FsRtlPostStackOverflow@12
FsRtlPrepareMdlWrite=FsRtlPrepareMdlWrite@24
FsRtlPrepareMdlWriteDev=FsRtlPrepareMdlWriteDev@28
FsRtlPrivateLock=FsRtlPrivateLock@48
FsRtlProcessFileLock=FsRtlProcessFileLock@12
FsRtlRegisterUncProvider=FsRtlRegisterUncProvider@12
@ -152,7 +161,9 @@ IoDeleteController
IoDeleteDevice
IoDisconnectInterrupt
IoFreeController
IoGetBaseFileSystemDeviceObject=IoGetBaseFileSystemDeviceObject@4
IoGetCurrentIrpStackLocation
IoGetRelatedDeviceObject=IoGetRelatedDeviceObject@4
IoInitializeDpcRequest
IoInitializeTimer
IoMarkIrpPending