https://git.reactos.org/?p=reactos.git;a=commitdiff;h=734a043b22d56d0eee89f…
commit 734a043b22d56d0eee89f546de39a632360619f4
Author: Hervé Poussineau <hpoussin(a)reactos.org>
AuthorDate: Sun Sep 22 21:42:21 2024 +0200
Commit: Hermès Bélusca-Maïto <hermes.belusca-maito(a)reactos.org>
CommitDate: Tue Jan 28 22:00:51 2025 +0100
[NTOS:EX] Implement NtSystemDebugControl: SysDbgGetPrintBufferSize
---
ntoskrnl/ex/dbgctrl.c | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/ntoskrnl/ex/dbgctrl.c b/ntoskrnl/ex/dbgctrl.c
index 1948164397f..0091af90f23 100644
--- a/ntoskrnl/ex/dbgctrl.c
+++ b/ntoskrnl/ex/dbgctrl.c
@@ -319,6 +319,18 @@ NtSystemDebugControl(
break;
case SysDbgGetPrintBufferSize:
+ if (OutputBufferLength != sizeof(ULONG))
+ {
+ Status = STATUS_INFO_LENGTH_MISMATCH;
+ }
+ else
+ {
+ /* Return buffer size only if KD is enabled */
+ *(PULONG)OutputBuffer = KdPitchDebugger ? 0 : KdPrintBufferSize;
+ Status = STATUS_SUCCESS;
+ }
+ break;
+
case SysDbgSetPrintBufferSize:
case SysDbgGetKdUmExceptionEnable:
case SysDbgSetKdUmExceptionEnable: