[NTOSKRNL] Stub IoInitializeCrashDump()
authorPierre Schweitzer <pierre@reactos.org>
Tue, 18 Sep 2018 19:42:01 +0000 (21:42 +0200)
committerPierre Schweitzer <pierre@reactos.org>
Tue, 18 Sep 2018 19:59:59 +0000 (21:59 +0200)
Also call it from NtCreatePagingFile() when we have successfully created
a paging file on the system boot partition.

ntoskrnl/include/internal/io.h
ntoskrnl/io/iomgr/iomgr.c
ntoskrnl/mm/pagefile.c

index f47768d..83fe7ce 100644 (file)
@@ -797,6 +797,12 @@ IopVerifyDiskSignature(
     OUT PULONG Signature
 );
 
+BOOLEAN
+NTAPI
+IoInitializeCrashDump(
+    IN HANDLE PageFileHandle
+);
+
 //
 // Device/Volume Routines
 //
index 47defca..292c947 100644 (file)
@@ -651,4 +651,12 @@ IoInitSystem(IN PLOADER_PARAMETER_BLOCK LoaderBlock)
     return TRUE;
 }
 
+BOOLEAN
+NTAPI
+IoInitializeCrashDump(IN HANDLE PageFileHandle)
+{
+    UNIMPLEMENTED;
+    return FALSE;
+}
+
 /* EOF */
index 0649f0f..d05580b 100644 (file)
@@ -89,6 +89,8 @@ C_ASSERT(FILE_FROM_ENTRY(0xffffffff) < MAX_PAGING_FILES);
 
 static BOOLEAN MmSwapSpaceMessage = FALSE;
 
+static BOOLEAN MmSystemPageFileLocated = FALSE;
+
 /* FUNCTIONS *****************************************************************/
 
 VOID
@@ -804,6 +806,11 @@ NtCreatePagingFile(IN PUNICODE_STRING FileName,
 
     MmSwapSpaceMessage = FALSE;
 
+    if (!MmSystemPageFileLocated && BooleanFlagOn(FileObject->DeviceObject->Flags, DO_SYSTEM_BOOT_PARTITION))
+    {
+        MmSystemPageFileLocated = IoInitializeCrashDump(FileHandle);
+    }
+
     return STATUS_SUCCESS;
 }