From owner-freebsd-current@FreeBSD.ORG Sun Oct 25 02:00:54 2009 Return-Path: Delivered-To: current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5EBA0106566B for ; Sun, 25 Oct 2009 02:00:54 +0000 (UTC) (envelope-from wblock@wonkity.com) Received: from wonkity.com (wonkity.com [67.158.26.137]) by mx1.freebsd.org (Postfix) with ESMTP id 1E7108FC0C for ; Sun, 25 Oct 2009 02:00:53 +0000 (UTC) Received: from wonkity.com (localhost [127.0.0.1]) by wonkity.com (8.14.3/8.14.3) with ESMTP id n9P20rRH023974 for ; Sat, 24 Oct 2009 20:00:53 -0600 (MDT) (envelope-from wblock@wonkity.com) Received: from localhost (wblock@localhost) by wonkity.com (8.14.3/8.14.3/Submit) with ESMTP id n9P20rP4023971 for ; Sat, 24 Oct 2009 20:00:53 -0600 (MDT) (envelope-from wblock@wonkity.com) Date: Sat, 24 Oct 2009 20:00:53 -0600 (MDT) From: Warren Block To: current@freebsd.org Message-ID: User-Agent: Alpine 2.00 (BSF 1167 2008-08-23) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; format=flowed; charset=US-ASCII X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.2.2 (wonkity.com [127.0.0.1]); Sat, 24 Oct 2009 20:00:53 -0600 (MDT) Cc: Subject: Creating /dev links to dynamic devices X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 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: Sun, 25 Oct 2009 02:00:54 -0000 devfs.conf allows creating static device links: link acd0 cdrom This only runs on devfs startup, so it's useless for creating a link to a dynamic device. The specific example is for scanners. My scanner is ugen2.3, but only as long as it is plugged into the same USB hub/port each time. I can manually create a uscanner0 link in /dev with devd.conf: attach 20 { device-name "ugen[0-9]+"; match "vendor" "0x04b8"; match "product" "0x010a"; action "/bin/ln -sf /dev/$device-name /dev/uscanner0; /sbin/devfs rule applyset"; }; Using /dev/uscanner0 then works in place of ugen2.3. Now the second part of the example: I want devd to recognize the attach or creation of uscanner0. But it's not a true devfs device; devd doesn't see an attach event, or a notify CDEV/CREATE event. Is there a method to create a true devfs link to a dynamic device? -Warren Block * Rapid City, South Dakota USA