daily pastebin goal
16%
SHARE
TWEET

Untitled

a guest Dec 7th, 2017 53 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. Index: cache/section/io.c
  2. ===================================================================
  3. --- cache/section/io.c  (revision 51800)
  4. +++ cache/section/io.c  (working copy)
  5. @@ -99,6 +99,9 @@
  6.   PLARGE_INTEGER FileOffset,
  7.   PVOID Buffer,
  8.   ULONG Length,
  9. +#ifdef __ROS_CMAKE__
  10. + BOOLEAN Paging,
  11. +#endif
  12.   PIO_STATUS_BLOCK ReadStatus)
  13.  {
  14.      NTSTATUS Status;
  15. @@ -140,9 +143,13 @@
  16.      {
  17.         return STATUS_NO_MEMORY;
  18.      }
  19. -    
  20. +
  21. +#ifndef __ROS_CMAKE__
  22.      Irp->Flags |= IRP_PAGING_IO | IRP_SYNCHRONOUS_PAGING_IO | IRP_NOCACHE | IRP_SYNCHRONOUS_API;
  23. -    
  24. +#else
  25. +    Irp->Flags |= (Paging ? IRP_PAGING_IO | IRP_SYNCHRONOUS_PAGING_IO | IRP_NOCACHE : 0) | IRP_SYNCHRONOUS_API;
  26. +#endif
  27. +
  28.      Irp->UserEvent = &ReadWait;
  29.      Irp->Tail.Overlay.OriginalFileObject = FileObject;
  30.      Irp->Tail.Overlay.Thread = PsGetCurrentThread();
  31. @@ -150,7 +157,11 @@
  32.     IrpSp->Control |= SL_INVOKE_ON_SUCCESS | SL_INVOKE_ON_ERROR;
  33.      IrpSp->FileObject = FileObject;
  34.      IrpSp->CompletionRoutine = MiSimpleReadComplete;
  35. -    
  36. +
  37. +#ifdef __ROS_CMAKE__
  38. +    ObReferenceObject(FileObject);
  39. +#endif
  40. +
  41.      Status = IoCallDriver(DeviceObject, Irp);
  42.      if (Status == STATUS_PENDING)
  43.      {
  44. Index: cache/section/newmm.h
  45. ===================================================================
  46. --- cache/section/newmm.h   (revision 51800)
  47. +++ cache/section/newmm.h   (working copy)
  48. @@ -181,6 +181,9 @@
  49.   PLARGE_INTEGER FileOffset,
  50.   PVOID Buffer,
  51.   ULONG Length,
  52. +#ifdef __ROS_CMAKE__
  53. + BOOLEAN Paging,
  54. +#endif
  55.   PIO_STATUS_BLOCK ReadStatus);
  56.  
  57.  NTSTATUS
  58. @@ -404,40 +407,6 @@
  59.   ULONG AllocationAttributes,
  60.   PFILE_OBJECT FileObject);
  61.  
  62. -NTSTATUS
  63. -NTAPI
  64. -MiSimpleRead
  65. -(PFILE_OBJECT FileObject,
  66. - PLARGE_INTEGER FileOffset,
  67. - PVOID Buffer,
  68. - ULONG Length,
  69. - PIO_STATUS_BLOCK ReadStatus);
  70. -
  71. -NTSTATUS
  72. -NTAPI
  73. -_MiSimpleWrite
  74. -(PFILE_OBJECT FileObject,
  75. - PLARGE_INTEGER FileOffset,
  76. - PVOID Buffer,
  77. - ULONG Length,
  78. - PIO_STATUS_BLOCK ReadStatus,
  79. - const char *file,
  80. - int line);
  81. -
  82. -#define MiSimpleWrite(F,O,B,L,R) _MiSimpleWrite(F,O,B,L,R,__FILE__,__LINE__)
  83. -
  84. -NTSTATUS
  85. -NTAPI
  86. -_MiWriteBackPage
  87. -(PFILE_OBJECT FileObject,
  88. - PLARGE_INTEGER Offset,
  89. - ULONG Length,
  90. - PFN_NUMBER Page,
  91. - const char *File,
  92. - int Line);
  93. -
  94. -#define MiWriteBackPage(F,O,L,P) _MiWriteBackPage(F,O,L,P,__FILE__,__LINE__)
  95. -
  96.  PVOID
  97.  NTAPI
  98.  MmGetSegmentRmap(PFN_NUMBER Page, PULONG RawOffset);
RAW Paste Data
Top