optimize debug.log

Signed-off-by: SergeySlice <sergey.slice@gmail.com>
This commit is contained in:
SergeySlice 2020-03-15 16:42:45 +03:00
parent 9ab5a63908
commit b6d3ddb28f
2 changed files with 19 additions and 9 deletions

View File

@ -326,8 +326,10 @@ VOID AddKexts(IN LOADER_ENTRY *Entry, CONST CHAR16 *SrcDir, CONST CHAR16 *Path/*
} }
} else { } else {
// disable current kext injection // disable current kext injection
if (!StriStr(SrcDir, L"Off")) {
MsgLog("Disabled kext: %s (v.%s)\n", FileName, CurrentKext->Version); MsgLog("Disabled kext: %s (v.%s)\n", FileName, CurrentKext->Version);
} }
}
FreePool(FileName); FreePool(FileName);
} }
CurrentKext = CurrentKext->Next; CurrentKext = CurrentKext->Next;

View File

@ -1744,15 +1744,23 @@ BOOLEAN DumpVariable(CHAR16* Name, EFI_GUID* Guid, INTN DevicePathAt)
VOID DbgHeader(CONST CHAR8 *str) VOID DbgHeader(CONST CHAR8 *str)
{ {
#if defined(ADVLOG) CHAR8 strLog[50];
INTN i, len = 50 - AsciiStrLen(str); //#if defined(ADVLOG)
DebugLog (1, "=== [ %a ] ", str); INTN len;
for (i = 0; i < len; i++) DebugLog (1, "="); // DebugLog (1, "=== [ %a ] ", str);
DebugLog (1, "\n"); UINTN end = AsciiSPrint(strLog, 50, "=== [ %a ] ", str);
len = 50 - end;
for (INTN i = 0; i < len; i++) {
strLog[i + end] = '=';
}
strLog[50] = '\0';
DebugLog (1, "%a\n", strLog);
// for (i = 0; i < len; i++) DebugLog (1, "=");
// DebugLog (1, "\n");
#else //ADVLOG //#else //ADVLOG
DebugLog (1, "%a:\n", str); // DebugLog (1, "%a:\n", str);
#endif //ADVLOG //#endif //ADVLOG
} }
// EOF // EOF