-/* $OpenBSD: acpidump.c,v 1.24 2021/07/12 15:09:20 beck Exp $ */
+/* $OpenBSD: acpidump.c,v 1.25 2022/09/11 10:40:35 kettenis Exp $ */
/*
* Copyright (c) 2000 Mitsuru IWASAKI <iwasaki@FreeBSD.org>
* All rights reserved.
kd = kvm_openfiles(NULL, NULL, NULL, O_RDONLY, NULL);
if (kd == NULL)
goto on_error;
- nl[0].n_name = "efi_acpi_table";
- if (kvm_nlist(kd, nl) == -1)
+ nl[0].n_name = "_efi_acpi_table";
+ if (kvm_nlist(kd, nl) != 0)
goto on_error;
if (kvm_read(kd, nl[0].n_value, &table, sizeof(table)) == -1)
goto on_error;
if (kd == NULL)
goto on_error;
nl[0].n_name = "_bios_efiinfo";
- if (kvm_nlist(kd, nl) == -1)
+ if (kvm_nlist(kd, nl) != 0)
goto on_error;
if (kvm_read(kd, nl[0].n_value, &ptr, sizeof(ptr)) == -1)
goto on_error;