Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 08 May 2004 05:44:29 -0600 (MDT)
From:      "M. Warner Losh" <imp@bsdimp.com>
To:        nate@root.org
Cc:        arch@freebsd.org
Subject:   Re: New ACPI blacklist format
Message-ID:  <20040508.054429.99235478.imp@bsdimp.com>
In-Reply-To: <20040507231846.F52653@root.org>
References:  <20040507231846.F52653@root.org>

next in thread | previous in thread | raw e-mail | index | archive | help
In message: <20040507231846.F52653@root.org>
            Nate Lawson <nate@root.org> 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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20040508.054429.99235478.imp>