https://git.reactos.org/?p=reactos.git;a=commitdiff;h=108991a6fbae487218812…
commit 108991a6fbae487218812350b1a984887dab084f
Author: Pierre Schweitzer <pierre(a)reactos.org>
AuthorDate: Tue Sep 18 21:42:01 2018 +0200
Commit: Pierre Schweitzer <pierre(a)reactos.org>
CommitDate: Tue Sep 18 21:59:59 2018 +0200
[NTOSKRNL] Stub IoInitializeCrashDump()
Also call it from NtCreatePagingFile() when we have successfully created
a paging file on the system boot partition.
---
ntoskrnl/include/internal/io.h | 6 ++++++
ntoskrnl/io/iomgr/iomgr.c | 8 ++++++++
ntoskrnl/mm/pagefile.c | 7 +++++++
3 files changed, 21 insertions(+)
diff --git a/ntoskrnl/include/internal/io.h b/ntoskrnl/include/internal/io.h
index f47768d4a1..83fe7ce3c7 100644
--- a/ntoskrnl/include/internal/io.h
+++ b/ntoskrnl/include/internal/io.h
@@ -797,6 +797,12 @@ IopVerifyDiskSignature(
OUT PULONG Signature
);
+BOOLEAN
+NTAPI
+IoInitializeCrashDump(
+ IN HANDLE PageFileHandle
+);
+
//
// Device/Volume Routines
//
diff --git a/ntoskrnl/io/iomgr/iomgr.c b/ntoskrnl/io/iomgr/iomgr.c
index 47defcab70..292c947036 100644
--- a/ntoskrnl/io/iomgr/iomgr.c
+++ b/ntoskrnl/io/iomgr/iomgr.c
@@ -651,4 +651,12 @@ IoInitSystem(IN PLOADER_PARAMETER_BLOCK LoaderBlock)
return TRUE;
}
+BOOLEAN
+NTAPI
+IoInitializeCrashDump(IN HANDLE PageFileHandle)
+{
+ UNIMPLEMENTED;
+ return FALSE;
+}
+
/* EOF */
diff --git a/ntoskrnl/mm/pagefile.c b/ntoskrnl/mm/pagefile.c
index 0649f0f2c2..d05580bfbd 100644
--- a/ntoskrnl/mm/pagefile.c
+++ b/ntoskrnl/mm/pagefile.c
@@ -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;
}