Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Index: cache/section/io.c
- ===================================================================
- --- cache/section/io.c (revision 51800)
- +++ cache/section/io.c (working copy)
- @@ -99,6 +99,9 @@
- PLARGE_INTEGER FileOffset,
- PVOID Buffer,
- ULONG Length,
- +#ifdef __ROS_CMAKE__
- + BOOLEAN Paging,
- +#endif
- PIO_STATUS_BLOCK ReadStatus)
- {
- NTSTATUS Status;
- @@ -140,9 +143,13 @@
- {
- 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 @@
- 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)
- {
- Index: cache/section/newmm.h
- ===================================================================
- --- cache/section/newmm.h (revision 51800)
- +++ cache/section/newmm.h (working copy)
- @@ -181,6 +181,9 @@
- PLARGE_INTEGER FileOffset,
- PVOID Buffer,
- ULONG Length,
- +#ifdef __ROS_CMAKE__
- + BOOLEAN Paging,
- +#endif
- PIO_STATUS_BLOCK ReadStatus);
- NTSTATUS
- @@ -404,40 +407,6 @@
- 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);
Add Comment
Please, Sign In to add comment