From owner-freebsd-hackers@FreeBSD.ORG Fri Jan 9 20:40:16 2009 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 B235910656DF for ; Fri, 9 Jan 2009 20:40:16 +0000 (UTC) (envelope-from rick@kiwi-computer.com) Received: from kiwi-computer.com (keira.kiwi-computer.com [63.224.10.3]) by mx1.freebsd.org (Postfix) with SMTP id 483D68FC1F for ; Fri, 9 Jan 2009 20:40:16 +0000 (UTC) (envelope-from rick@kiwi-computer.com) Received: (qmail 83436 invoked by uid 2001); 9 Jan 2009 20:40:15 -0000 Date: Fri, 9 Jan 2009 14:40:14 -0600 From: "Rick C. Petty" To: perryh@pluto.rain.com Message-ID: <20090109204014.GA83381@keira.kiwi-computer.com> References: <20090107181032.GA2808@rebelion.Sisis.de> <1231398405.2842.1.camel@daemon2.partygaming.local> <20090108080708.GE1462@roadrunner.spoerlein.net> <4966e5b7.sTBBp+JY+DDMKG47%perryh@pluto.rain.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4966e5b7.sTBBp+JY+DDMKG47%perryh@pluto.rain.com> User-Agent: Mutt/1.4.2.3i Cc: freebsd-hackers@freebsd.org Subject: Re: /dev/dsp* & /dev/audio* devices not present X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: rick-freebsd2008@kiwi-computer.com List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Jan 2009 20:40:17 -0000 On Thu, Jan 08, 2009 at 09:50:47PM -0800, perryh@pluto.rain.com wrote: > > In principle, everything that would be successfully created if > open(2)'ed. It doesn't necessarily need to actually create them, > but the results from readdir(2) should be as if they had been > created. The whole point of things like ls(1) and readdir(2) is > to find out what-all is available to be opened, without having to > already know the answer. That's not how devfs works. It's actually a feature that devfs doesn't list everything ever possible (things looked terrible back in the old MAKEDEV days with all those polluted names). I'd rather be able to list to see things that are in use, although at first glance I didn't like devfs hidden nodes. Otherwise you'd be stuck printing tunXXX through infinity instead of this: % ls /dev/tun* /dev/tun0 /dev/tun115 /dev/tun194 Maybe you could argue that dsp should work differently, but some sound cards and configurations would give you infinite (within reason) device nodes, IIRC. > > This is a FAQ really. > > It may be an FAQ, but it is also a bug, granted one that may not be > easy to fix. This is not a bug, it is designed behavior. It was intentionally written to dynamically create device nodes when needed. -- Rick C. Petty