[patches] Add dmi kernel class support into HAL

Richard Hughes hughsient at gmail.com
Mon Jun 4 08:59:24 PDT 2007


On Mon, 2007-06-04 at 17:01 +0200, Lennart Poettering wrote:
> 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.

No problem.

> > 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.

Sure, your call.

> 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.

Hmm. 

> 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. 

Agree.

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

Sure, I didn't want to be argumentative, I just thought it might warrant
discussion.

> 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!)

Heh, my flame-proof suit is a little burnt today :-)

I'll do the mapping in HAL. I'll russle up a patch in a few mins.

Richard.




More information about the hal mailing list