Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 9 Jan 2009 14:40:14 -0600
From:      "Rick C. Petty" <rick-freebsd2008@kiwi-computer.com>
To:        perryh@pluto.rain.com
Cc:        freebsd-hackers@freebsd.org
Subject:   Re: /dev/dsp* & /dev/audio* devices not present
Message-ID:  <20090109204014.GA83381@keira.kiwi-computer.com>
In-Reply-To: <4966e5b7.sTBBp%2BJY%2BDDMKG47%perryh@pluto.rain.com>
References:  <20090107181032.GA2808@rebelion.Sisis.de> <1231398405.2842.1.camel@daemon2.partygaming.local> <20090108080708.GE1462@roadrunner.spoerlein.net> <4966e5b7.sTBBp%2BJY%2BDDMKG47%perryh@pluto.rain.com>

next in thread | previous in thread | raw e-mail | index | archive | help
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20090109204014.GA83381>