/dev/dsp* & /dev/audio* devices not present

perryh at pluto.rain.com perryh at pluto.rain.com
Thu Jan 8 22:01:02 PST 2009


Ulrich Spoerlein <gmail.com!uspoerlein at agora.rdrop.com> wrote:

> Please run
> % cat /dev/sndstat
> % ls -l /dev/dsp0 /dev/dsp0.0
>
> The reason you are not seeing them with 'ls /dev/dsp*' is because
> devfs is creating the nodes when they are open(2)'ed. Using shell
> globbing will search the output of readdir(2) for matches to dsp*
> where devfs has no way of dynamically creating nodes (which ones
> should it create anyway?)

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.

> 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.


More information about the freebsd-hackers mailing list