From owner-freebsd-current@FreeBSD.ORG Thu Dec 11 20:03:39 2003 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 66AF416A4CE for ; Thu, 11 Dec 2003 20:03:39 -0800 (PST) Received: from harmony.village.org (rover.bsdimp.com [204.144.255.66]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2725043D36 for ; Thu, 11 Dec 2003 20:03:36 -0800 (PST) (envelope-from imp@bsdimp.com) Received: from localhost (warner@rover2.village.org [10.0.0.1]) by harmony.village.org (8.12.10/8.12.9) with ESMTP id hBC43U3u000378; Thu, 11 Dec 2003 21:03:30 -0700 (MST) (envelope-from imp@bsdimp.com) Date: Thu, 11 Dec 2003 21:00:05 -0700 (MST) Message-Id: <20031211.210005.42155516.imp@bsdimp.com> To: barney@databus.com From: "M. Warner Losh" In-Reply-To: <20031212021438.GA18921@pit.databus.com> References: <20031212014907.GA86634@kate.fud.org.nz> <20031212021438.GA18921@pit.databus.com> X-Mailer: Mew version 2.1 on Emacs 21.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit cc: current@freebsd.org Subject: Re: devd & ukbd X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 12 Dec 2003 04:03:39 -0000 In message: <20031212021438.GA18921@pit.databus.com> Barney Wolff 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