Snd_ich/pcm, Devfs or ls bug?

Andre Guibert de Bruet andy at siliconlandmark.com
Thu Jan 1 18:17:30 PST 2004


On Thu, 1 Jan 2004, Ryan Sommers wrote:

> Came across this little oddity while playing with audio:
>
> root at lilshadow(/sys/dev/sound/pci):cd /dev
> root at lilshadow(/dev):ls -l mixer*
> crw-rw-rw-  1 root  wheel   30,   0 Jan  1 00:41 mixer0
> root at lilshadow(/dev):ls -l mixer
> crw-rw-rw-  1 root  wheel   30,   0 Jan  1 00:41 mixer
> root at lilshadow(/dev)
>
> I don't believe this is an ls(1) bug since an audio app couldn't find
> /dev/mixer. Trying to symlink mixer0 to mixer fails with file exists as
> well.
>
> If you need any more info let me know.
>
> PS If the problem is in ls(1) there is a patch on bin/59320 to fix a
> formatting issue with the '-h' option.

Ryan,

This is a FAQ. FreeBSD supports on-the-fly device creation. This means
that a device might exist when lstat() is called on it but it will not be
found when readdir() steps through the /dev directory.

Regards,

> Andre Guibert de Bruet | Enterprise Software Consultant >
> Silicon Landmark, LLC. | http://siliconlandmark.com/    >


More information about the freebsd-current mailing list