Author: akhaldi
Date: Sat May 21 09:38:52 2011
New Revision: 51836

URL: http://svn.reactos.org/svn/reactos?rev=51836&view=rev
Log:
[CMAKE]
* Fix cmake build. Now both rbuild and cmaked based builds compile and boot to 
shell.

Modified:
    trunk/reactos/ntoskrnl/cache/section/io.c
    trunk/reactos/ntoskrnl/cache/section/newmm.h

Modified: trunk/reactos/ntoskrnl/cache/section/io.c
URL: 
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/cache/section/io.c?rev=51836&r1=51835&r2=51836&view=diff
==============================================================================
--- trunk/reactos/ntoskrnl/cache/section/io.c [iso-8859-1] (original)
+++ trunk/reactos/ntoskrnl/cache/section/io.c [iso-8859-1] Sat May 21 09:38:52 
2011
@@ -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)
     {

Modified: trunk/reactos/ntoskrnl/cache/section/newmm.h
URL: 
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/cache/section/newmm.h?rev=51836&r1=51835&r2=51836&view=diff
==============================================================================
--- trunk/reactos/ntoskrnl/cache/section/newmm.h [iso-8859-1] (original)
+++ trunk/reactos/ntoskrnl/cache/section/newmm.h [iso-8859-1] Sat May 21 
09:38:52 2011
@@ -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);


Reply via email to