[flashrom] DMI matching patch
Carl-Daniel Hailfinger
c-d.hailfinger.devel.2006 at gmx.net
Fri Jan 1 01:18:11 CET 2010
On 31.12.2009 17:22, Carl-Daniel Hailfinger wrote:
> On 30.12.2009 15:02, Michael Karcher wrote:
>
>> Matching via DMI: If a board is not uniquely identifiable by PCI
>> device/subsystem IDs, a string can be specified to be looked for
>> (case-sensitive, substring) for now in one of the following items:
>> - System Manufacturer
>> - System Product Name
>> - System Version
>> - Baseboard Manufacturer
>> - Baseboard Product Name
>> - Baseboard Version
>>
>
> I believe the substring match is suboptimal. For example, if you want to
> differentiate between the Asus M2A-VM and the Asus M2A-VM HDMI, only the
> HDMI variant can be matched safely.
>
> This may be a stupid question, but how do AWDFLASH etc. match their
> boards? Their mechanism is designed to work well under most
> circumstances, and the manufacturers check it for ambiguities.
If AWDFLASH etc. have no common scheme, I think we can come up with our
own. Suggestion:
- Ability to specify arbitrary combinations of all six strings without
introducing a boatload of new fields.
- (related to the point above) Storage format for string combinations,
delimited with "," and starting with a field specifying the string
selection (one char per selected string), delimiter, first string [,
delimiter, second string [, delimiter, third string]]. The end result is
still a human-readable string and can thus be stored in a simple C string.
- Strip all leading and trailing whitespace from the strings before
matching. Something like ltrim(rtrim($variable)) in BASIC.
- Always match full strings (no substring matching).
Regards,
Carl-Daniel
--
Developer quote of the year:
"We are juggling too many chainsaws and flaming arrows and tigers."
More information about the flashrom
mailing list