[patches] Add dmi kernel class support into HAL

Lennart Poettering mzuny at 0pointer.de
Mon Jun 4 08:01:06 PDT 2007


On Mon, 04.06.07 10:53, Richard Hughes (hughsient at gmail.com) wrote:

Sorry for the long delay. I have been attending LinuxTag and didn't
process that many emails during that time.

> On Tue, 2007-05-22 at 16:21 +0200, Lennart Poettering wrote:
> > 
> > Humm. the "chassis_type" field contains a numeric id. To get a human
> > readable string you need to convert that first using some lookup
> > table. Unless I am mistaken you don't do that translation right now?
> 
> Ping? Shouldn't you do the numeric -> text description in the kernel
> driver?

No. Why should I? Having const tables in kernel is a waste of
resources -- especially if they are as trivial as this specific
one. And I really think that the mapping in this case would be a waste
of memory. You can easily do this from userspace -- or even work with
the numeric IDs directly.

Also, the tables are updated every now and then by the DMI
organization. Having to send in a kernel patch fro trivial things like
this everytime the DMI spec changes is not a good idea I would say.

The upstream DMI table also contains a lot of rubbish entries ("pizza
box" and suchlike). To be useful this entry has to be cleaned up
anyway. However, cleaning this up  means a lot of policy
decisions. (i.e. is "pizza box" more a laptop or more a desktop?)
Hence we better leave this out of the kernel. 

lspci and lsusb maintain ther databases outside of the kernel. And I
think this case is not that different.

If you really want to see this in the kernel, feel free to post a
patch on LKML, but the ractions will probably not be that
friendly. (But there is a chance, of course, to prove me wrong!)

Lennart

-- 
Lennart Poettering                        Red Hat, Inc.
lennart [at] poettering [dot] net         ICQ# 11060553
http://0pointer.net/lennart/           GnuPG 0x1A015CC4


More information about the hal mailing list