Project

General

Profile

Actions

Bug #1616

closed

hotplug notification

Added by polachok almost 15 years ago. Updated over 14 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Category:
-
Target version:
-
Start date:
Due date:
% Done:

0%

Estimated time:

Description

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

Actions

Also available in: Atom PDF