hotplug notification

看板DFBSD_submit作者時間16年前 (2009/11/27 07:32), 編輯推噓0(000)
留言0則, 0人參與, 最新討論串1/3 (看更多)
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
文章代碼(AID): #1B3m_rKX (DFBSD_submit)
文章代碼(AID): #1B3m_rKX (DFBSD_submit)