Skip to contentSkip to conversation

Should we make dmi_check_system case insensitive?

DISCUSSION Dmitry Torokhov 4 participants 4 messages May 29, 2006

lore
Share & tools
lore
#0 lore raw

Hi,

I have a request to add entry for "LifeBook B Series" to lifebook driver to accomodate lifebook B2545, however we already have entry for "LIFEBOOK B Series" (used by some other model) which is not working. Would anyone be opposed making dmi_check_system() ignore string case? We would have to malloc/copy both strings and lowercase them before doing stsstr...

Signature · 1 line
Dmitry
#1 lore raw
Quoted 5 lines · Dmitry Torokhov

I have a request to add entry for "LifeBook B Series" to lifebook driver to accomodate lifebook B2545, however we already have entry for "LIFEBOOK B Series" (used by some other model) which is not working. Would anyone be opposed making dmi_check_system() ignore string case? We would have to malloc/copy both strings and lowercase them before doing stsstr...

I was thinking that something like this would eventually be necessary. My mind even wandered into the land of wildcards and regexes...

But be wary... DMI stuff is often used early enough that memory allocation may be a bad idea (it seems to use a special dmi_alloc function, at the very least).

Jeff

#2 lore raw
In reply to Dmitry Torokhov
Quoted 6 lines · Dmitry Torokhov

Hi,

I have a request to add entry for "LifeBook B Series" to lifebook driver to accomodate lifebook B2545, however we already have entry for "LIFEBOOK B Series" (used by some other model) which is not working. Would anyone be opposed making dmi_check_system() ignore string case?

yes I would.
There are very legit reasons to be able to separate both machines, for other things they may well be not the same after all. Once you go case insensitive you can't separate at all anymore; I rather have an occasional "dupe" in the table than a really huge mess of things you can't keep separate anymore....

#3 lore raw
In reply to Dmitry Torokhov
Quoted 7 lines · Dmitry Torokhov

Hi,

I have a request to add entry for "LifeBook B Series" to lifebook driver to accomodate lifebook B2545, however we already have entry for "LIFEBOOK B Series" (used by some other model) which is not working. Would anyone be opposed making dmi_check_system() ignore string case? We would have to malloc/copy both strings and lowercase them before doing stsstr...

I think it's easier to just add the second entry. We're trying to distinguish individual machines here, the fact that we have a single DMI entry accomodating a whole series is an exception.

Signature · 2 lines
Vojtech Pavlik
Director SuSE Labs