The branch main has been updated by imp:

URL: 
https://cgit.FreeBSD.org/src/commit/?id=19dd881177fcd38c63c26bc4b2d1328311fefec8

commit 19dd881177fcd38c63c26bc4b2d1328311fefec8
Author:     Warner Losh <[email protected]>
AuthorDate: 2024-10-15 11:07:30 +0000
Commit:     Warner Losh <[email protected]>
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);

Reply via email to