hotplug notification

Thomas E. Spanjaard tgen at netphreax.net
Fri Nov 27 04:18:48 PST 2009


Alexander Polakov wrote:
> I think it could be nice to receive notification for creation and
> removal of device nodes in userland. So I ported hotplug(4) and
> hotplugd(8) from OpenBSD. I like the design, it's clean and simple:
> an event contains type (attach or detach), device class (disk, tty or
> generic) and name (as in /dev). Events are queued and can be read
> from /dev/hotplug one-by-one (hotplugd(8) does that and can be
> configured to execute commands on event arrival).
> 
> You can get code to review here:
>     http://gitweb.dragonflybsd.org/~polachok/dragonfly.git/hotplug2

I've always thought kqueue would be the ideal place to put events like
this, also allowing multiple programs to listen for device events. Just
a pointer though, I have no code to show :).

Cheers,
-- 
	Thomas E. Spanjaard
	tgen at netphreax.net
	tgen at deepbone.net

Attachment:
signature.asc
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pgp00001.pgp
Type: application/octet-stream
Size: 486 bytes
Desc: "Description: OpenPGP digital signature"
URL: <http://lists.dragonflybsd.org/pipermail/submit/attachments/20091127/1ab36138/attachment-0019.obj>


More information about the Submit mailing list