mirror of
https://github.com/reactos/reactos.git
synced 2025-07-31 19:31:45 +00:00
[NTOS:KD] Use Zw* syscall variants
The log file can be (re-)initialized when previous mode is User-Mode, thus the calls fail on probing input parameters
This commit is contained in:
parent
a93e065ebc
commit
7caf9e9d48
1 changed files with 6 additions and 3 deletions
|
@ -253,7 +253,7 @@ KdpDebugLogInit(PKD_DISPATCH_TABLE DispatchTable,
|
|||
NULL);
|
||||
|
||||
/* Create the log file */
|
||||
Status = NtCreateFile(&KdpLogFileHandle,
|
||||
Status = ZwCreateFile(&KdpLogFileHandle,
|
||||
FILE_APPEND_DATA | SYNCHRONIZE,
|
||||
&ObjectAttributes,
|
||||
&Iosb,
|
||||
|
@ -268,7 +268,10 @@ KdpDebugLogInit(PKD_DISPATCH_TABLE DispatchTable,
|
|||
RtlFreeUnicodeString(&FileName);
|
||||
|
||||
if (!NT_SUCCESS(Status))
|
||||
{
|
||||
DPRINT1("Failed to open log file: 0x%08x\n", Status);
|
||||
return;
|
||||
}
|
||||
|
||||
KeInitializeEvent(&KdpLoggerThreadEvent, SynchronizationEvent, TRUE);
|
||||
|
||||
|
@ -282,12 +285,12 @@ KdpDebugLogInit(PKD_DISPATCH_TABLE DispatchTable,
|
|||
NULL);
|
||||
if (!NT_SUCCESS(Status))
|
||||
{
|
||||
NtClose(KdpLogFileHandle);
|
||||
ZwClose(KdpLogFileHandle);
|
||||
return;
|
||||
}
|
||||
|
||||
Priority = 7;
|
||||
NtSetInformationThread(ThreadHandle,
|
||||
ZwSetInformationThread(ThreadHandle,
|
||||
ThreadPriority,
|
||||
&Priority,
|
||||
sizeof(Priority));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue