Devices related notifications from kernel to userspace

Hasso Tepper hasso at estpak.ee
Thu Dec 27 05:41:05 PST 2007


I need the mechanism to get device related notifications from the kernel 
to the userspace. It can be used for a lot of stuff, but I'm mainly 
interested in two:

* device appearance/disappearance and network interfaces state changes to 
  manage different network configurations automatically
* all kind of notifications (hotkeys etc) from ACPI to support Lenovo
  thinkpads (these are not handled in hardware any more).

I looked around and seems that devd(8) in FreeBSD is almost exactly what I 
need. I also like a simple approach of devd(8) and devctl(4). Is anyone 
aware of similar stuff I can look at? Opinions regarding bringing devd(8) 
into DragonFly?

Yes, I know about hal and friends, but I'd like to keep this stuff away 
from my machines. In fact I think that it's insane to have such complex 
stuff to solve so simple things. I'm also aware that I could write 
trivial daemon to use route socket to get network related notifications, 
but it wouldn't cover ACPI stuff.

Brief look at devctl/devd code raised one question already which is beyond 
my current knowledge - it uses condvar(9) we don't have in the kernel. 
Any recommendations how to handle this in porting?


-- 
Hasso Tepper





More information about the Kernel mailing list