[BOOT:LIB] Add conditional debug printing

Added DebugPrint() and DebugPrintf() macros, which are aliases of
ConsolePrint() and ConsolePrintf() if _DEBUG is defined. Otherwise, they
do not generate any code.
This commit is contained in:
2024-08-26 10:40:16 -04:00
parent 4dbb5235e3
commit 76b01cfb00
2 changed files with 37 additions and 18 deletions

View File

@@ -34,6 +34,17 @@ ConsolePrintf (
...
);
//
// Enable/disable debug printing.
//
#ifdef _DEBUG
#define DebugPrint(String) ConsolePrint(String)
#define DebugPrintf(Format, ...) ConsolePrintf(Format, __VA_ARGS__)
#else
#define DebugPrint(String)
#define DebugPrintf(Format, ...)
#endif
ULONG
BlGetBootOptionSize (
IN PBOOT_APPLICATION_OPTION Option