* Fix cmake build. Now both rbuild and cmaked based builds compile and boot to shell.

svn path=/trunk/; revision=51836
This commit is contained in:
Amine Khaldi 2011-05-21 09:38:52 +00:00
parent 67b57d645d
commit db0a15cd8a
2 changed files with 17 additions and 37 deletions

View file

@ -99,6 +99,9 @@ MiSimpleRead
PLARGE_INTEGER FileOffset,
PVOID Buffer,
ULONG Length,
#ifdef __ROS_CMAKE__
BOOLEAN Paging,
#endif
PIO_STATUS_BLOCK ReadStatus)
{
NTSTATUS Status;
@ -140,9 +143,13 @@ MiSimpleRead
{
return STATUS_NO_MEMORY;
}
#ifndef __ROS_CMAKE__
Irp->Flags |= IRP_PAGING_IO | IRP_SYNCHRONOUS_PAGING_IO | IRP_NOCACHE | IRP_SYNCHRONOUS_API;
#else
Irp->Flags |= (Paging ? IRP_PAGING_IO | IRP_SYNCHRONOUS_PAGING_IO | IRP_NOCACHE : 0) | IRP_SYNCHRONOUS_API;
#endif
Irp->UserEvent = &ReadWait;
Irp->Tail.Overlay.OriginalFileObject = FileObject;
Irp->Tail.Overlay.Thread = PsGetCurrentThread();
@ -150,7 +157,11 @@ MiSimpleRead
IrpSp->Control |= SL_INVOKE_ON_SUCCESS | SL_INVOKE_ON_ERROR;
IrpSp->FileObject = FileObject;
IrpSp->CompletionRoutine = MiSimpleReadComplete;
#ifdef __ROS_CMAKE__
ObReferenceObject(FileObject);
#endif
Status = IoCallDriver(DeviceObject, Irp);
if (Status == STATUS_PENDING)
{

View file

@ -181,6 +181,9 @@ MiSimpleRead
PLARGE_INTEGER FileOffset,
PVOID Buffer,
ULONG Length,
#ifdef __ROS_CMAKE__
BOOLEAN Paging,
#endif
PIO_STATUS_BLOCK ReadStatus);
NTSTATUS
@ -404,40 +407,6 @@ MmCreateCacheSection
ULONG AllocationAttributes,
PFILE_OBJECT FileObject);
NTSTATUS
NTAPI
MiSimpleRead
(PFILE_OBJECT FileObject,
PLARGE_INTEGER FileOffset,
PVOID Buffer,
ULONG Length,
PIO_STATUS_BLOCK ReadStatus);
NTSTATUS
NTAPI
_MiSimpleWrite
(PFILE_OBJECT FileObject,
PLARGE_INTEGER FileOffset,
PVOID Buffer,
ULONG Length,
PIO_STATUS_BLOCK ReadStatus,
const char *file,
int line);
#define MiSimpleWrite(F,O,B,L,R) _MiSimpleWrite(F,O,B,L,R,__FILE__,__LINE__)
NTSTATUS
NTAPI
_MiWriteBackPage
(PFILE_OBJECT FileObject,
PLARGE_INTEGER Offset,
ULONG Length,
PFN_NUMBER Page,
const char *File,
int Line);
#define MiWriteBackPage(F,O,L,P) _MiWriteBackPage(F,O,L,P,__FILE__,__LINE__)
PVOID
NTAPI
MmGetSegmentRmap(PFN_NUMBER Page, PULONG RawOffset);