未验证 提交 fe849134 编写于 作者: C CorpNewt 提交者: GitHub

OcAcpiLib: Fix comment printing failing to process long comments (#432)

上级 1a9a40bf
......@@ -140,6 +140,7 @@ OcAcpiPatchTables (
EFI_STATUS Status;
UINT32 Index;
OC_ACPI_PATCH_ENTRY *UserPatch;
CONST CHAR8 *Comment;
OC_ACPI_PATCH Patch;
for (Index = 0; Index < Config->Acpi.Patch.Count; ++Index) {
......@@ -149,6 +150,8 @@ OcAcpiPatchTables (
continue;
}
Comment = OC_BLOB_GET (&UserPatch->Comment);
//
// Ignore patch if:
// - There is nothing to replace.
......@@ -161,7 +164,7 @@ OcAcpiPatchTables (
|| ((UserPatch->Mask.Size > 0) && (UserPatch->Find.Size != UserPatch->Mask.Size))
|| ((UserPatch->ReplaceMask.Size > 0) && (UserPatch->Replace.Size != UserPatch->ReplaceMask.Size)))
{
DEBUG ((DEBUG_ERROR, "OC: ACPI patch (%a) at %u is borked\n", UserPatch->Comment, Index));
DEBUG ((DEBUG_ERROR, "OC: ACPI patch (%a) at %u is borked\n", Comment, Index));
continue;
}
......@@ -192,7 +195,7 @@ OcAcpiPatchTables (
DEBUG_INFO,
"OC: Applying %u byte ACPI patch (%a) at %u, skip %u, count %u\n",
Patch.Size,
UserPatch->Comment,
Comment,
Index,
Patch.Skip,
Patch.Count
......@@ -200,7 +203,7 @@ OcAcpiPatchTables (
Status = AcpiApplyPatch (Context, &Patch);
if (EFI_ERROR (Status)) {
DEBUG ((DEBUG_WARN, "OC: ACPI patcher failed (%a) at %u - %r\n", UserPatch->Comment, Index, Status));
DEBUG ((DEBUG_WARN, "OC: ACPI patcher failed (%a) at %u - %r\n", Comment, Index, Status));
}
}
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册