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

View File

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