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

Function OcLogAddEntry

Library/OcDebugLogLib/OcLog.c:142–358  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

140}
141
142EFI_STATUS
143EFIAPI
144OcLogAddEntry (
145 IN OC_LOG_PROTOCOL *OcLog,
146 IN UINTN ErrorLevel,
147 IN CONST CHAR8 *FormatString,
148 IN VA_LIST Marker
149 )
150{
151 EFI_STATUS Status;
152
153 OC_LOG_PRIVATE_DATA *Private;
154 UINT32 Attributes;
155 UINT32 TimingLength;
156 UINT32 LineLength;
157 APPLE_PLATFORM_DATA_RECORD *Entry;
158 UINT32 KeySize;
159 UINT32 DataSize;
160 UINT32 TotalSize;
161
162 Private = OC_LOG_PRIVATE_DATA_FROM_OC_LOG_THIS (OcLog);
163
164 if ((OcLog->Options & OC_LOG_ENABLE) == 0) {
165 //
166 // Silently ignore when disabled.
167 //
168 return EFI_SUCCESS;
169 }
170
171 AsciiVSPrint (
172 Private->LineBuffer,
173 sizeof (Private->LineBuffer),
174 FormatString,
175 Marker
176 );
177
178 //
179 // Add Entry.
180 //
181
182 Status = EFI_SUCCESS;
183
184 if (*Private->LineBuffer != '\0') {
185 GetTiming (OcLog);
186
187 //
188 // Send the string to the console output device.
189 //
190 if ((OcLog->Options & OC_LOG_CONSOLE) != 0 && (OcLog->DisplayLevel & ErrorLevel) != 0) {
191 UnicodeSPrint (
192 Private->UnicodeLineBuffer,
193 sizeof (Private->UnicodeLineBuffer),
194 L"%a",
195 Private->LineBuffer
196 );
197 gST->ConOut->OutputString (gST->ConOut, Private->UnicodeLineBuffer);
198
199 if (OcLog->DisplayDelay > 0) {

Callers

nothing calls this directly

Calls 15

AsciiStrLenFunction · 0.85
AsciiStrCatSFunction · 0.85
EfiGetCurrentTplFunction · 0.85
SetFileDataFunction · 0.85
AsciiStrSizeFunction · 0.85
AsciiStrnCmpFunction · 0.85
StallMethod · 0.80
GetTimingFunction · 0.70
AsciiVSPrintFunction · 0.50
UnicodeSPrintFunction · 0.50
SerialPortWriteFunction · 0.50
AllocatePoolFunction · 0.50

Tested by

no test coverage detected