Make DebugPrintFuncSerial static
Signed-off-by: Frediano Ziglio <fziglio@redhat.com> Acked-by: Yuri Benditovich <yuri.benditovich@daynix.com>
This commit is contained in:
parent
d86f38f89c
commit
9aaae88e4a
@ -741,13 +741,11 @@ DodSystemDisplayWrite(
|
||||
#define RHEL_DEBUG_PORT ((PUCHAR)0x3F8)
|
||||
#define TEMP_BUFFER_SIZE 256
|
||||
|
||||
void DebugPrintFuncSerial(const char *format, ...)
|
||||
static void DebugPrintFuncSerial(const char *format, va_list list)
|
||||
{
|
||||
char buf[TEMP_BUFFER_SIZE];
|
||||
NTSTATUS status;
|
||||
size_t len;
|
||||
va_list list;
|
||||
va_start(list, format);
|
||||
status = RtlStringCbVPrintfA(buf, sizeof(buf), format, list);
|
||||
if (status == STATUS_SUCCESS)
|
||||
{
|
||||
@ -768,11 +766,17 @@ void DebugPrintFuncSerial(const char *format, ...)
|
||||
|
||||
void DebugPrint(int level, const char *fmt, ...)
|
||||
{
|
||||
va_list list;
|
||||
if (level <= nDebugLevel) {
|
||||
va_start(list, fmt);
|
||||
DebugPrintFuncSerial(fmt, list);
|
||||
va_end(list);
|
||||
}
|
||||
|
||||
static const ULONG xlate[] = { 0, 0, 1, 2, 3 };
|
||||
if (level <= 0 || level > 5)
|
||||
return;
|
||||
|
||||
va_list list;
|
||||
va_start(list, fmt);
|
||||
vDbgPrintEx(DPFLTR_IHVVIDEO_ID, xlate[level - 1], fmt, list);
|
||||
va_end(list);
|
||||
|
@ -235,23 +235,16 @@ DodGetScanLine(
|
||||
#if DBG
|
||||
|
||||
extern int nDebugLevel;
|
||||
void DebugPrintFuncSerial(const char *format, ...);
|
||||
void DebugPrint(int level, const char *fmt, ...);
|
||||
|
||||
#define DbgExpandArguments(...) __VA_ARGS__
|
||||
|
||||
#define DbgPrint(level, line) do { \
|
||||
if (level <= nDebugLevel) DebugPrintFuncSerial line; \
|
||||
DebugPrint(level, DbgExpandArguments line); \
|
||||
} while(0)
|
||||
|
||||
#define DbgPrint(level, line) \
|
||||
DebugPrint(level, DbgExpandArguments line)
|
||||
#else
|
||||
#define DbgPrint(level, line)
|
||||
#define DbgPrint(level, line) {}
|
||||
#endif
|
||||
|
||||
// else if (0) DebugPrintFuncSerial line \
|
||||
|
||||
|
||||
#ifndef TRACE_LEVEL_INFORMATION
|
||||
#define TRACE_LEVEL_NONE 0 // Tracing is not on
|
||||
#define TRACE_LEVEL_FATAL 1 // Abnormal exit or termination
|
||||
|
Loading…
Reference in New Issue
Block a user