From owner-freebsd-current@FreeBSD.ORG Sun Oct 25 02:39:38 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 E84A4106566C for ; Sun, 25 Oct 2009 02:39:38 +0000 (UTC) (envelope-from chmeeedalf@gmail.com) Received: from mail-gx0-f218.google.com (mail-gx0-f218.google.com [209.85.217.218]) by mx1.freebsd.org (Postfix) with ESMTP id 9F01E8FC0C for ; Sun, 25 Oct 2009 02:39:38 +0000 (UTC) Received: by gxk10 with SMTP id 10so9330561gxk.3 for ; Sat, 24 Oct 2009 19:39:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:sender:received:in-reply-to :references:date:x-google-sender-auth:message-id:subject:from:to:cc :content-type; bh=DFe8f2NAMa5wVMVObmPtYaqoalELVqQFOqj+Ludux18=; b=yGSbG5fvmhcO8Zns1NAbJC+vXD/AsUWr9m31fCsvkvIbu3o4u2fBwN4QBIJckpbPzo dCLRgKev23j8Brnya8B3+HhIE9C2/8g36Sh+vGiaTYYXUyE7zzESCcNAzp1A3cepDqtV YvPK10VzA099gfR0U5dETR69CE4W6dRJtkxEs= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type; b=VWP6kKWwzOLgDpPJj6NfxKMK1NL1dYWRIU+H/0wlrSRCA4zl7DX5CiGHeehx8GAfmo 62gY0CjCSZ70Ova0PlfnDtjJ+QGSjssrE7IkP4jbANcVSBbML23SIGLoySeqr3HpYm14 ZJf2yRTENxYuUrebhtosrs75UHBSGPeez6ppU= MIME-Version: 1.0 Sender: chmeeedalf@gmail.com Received: by 10.101.49.11 with SMTP id b11mr611905ank.121.1256436422821; Sat, 24 Oct 2009 19:07:02 -0700 (PDT) In-Reply-To: References: Date: Sat, 24 Oct 2009 22:07:02 -0400 X-Google-Sender-Auth: 6936e7bf4e33478b Message-ID: From: Justin Hibbits To: Warren Block Content-Type: text/plain; charset=ISO-8859-1 X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: current@freebsd.org Subject: Re: 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:39:39 -0000 On Sat, Oct 24, 2009 at 10:00 PM, Warren Block wrote: > 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 > Check devfs.rules(5)