From owner-freebsd-acpi@FreeBSD.ORG Mon Mar 10 17:00:06 2008 Return-Path: Delivered-To: freebsd-acpi@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5EE0A1065677 for ; Mon, 10 Mar 2008 17:00:06 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 5B13D8FC14 for ; Mon, 10 Mar 2008 17:00:06 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.14.2/8.14.2) with ESMTP id m2AH06Xs026749 for ; Mon, 10 Mar 2008 17:00:06 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.2/8.14.1/Submit) id m2AH06RT026748; Mon, 10 Mar 2008 17:00:06 GMT (envelope-from gnats) Date: Mon, 10 Mar 2008 17:00:06 GMT Message-Id: <200803101700.m2AH06RT026748@freefall.freebsd.org> To: freebsd-acpi@FreeBSD.org From: John Baldwin Cc: Subject: Re: kern/121504: [patch] Correctly set hw.acpi.osname on certain machines X-BeenThere: freebsd-acpi@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: John Baldwin List-Id: ACPI and power management development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 10 Mar 2008 17:00:06 -0000 The following reply was made to PR kern/121504; it has been noted by GNATS. From: John Baldwin To: bug-followup@FreeBSD.org, amistry@am-productions.biz Cc: njl@FreeBSD.org Subject: Re: kern/121504: [patch] Correctly set hw.acpi.osname on certain machines Date: Mon, 10 Mar 2008 12:20:49 -0400 This is not the correct patch. The _OSI method does not return an OS name like _OS. Instead, it is a function that returns a boolean (True/False) to say if a given OS name is supported (OS name is passed as an argument). The proper fix is to say that the osname is supported in the AcpiOsValidateInterface() method. Something like this should work: Index: Osd/OsdMemory.c =================================================================== RCS file: /usr/cvs/src/sys/dev/acpica/Osd/OsdMemory.c,v retrieving revision 1.15 diff -u -r1.15 OsdMemory.c --- Osd/OsdMemory.c 22 Mar 2007 18:16:41 -0000 1.15 +++ Osd/OsdMemory.c 10 Mar 2008 16:20:03 -0000 @@ -77,6 +77,9 @@ ACPI_STATUS AcpiOsValidateInterface (char *Interface) { + + if (strcmp(Interface, acpi_osname) == 0) + return (AE_OK); return (AE_SUPPORT); } -- John Baldwin