From owner-freebsd-acpi@FreeBSD.ORG Sun May 9 08:35:34 2004 Return-Path: Delivered-To: freebsd-acpi@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 45DE616A4D0; Sun, 9 May 2004 08:35:34 -0700 (PDT) Received: from harmony.village.org (rover.village.org [168.103.84.182]) by mx1.FreeBSD.org (Postfix) with ESMTP id C68EF43D39; Sun, 9 May 2004 08:35:33 -0700 (PDT) (envelope-from imp@bsdimp.com) Received: from localhost (warner@rover2.village.org [10.0.0.1]) by harmony.village.org (8.12.10/8.12.9) with ESMTP id i48BhhOd037646; Sat, 8 May 2004 05:44:58 -0600 (MDT) (envelope-from imp@bsdimp.com) Date: Sat, 08 May 2004 05:44:29 -0600 (MDT) Message-Id: <20040508.054429.99235478.imp@bsdimp.com> To: nate@root.org From: "M. Warner Losh" In-Reply-To: <20040507231846.F52653@root.org> References: <20040507231846.F52653@root.org> X-Mailer: Mew version 3.3 on Emacs 21.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit cc: acpi@freebsd.org cc: arch@freebsd.org Subject: Re: New ACPI blacklist format X-BeenThere: freebsd-acpi@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: ACPI and power management development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 09 May 2004 15:35:34 -0000 In message: <20040507231846.F52653@root.org> Nate Lawson writes: : I have extracted a set of known-broken tables/versions from various : sources. Since. as far as I know, C does not allow variable length : initializers, I've settled on the following format: It does. : struct acpi_table_desc { : char *signature; : char *oem_id; : char *oem_table_id; : char *oem_rev_op; : char *oem_revision; : char *creator_id; : char *creator_rev_op; : char *creator_revision; : }; : : struct acpi_blacklist { : int quirk; : struct acpi_table_desc *match; : }; : : #define ACPI_BROKEN 0x1 : : static struct acpi_table_desc Abit_BP6[] = { : { "FACP", "AWARD", "AWRDACPI", "<=", "30302e31", "", "", "" }, : }; { .signature = "FACP", .oem_id="AWARD", .oem_table_id="AWARDACPI", .oem_rev_op = "<=", } :The op values will be "<=", "=", and ">=". These are likely better as a enum. : Is there any better way to compact this? Using shorter structure names would get it all onthe same line. Warner