Date: Tue, 15 Oct 2024 11:13:59 GMT From: Warner Losh <imp@FreeBSD.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Subject: git: 19dd881177fc - main - acpidump: Use ACPI_NAMESEG_SIZE instead of 4 Message-ID: <202410151113.49FBDxpO097759@gitrepo.freebsd.org>
next in thread | raw e-mail | index | archive | help
The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=19dd881177fcd38c63c26bc4b2d1328311fefec8 commit 19dd881177fcd38c63c26bc4b2d1328311fefec8 Author: Warner Losh <imp@FreeBSD.org> AuthorDate: 2024-10-15 11:07:30 +0000 Commit: Warner Losh <imp@FreeBSD.org> CommitDate: 2024-10-15 11:07:30 +0000 acpidump: Use ACPI_NAMESEG_SIZE instead of 4 In a couple of places, we use 4 instead of ACPI_NAMESEG_SIZE. Use the Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D47109 --- usr.sbin/acpi/acpidump/acpi.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/usr.sbin/acpi/acpidump/acpi.c b/usr.sbin/acpi/acpidump/acpi.c index 4eb361a6f479..746db4a5583c 100644 --- a/usr.sbin/acpi/acpidump/acpi.c +++ b/usr.sbin/acpi/acpidump/acpi.c @@ -2631,13 +2631,13 @@ sdt_load_devmem(void) acpi_print_rsd_ptr(rp); if (rp->Revision < 2) { rsdp = (ACPI_TABLE_HEADER *)acpi_map_sdt(rp->RsdtPhysicalAddress); - if (memcmp(rsdp->Signature, "RSDT", 4) != 0 || + if (memcmp(rsdp->Signature, "RSDT", ACPI_NAMESEG_SIZE) != 0 || acpi_checksum(rsdp, rsdp->Length) != 0) errx(1, "RSDT is corrupted"); addr_size = sizeof(uint32_t); } else { rsdp = (ACPI_TABLE_HEADER *)acpi_map_sdt(rp->XsdtPhysicalAddress); - if (memcmp(rsdp->Signature, "XSDT", 4) != 0 || + if (memcmp(rsdp->Signature, "XSDT", ACPI_NAMESEG_SIZE) != 0 || acpi_checksum(rsdp, rsdp->Length) != 0) errx(1, "XSDT is corrupted"); addr_size = sizeof(uint64_t);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202410151113.49FBDxpO097759>