[patches] Add dmi kernel class support into HAL

Richard Hughes hughsient at gmail.com
Tue Jun 5 09:21:04 PDT 2007


On Tue, 2007-06-05 at 18:01 +0200, Lennart Poettering wrote:
> No this hasn't changed upstream.

Okay, then what about just dropping these keys from HAL?

> BTW: One question, Richard: In dmi_set_string_from_data() you test
> strcmp(value, "Not Available"). Why?

I've seen two vendors that do this.

> That string has no special
> meaning according to the DMI spec, AFAIK. Different BIOSes use
> different strings for not-availability here. e.g. my asus mainboard
> just repeats the field name in the field data. 

Do you think we should filter this also? It makes no sense IMO to export
information that is wrong.

> The only extra check that might make sense is to check whether the
> field is left empty or consists of whitespace only. Some check like
> this:
> 
> strlen(value) == strcspn(value, " \t\r\n")

Yes, good idea.

> Which reminds me that the BIOS strings are not necessarily UTF-8
> strings. HAL assume UTF8, doesn't it? Maybe you should strip all
> non-ASCII characters from it.

I've only ever seen ASCII, but I suppose it can't hurt.

Richard.




More information about the hal mailing list