devd & ukbd
M. Warner Losh
imp at bsdimp.com
Thu Dec 11 20:03:39 PST 2003
In message: <20031212021438.GA18921 at pit.databus.com>
Barney Wolff <barney at databus.com> writes:
: On Fri, Dec 12, 2003 at 02:49:07PM +1300, Andrew Thompson wrote:
: >
: > I am trying to put together a devd rule for attaching a usb keyboard. The
: > problem is that the usb device is called ukbd0 while the keyboard needs to
: > be referred to as kbd1.
: >
: > attach 10 {
: > device-name "ukbd[0-9]+";
: > action "kbdcontrol -k /dev/$device-name < /dev/console";
: > };
: > detach 10 {
: > device-name "ukbd[0-9]+";
: > action "kbdcontrol -k /dev/kbd0";
: > };
: >
: > This obviously doesnt work as /dev/ukbd0 doesnt exist, anyone know a way
: > in devd to translate it to /dev/kbd1?
devd deals with device_t things, not dev_t. Typically, but not
always, there's a device_t -> dev_t naming convetion. With the
keyboard stuff, /dev/kbd* isn't a real device, but a virtual one
(well, there are many folks named differently that attach to it).
: > maybe something like kbd($device-number + 1)
No.
: > A better solution would be if the kbd1 device caused a devd event when
: > attached, which it does not seem to.
There's nothing similar to /dev entires coming and going in devd yet.
I plan on implementing it when I get some free time.
Warner
More information about the freebsd-current
mailing list