From: short <> Date: Tue, 4 Feb 2003 00:13:06 +0000 (+0000) Subject: +Option '--debug-messages' (default off) - variable 'captive_debug_messages' X-Git-Tag: captive-0_2~65 X-Git-Url: http://git.jankratochvil.net/?p=reactos.git;a=commitdiff_plain;h=d62d76d5a725923d7a35289e77cef0bdf2f1bd5e;hp=c6b8d7e5eb3b5672e7b7d8372e7cf00dbeeba68d +Option '--debug-messages' (default off) - variable 'captive_debug_messages' - turned on in the default captive.conf --- 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);