Should we make dmi_check_system case insensitive?
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
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
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....
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