From d62d76d5a725923d7a35289e77cef0bdf2f1bd5e Mon Sep 17 00:00:00 2001 From: short <> Date: Tue, 4 Feb 2003 00:13:06 +0000 Subject: [PATCH] +Option '--debug-messages' (default off) - variable 'captive_debug_messages' - turned on in the default captive.conf --- ntoskrnl/dbg/print.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/ntoskrnl/dbg/print.c b/ntoskrnl/dbg/print.c index f0c755d..eec9496 100644 --- a/ntoskrnl/dbg/print.c +++ b/ntoskrnl/dbg/print.c @@ -32,6 +32,9 @@ #include #include +#ifdef LIBCAPTIVE +#include /* for gboolean */ +#endif /* LIBCAPTIVE */ /* FUNCTIONS ****************************************************************/ @@ -53,6 +56,10 @@ __asm__ ("\n\t.global _DbgService\n\t" * You'll only break the serial/bochs debugging feature!!! */ +#ifdef LIBCAPTIVE +extern gboolean captive_debug_messages; +#endif /* LIBCAPTIVE */ + ULONG DbgPrint(PCH Format, ...) { @@ -60,6 +67,11 @@ DbgPrint(PCH Format, ...) CHAR Buffer[1024]; va_list ap; +#ifdef LIBCAPTIVE + if (!captive_debug_messages) + return 0; +#endif /* LIBCAPTIVE */ + /* init ansi string */ DebugString.Buffer = Buffer; DebugString.MaximumLength = sizeof(Buffer); -- 1.8.3.1