Module Name: src Committed By: jruoho Date: Sat Jan 23 12:48:19 UTC 2010
Modified Files: src/sys/dev/acpi: wmi_acpi.c Log Message: * Fix the type of the input buffer in the WMI method call. * Do not error out if the flags field is is 0x00. Observed by ceg...@. To generate a diff of this commit: cvs rdiff -u -r1.9 -r1.10 src/sys/dev/acpi/wmi_acpi.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/sys/dev/acpi/wmi_acpi.c diff -u src/sys/dev/acpi/wmi_acpi.c:1.9 src/sys/dev/acpi/wmi_acpi.c:1.10 --- src/sys/dev/acpi/wmi_acpi.c:1.9 Sat Jan 9 15:34:59 2010 +++ src/sys/dev/acpi/wmi_acpi.c Sat Jan 23 12:48:19 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: wmi_acpi.c,v 1.9 2010/01/09 15:34:59 jruoho Exp $ */ +/* $NetBSD: wmi_acpi.c,v 1.10 2010/01/23 12:48:19 jruoho Exp $ */ /*- * Copyright (c) 2009, 2010 Jukka Ruohonen <jruoho...@iki.fi> @@ -27,7 +27,7 @@ * SUCH DAMAGE. */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: wmi_acpi.c,v 1.9 2010/01/09 15:34:59 jruoho Exp $"); +__KERNEL_RCSID(0, "$NetBSD: wmi_acpi.c,v 1.10 2010/01/23 12:48:19 jruoho Exp $"); #include <sys/param.h> #include <sys/device.h> @@ -581,7 +581,7 @@ if (!(wmi->guid.flags & flag)) return false; - if (wmi->guid.count == 0x00 || wmi->guid.flags == 0x00) + if (wmi->guid.count == 0x00) return false; if (wmi->guid.count < idx) @@ -740,7 +740,7 @@ obj[2].Buffer.Pointer = ibuf->Pointer; obj[2].Type = (wmi->guid.flags & ACPI_WMI_FLAG_STRING) ? - ACPI_TYPE_STRING : ACPI_TYPE_INTEGER; + ACPI_TYPE_STRING : ACPI_TYPE_BUFFER; arg.Count = 0x03; arg.Pointer = obj;