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

Function SetupBooterLog

rEFIt_UEFI/Platform/BootLog.cpp:189–212  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

187}
188
189EFI_STATUS SetupBooterLog(BOOLEAN AllowGrownSize)
190{
191 EFI_STATUS Status = EFI_SUCCESS;
192 CHAR8 *MemLogBuffer;
193 UINTN MemLogLen;
194
195 MemLogBuffer = GetMemLogBuffer();
196 MemLogLen = GetMemLogLen();
197
198 if (MemLogBuffer == NULL || MemLogLen == 0) {
199 return EFI_NOT_FOUND;
200 }
201
202 if (MemLogLen > MEM_LOG_INITIAL_SIZE && !AllowGrownSize) {
203 CHAR8 PrevChar = MemLogBuffer[MEM_LOG_INITIAL_SIZE-1];
204 MemLogBuffer[MEM_LOG_INITIAL_SIZE-1] = '\0';
205 Status = LogDataHub(&gEfiMiscSubClassGuid, L"boot-log", MemLogBuffer, MEM_LOG_INITIAL_SIZE);
206 MemLogBuffer[MEM_LOG_INITIAL_SIZE-1] = PrevChar;
207 } else {
208 Status = LogDataHub(&gEfiMiscSubClassGuid, L"boot-log", MemLogBuffer, (UINT32)MemLogLen);
209 }
210
211 return Status;
212}
213
214// Made msgbuf and msgCursor private to this source
215// so we need a different way of saving the msg log - apianti

Callers 1

StartLoaderMethod · 0.85

Calls 2

GetMemLogLenFunction · 0.85
LogDataHubFunction · 0.85

Tested by

no test coverage detected