提交 41a94cee 编写于 作者: V vit9696

OpenCoreKernel: Fix Base field reading in patch

上级 2e2a4193
......@@ -251,7 +251,7 @@ OcKernelApplyPatches (
ZeroMem (&Patch, sizeof (Patch));
if (UserPatch->Base.Size > 0) {
if (OC_BLOB_GET (&UserPatch->Base)[0] != '\0') {
Patch.Base = OC_BLOB_GET (&UserPatch->Base);
}
......@@ -327,7 +327,7 @@ OcKernelBlockKexts (
if (AsciiStrnCmp (DarwinVersion, MatchKernel, AsciiStrLen (MatchKernel)) != 0) {
DEBUG ((
DEBUG_INFO,
"OC: Kernel blocker skips %a block at %u due to version %a vs %a",
"OC: Prelink blocker skips %a block at %u due to version %a vs %a",
Target,
Index,
MatchKernel,
......@@ -343,14 +343,18 @@ OcKernelBlockKexts (
);
if (EFI_ERROR (Status)) {
DEBUG ((DEBUG_ERROR, "OC: Kernel blocker %a init failure - %r\n", Target, Status));
DEBUG ((DEBUG_WARN, "OC: Prelink blocker %a init failure - %r\n", Target, Status));
continue;
}
Status = PatcherBlockKext (&Patcher);
if (EFI_ERROR (Status)) {
DEBUG ((DEBUG_ERROR, "OC: Kernel blocker %a failed - %r\n", Target, Status));
}
DEBUG ((
EFI_ERROR (Status) ? DEBUG_WARN : DEBUG_INFO,
"OC: Prelink blocker %a - %r\n",
Target,
Status
));
}
}
......@@ -422,7 +426,12 @@ OcKernelProcessPrelinked (
Kext->ImageDataSize
);
DEBUG ((DEBUG_INFO, "OC: Prelink injection %a - %r\n", BundleName, Status));
DEBUG ((
EFI_ERROR (Status) ? DEBUG_WARN : DEBUG_INFO,
"OC: Prelink injection %a - %r\n",
BundleName,
Status
));
}
Status = PrelinkedInjectComplete (&Context);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册