From 0b7bb0599c106a36c7104aa0ec6dd37bc04c2cc4 Mon Sep 17 00:00:00 2001 From: njl Date: Wed, 18 Aug 2004 05:56:07 +0000 Subject: When one entry in the RSDT is corrupted, just skip it instead of bailing out. This gets us the info we need on systems which have proprietary tables that don't match the standard. For instance, an AMI system has a table of type "OEMB" with an invalid checksum. Tested by: Maxim Maximov MFC after: 1 day --- usr.sbin/acpi/acpidump/acpi.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'usr.sbin/acpi') diff --git a/usr.sbin/acpi/acpidump/acpi.c b/usr.sbin/acpi/acpidump/acpi.c index e22aad4..af8ea27 100644 --- a/usr.sbin/acpi/acpidump/acpi.c +++ b/usr.sbin/acpi/acpidump/acpi.c @@ -670,8 +670,11 @@ acpi_handle_rsdt(struct ACPIsdt *rsdp) } sdp = (struct ACPIsdt *)acpi_map_sdt(addr); - if (acpi_checksum(sdp, sdp->len)) - errx(1, "RSDT entry %d is corrupt", i); + if (acpi_checksum(sdp, sdp->len)) { + warnx("RSDT entry %d (sig %.4s) is corrupt", i, + sdp->signature); + continue; + } if (!memcmp(sdp->signature, "FACP", 4)) acpi_handle_fadt(sdp); else if (!memcmp(sdp->signature, "APIC", 4)) -- cgit v1.1