MCPcopy Create free account
hub / github.com/CloverHackyColor/CloverBootloader / DebugPrint

Function DebugPrint

Library/OcDebugLogLib/OcDebugLogLib.c:44–70  ·  view source on GitHub ↗

Prints a debug message to the debug output device if the specified error level is enabled. If any bit in ErrorLevel is also set in DebugPrintErrorLevelLib function GetDebugPrintErrorLevel (), then print the message specified by Format and the associated variable argument list to the debug output device. If Format is NULL, then ASSERT(). @param ErrorLevel The error level of the debug

Source from the content-addressed store, hash-verified

42 based on the format string specified by Format.
43**/
44VOID
45EFIAPI
46DebugPrint (
47 IN UINTN ErrorLevel,
48 IN CONST CHAR8 *Format,
49 ...
50 )
51{
52 VA_LIST Marker;
53 CHAR16 Buffer[256];
54 OC_LOG_PROTOCOL *OcLog;
55
56 ASSERT (Format != NULL);
57
58 OcLog = InternalGetOcLog ();
59
60 VA_START (Marker, Format);
61
62 if (OcLog != NULL) {
63 OcLog->AddEntry (OcLog, ErrorLevel, Format, Marker);
64 } else if ((ErrorLevel & GetDebugPrintErrorLevel ()) != 0) {
65 UnicodeVSPrintAsciiFormat (Buffer, sizeof (Buffer), Format, Marker);
66 gST->ConOut->OutputString (gST->ConOut, Buffer);
67 }
68
69 VA_END (Marker);
70}
71
72
73/**

Callers 3

DebugAssertFunction · 0.70
LogPrintFunction · 0.50
MemLogVAFunction · 0.50

Calls 3

InternalGetOcLogFunction · 0.85
GetDebugPrintErrorLevelFunction · 0.50

Tested by

no test coverage detected