From: Jean Delvare <khali@linux-fr.org>
To: lm-sensors@vger.kernel.org
Subject: Re: [lm-sensors] abituguru3: no Abit uGuru3 found
Date: Thu, 08 Jan 2009 19:45:13 +0000 [thread overview]
Message-ID: <20090108204513.5c0c34be@hyperion.delvare> (raw)
In-Reply-To: <49657F3B.3060607@NickAndBarb.net>
On Thu, 08 Jan 2009 20:21:35 +0100, Hans de Goede wrote:
> Alistair John Strachan wrote:
> > I think the consensus we came to at the time was to switch to strncmp'ing a
> > subset of the DMI string, but in this case we'll need strncasecmp. This isn't
> > too terrible as false positives are pretty unlikely (we already check the
> > board manufacturer too, which does seem to be unchanging). Hans?
>
> That was my idea too, just make the dmi string stored in the driver: "IP35 Pro"
> and do a strncasecmp for the length of the string in the driver, with the one
> from the BIOS, if it is a match assume we have found an abituguru3 equipped
> motherboard.
That's not enough, because some board names match the beginning of
other supported board names (for example AW8 and AW8D.) So the algorithm
must really compare both strings on a
strip-everything-after-parenthesis-and-every-trailing-white-space basis.
That's a little more code, but still not rocket science, and that's the
only safe way.
(Actually, no, there's a second way: put the abituguru3_motherboards[]
entries in a clever order. But that could break easily, so I wouldn't
recommend it.)
--
Jean Delvare
_______________________________________________
lm-sensors mailing list
lm-sensors@lm-sensors.org
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors
next prev parent reply other threads:[~2009-01-08 19:45 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-01-08 4:21 [lm-sensors] abituguru3: no Abit uGuru3 found Nick Pasich
2009-01-08 7:49 ` Hans de Goede
2009-01-08 11:25 ` Nick Pasich
2009-01-08 12:02 ` Hans de Goede
2009-01-08 17:09 ` Jean Delvare
2009-01-08 18:09 ` Alistair John Strachan
2009-01-08 18:53 ` Nick Pasich
2009-01-08 19:21 ` Hans de Goede
2009-01-08 19:45 ` Jean Delvare [this message]
2009-01-08 19:53 ` Alistair John Strachan
2009-01-08 19:58 ` Alistair John Strachan
2009-01-08 22:22 ` Hans de Goede
2009-01-09 13:08 ` Hans de Goede
2009-01-12 9:06 ` Jean Delvare
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20090108204513.5c0c34be@hyperion.delvare \
--to=khali@linux-fr.org \
--cc=lm-sensors@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.