mirror of
https://github.com/reactos/reactos.git
synced 2025-08-05 17:42:58 +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);
|
NULL);
|
||||||
|
|
||||||
/* Create the log file */
|
/* Create the log file */
|
||||||
Status = NtCreateFile(&KdpLogFileHandle,
|
Status = ZwCreateFile(&KdpLogFileHandle,
|
||||||
FILE_APPEND_DATA | SYNCHRONIZE,
|
FILE_APPEND_DATA | SYNCHRONIZE,
|
||||||
&ObjectAttributes,
|
&ObjectAttributes,
|
||||||
&Iosb,
|
&Iosb,
|
||||||
|
@ -268,7 +268,10 @@ KdpDebugLogInit(PKD_DISPATCH_TABLE DispatchTable,
|
||||||
RtlFreeUnicodeString(&FileName);
|
RtlFreeUnicodeString(&FileName);
|
||||||
|
|
||||||
if (!NT_SUCCESS(Status))
|
if (!NT_SUCCESS(Status))
|
||||||
|
{
|
||||||
|
DPRINT1("Failed to open log file: 0x%08x\n", Status);
|
||||||
return;
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
KeInitializeEvent(&KdpLoggerThreadEvent, SynchronizationEvent, TRUE);
|
KeInitializeEvent(&KdpLoggerThreadEvent, SynchronizationEvent, TRUE);
|
||||||
|
|
||||||
|
@ -282,12 +285,12 @@ KdpDebugLogInit(PKD_DISPATCH_TABLE DispatchTable,
|
||||||
NULL);
|
NULL);
|
||||||
if (!NT_SUCCESS(Status))
|
if (!NT_SUCCESS(Status))
|
||||||
{
|
{
|
||||||
NtClose(KdpLogFileHandle);
|
ZwClose(KdpLogFileHandle);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
Priority = 7;
|
Priority = 7;
|
||||||
NtSetInformationThread(ThreadHandle,
|
ZwSetInformationThread(ThreadHandle,
|
||||||
ThreadPriority,
|
ThreadPriority,
|
||||||
&Priority,
|
&Priority,
|
||||||
sizeof(Priority));
|
sizeof(Priority));
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue