acpidump - be a bit more lenient and don't assert
authorAlex Hornung <alex@alexhornung.com>
Sun, 29 Jul 2012 15:23:47 +0000 (15:23 +0000)
committerAlex Hornung <alex@alexhornung.com>
Sun, 29 Jul 2012 15:23:47 +0000 (15:23 +0000)
 * Asserting in this case causes the dump not to continue, although it
   is safe to do so.

Reported-by: Mihai Carabas
usr.sbin/acpi/acpidump/acpi.c

index 840e9ec..67cb43e 100644 (file)
@@ -522,7 +522,6 @@ acpi_print_rsdt(struct ACPIsdt *rsdp)
                default:
                        addr = 0;
                }
-               assert(addr != 0);
                printf("0x%08lx", addr);
        }
        printf(" }\n");
@@ -778,7 +777,8 @@ acpi_handle_rsdt(struct ACPIsdt *rsdp)
                        addr = le64dec((char*)rsdp->body + i * addr_size);
                        break;
                default:
-                       assert((addr = 0));
+                       printf("invalid addr_size: %d", addr_size);
+                       continue;
                }
 
                sdp = (struct ACPIsdt *)acpi_map_sdt(addr);