devctl (alike?) for devfs

John Baldwin jhb at freebsd.org
Wed Apr 23 14:03:38 UTC 2008


On Tuesday 22 April 2008 03:54:17 pm Andriy Gapon wrote:
> Maybe this is a crazy idea or maybe we already have something like this.
> Is it possible to get notifications about changes in devfs - appearance
> and disappearance of devices (in devfs sense of the word)?
> devctl currently notifies about real (hardware) devices handled by
> device drivers and some notifications about hardware/driver events.
> But what if I want to automatically run some action if
> /dev/ufs/magic-label appears?
> Or if I want to monitor appearance and disappearance of ad* and da*
> devices (without having to monitor low level drivers like umass)?

You would just need to add new hooks to devfs to feed events to devctl when 
devices come and go.  Other non-new-bus things like ifnet's already do this, 
so there is precedent.

-- 
John Baldwin


More information about the freebsd-hackers mailing list