From owner-freebsd-hackers@FreeBSD.ORG Wed Apr 23 14:03:38 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CBC631065675 for ; Wed, 23 Apr 2008 14:03:38 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from elvis.mu.org (elvis.mu.org [192.203.228.196]) by mx1.freebsd.org (Postfix) with ESMTP id AD18F8FC2D for ; Wed, 23 Apr 2008 14:03:38 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from zion.baldwin.cx (unknown [208.65.91.234]) by elvis.mu.org (Postfix) with ESMTP id 5762B1A4D83; Wed, 23 Apr 2008 07:03:38 -0700 (PDT) From: John Baldwin To: freebsd-hackers@freebsd.org Date: Wed, 23 Apr 2008 09:55:10 -0400 User-Agent: KMail/1.9.7 References: <480E4269.2090604@icyb.net.ua> In-Reply-To: <480E4269.2090604@icyb.net.ua> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200804230955.10390.jhb@freebsd.org> Cc: Andriy Gapon Subject: Re: devctl (alike?) for devfs X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 23 Apr 2008 14:03:38 -0000 On Tuesday 22 April 2008 03:54:17 pm Andriy Gapon wrote: > Maybe this is a crazy idea or maybe we already have something like this. > Is it possible to get notifications about changes in devfs - appearance > and disappearance of devices (in devfs sense of the word)? > devctl currently notifies about real (hardware) devices handled by > device drivers and some notifications about hardware/driver events. > But what if I want to automatically run some action if > /dev/ufs/magic-label appears? > Or if I want to monitor appearance and disappearance of ad* and da* > devices (without having to monitor low level drivers like umass)? You would just need to add new hooks to devfs to feed events to devctl when devices come and go. Other non-new-bus things like ifnet's already do this, so there is precedent. -- John Baldwin