From owner-freebsd-arch@FreeBSD.ORG Wed Sep 1 17:02:00 2004 Return-Path: Delivered-To: freebsd-arch@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 6109916A4CE for ; Wed, 1 Sep 2004 17:02:00 +0000 (GMT) Received: from green.homeunix.org (pcp04368961pcs.nrockv01.md.comcast.net [69.140.212.7]) by mx1.FreeBSD.org (Postfix) with ESMTP id 02C4843D45 for ; Wed, 1 Sep 2004 17:02:00 +0000 (GMT) (envelope-from green@green.homeunix.org) Received: from green.homeunix.org (green@localhost [127.0.0.1]) by green.homeunix.org (8.13.1/8.13.1) with ESMTP id i81H1xKF086046; Wed, 1 Sep 2004 13:01:59 -0400 (EDT) (envelope-from green@green.homeunix.org) Received: (from green@localhost) by green.homeunix.org (8.13.1/8.13.1/Submit) id i81H1tnt086045; Wed, 1 Sep 2004 13:01:55 -0400 (EDT) (envelope-from green) Date: Wed, 1 Sep 2004 13:01:54 -0400 From: Brian Fundakowski Feldman To: Sam Message-ID: <20040901170154.GG45292@green.homeunix.org> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.6i cc: freebsd-arch@freebsd.org Subject: Re: disk_create and cdevsw_add X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Sep 2004 17:02:00 -0000 On Wed, Sep 01, 2004 at 12:32:58PM -0500, Sam wrote: > 'lo again, > > kern/subr_disk.c:/^disk_create/ takes > two cdevsw types, and I only vaguely > understand why. Can someone explain it to me? > > I'm generally confused about resolving > entry points into the driver. Does a > block device only get an open() after > registering it with disk_create? > Supposing I want to set some ioctls for > an aoecontrol utility (show all devices > known, eg), what would aoecontrol open > to ioctl? Create /dev/aoectl which exists only to do global aoe things; alternately, you could use a sysctl interface, but that's not really as clean. -- Brian Fundakowski Feldman \'[ FreeBSD ]''''''''''\ <> green@FreeBSD.org \ The Power to Serve! \ Opinions expressed are my own. \,,,,,,,,,,,,,,,,,,,,,,\