summaryrefslogtreecommitdiffstats
path: root/usr.sbin/acpi
diff options
context:
space:
mode:
authorjkim <jkim@FreeBSD.org>2013-05-31 17:23:38 +0000
committerjkim <jkim@FreeBSD.org>2013-05-31 17:23:38 +0000
commitdb7e9a0a660f6bce11b7e91b8412eb4f1d0dff93 (patch)
tree0b9e9426f959c4a2ff9549d99c441dfc44bec800 /usr.sbin/acpi
parent52ec94b217b9d5dd76f334e527538e288086f837 (diff)
downloadFreeBSD-src-db7e9a0a660f6bce11b7e91b8412eb4f1d0dff93.zip
FreeBSD-src-db7e9a0a660f6bce11b7e91b8412eb4f1d0dff93.tar.gz
Fix a long standing logic bug introduced in r167814. The code was added to
get RSDP from loader(8) hint via kenv(2) but the bug nullified the new code and we always fell back to the previous method, i. e., sysctlbyname(3). MFC after: 3 days
Diffstat (limited to 'usr.sbin/acpi')
-rw-r--r--usr.sbin/acpi/acpidump/acpi_user.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/usr.sbin/acpi/acpidump/acpi_user.c b/usr.sbin/acpi/acpidump/acpi_user.c
index 0b2beb2..d759ea7 100644
--- a/usr.sbin/acpi/acpidump/acpi_user.c
+++ b/usr.sbin/acpi/acpidump/acpi_user.c
@@ -172,7 +172,7 @@ acpi_find_rsd_ptr(void)
addr = 0;
/* Attempt to use kenv or sysctl to find RSD PTR record. */
- if (kenv(KENV_GET, hint_acpi_0_rsdp, buf, 20) == 0)
+ if (kenv(KENV_GET, hint_acpi_0_rsdp, buf, 20) > 0)
addr = strtoul(buf, NULL, 0);
if (addr == 0) {
len = sizeof(addr);
OpenPOWER on IntegriCloud