From owner-svn-src-all@FreeBSD.ORG Fri May 31 17:23:39 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 04B7AB66; Fri, 31 May 2013 17:23:39 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id EB98F114; Fri, 31 May 2013 17:23:38 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r4VHNcVB087354; Fri, 31 May 2013 17:23:38 GMT (envelope-from jkim@svn.freebsd.org) Received: (from jkim@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r4VHNcif087353; Fri, 31 May 2013 17:23:38 GMT (envelope-from jkim@svn.freebsd.org) Message-Id: <201305311723.r4VHNcif087353@svn.freebsd.org> From: Jung-uk Kim Date: Fri, 31 May 2013 17:23:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r251186 - head/usr.sbin/acpi/acpidump X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 31 May 2013 17:23:39 -0000 Author: jkim Date: Fri May 31 17:23:38 2013 New Revision: 251186 URL: http://svnweb.freebsd.org/changeset/base/251186 Log: 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 Modified: head/usr.sbin/acpi/acpidump/acpi_user.c Modified: head/usr.sbin/acpi/acpidump/acpi_user.c ============================================================================== --- head/usr.sbin/acpi/acpidump/acpi_user.c Fri May 31 17:01:53 2013 (r251185) +++ head/usr.sbin/acpi/acpidump/acpi_user.c Fri May 31 17:23:38 2013 (r251186) @@ -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);