From owner-freebsd-arch@FreeBSD.ORG Fri Feb 27 07:06:20 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 E7B3616A4D0 for ; Fri, 27 Feb 2004 07:06:20 -0800 (PST) Received: from mail6.speakeasy.net (mail6.speakeasy.net [216.254.0.206]) by mx1.FreeBSD.org (Postfix) with ESMTP id AB57543D2D for ; Fri, 27 Feb 2004 07:06:20 -0800 (PST) (envelope-from john@baldwin.cx) Received: (qmail 11404 invoked from network); 27 Feb 2004 15:06:20 -0000 Received: from dsl027-160-063.atl1.dsl.speakeasy.net (HELO server.baldwin.cx) ([216.27.160.63]) (envelope-sender ) encrypted SMTP for ; 27 Feb 2004 15:06:20 -0000 Received: from 10.50.40.205 (gw1.twc.weather.com [216.133.140.1]) by server.baldwin.cx (8.12.10/8.12.10) with ESMTP id i1RF6G28056405; Fri, 27 Feb 2004 10:06:16 -0500 (EST) (envelope-from john@baldwin.cx) From: John Baldwin To: arch@FreeBSD.org Date: Fri, 27 Feb 2004 10:07:43 -0500 User-Agent: KMail/1.6 References: <20040227230124.D2469@gamplex.bde.org> In-Reply-To: <20040227230124.D2469@gamplex.bde.org> MIME-Version: 1.0 Content-Disposition: inline Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Message-Id: <200402271007.43299.john@baldwin.cx> X-Spam-Checker-Version: SpamAssassin 2.63 (2004-01-11) on server.baldwin.cx cc: Dag-Erling =?iso-8859-1?q?Sm=F8rgrav?= Subject: Re: per-device sysctls 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: Fri, 27 Feb 2004 15:06:21 -0000 On Friday 27 February 2004 07:16 am, Bruce Evans wrote: > On Thu, 26 Feb 2004, Dag-Erling [iso-8859-1] Sm=F8rgrav wrote: > > "M. Warner Losh" writes: > > > How is this different than the sysctl stuff that already exsists for > > > this and is accessed by devinfo? > > > > 1) it is immensely easier to access > > > > 2) it gives drivers a well-defined place to put their per-device > > sysctl variables - devinfo doesn't address that issue at all > > Only broken drivers use sysctl variables. ioctl(3) is a much better > interface that sysctl(3) for accessing per-device info. sysctl(8) is > a better interface than ioctl(8) for handling the few device control > things that can be done in a generic way, but this is only because > there are so few such things that ioctl(8) doesn't exist. Note that ioctl's act on dev_t devices, not on device_t devices. We have t= wo=20 distinct notions of a device right now: physical hardware devices (new-bus)= =20 and UNIX file devices (entries in /dev). You can ioctl the latter, but not= =20 necessarily the former. =2D-=20 John Baldwin <>< http://www.baldwin.cx/~john/ "Power Users Use the Power to Serve" =3D http://www.FreeBSD.org