From owner-freebsd-current@FreeBSD.ORG Sun Oct 25 03:26:42 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 EDC96106566B for ; Sun, 25 Oct 2009 03:26:42 +0000 (UTC) (envelope-from chmeeedalf@gmail.com) Received: from mail-yx0-f171.google.com (mail-yx0-f171.google.com [209.85.210.171]) by mx1.freebsd.org (Postfix) with ESMTP id A48A48FC13 for ; Sun, 25 Oct 2009 03:26:42 +0000 (UTC) Received: by yxe1 with SMTP id 1so8998454yxe.3 for ; Sat, 24 Oct 2009 20:26:42 -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=EfWAu8b6wkI5rJyOx+pdZ4M5xOwmnqvWAAFpOSfh7B0=; b=AuCMqrQUJTlW9Id6BIhJzAWFb4fDomwmLj9SWBF1f50inswb4/YmmD/Qar61/nDpOq zfOI+TUTUCU3GvEzUfdiD2v2xkLfRi1zvPBcs1IgDaBVO6ihkV01shPMK2feGJXQsNac xQDFpvtq4jzFDRzHBSl5YJepapvq5fcrMoogo= 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=Nrhm9GiXrvkWvFIjBqdDLtZ+NBaQ3hhY5zJDS3p0kchwWmqIGF/fA1HDmbWryYfvX4 kcqpcNHqlT9xPSOTknwV6Bmrylk9jDFQmqMFZZHKoFOijh3Ji8hG9AjV6XlO5AmrxYQ+ MwOXTNyfIYnd8kcrM6C1h4FJKIJsyCKs1kF3g= MIME-Version: 1.0 Sender: chmeeedalf@gmail.com Received: by 10.100.56.17 with SMTP id e17mr2861566ana.100.1256441201954; Sat, 24 Oct 2009 20:26:41 -0700 (PDT) In-Reply-To: References: Date: Sat, 24 Oct 2009 23:26:41 -0400 X-Google-Sender-Auth: a71b709e72e17168 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 03:26:43 -0000 On Sat, Oct 24, 2009 at 11:19 PM, Warren Block wrote: > On Sat, 24 Oct 2009, Justin Hibbits wrote: > > 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? >>> >> >> Check devfs.rules(5) >> > > I did, but maybe missed the relevant information. There are conditions to > match and modify (perm/owner) a node, but none to create or delete one. > Maybe something with unhide? Could you post an example? > > > -Warren Block * Rapid City, South Dakota USA > I guess I misread your original post. Why do you want to add actions based on the creation of the uscanner node?