Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 11 Dec 2003 21:00:05 -0700 (MST)
From:      "M. Warner Losh" <imp@bsdimp.com>
To:        barney@databus.com
Cc:        current@freebsd.org
Subject:   Re: devd & ukbd
Message-ID:  <20031211.210005.42155516.imp@bsdimp.com>
In-Reply-To: <20031212021438.GA18921@pit.databus.com>
References:  <20031212014907.GA86634@kate.fud.org.nz> <20031212021438.GA18921@pit.databus.com>

next in thread | previous in thread | raw e-mail | index | archive | help
In message: <20031212021438.GA18921@pit.databus.com>
            Barney Wolff <barney@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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20031211.210005.42155516.imp>