Problem with mdev, wildcards and subdirectory renaming

Natanael Copa natanael.copa at gmail.com
Fri Oct 10 08:22:42 UTC 2008


On Fri, 2008-10-10 at 16:14 +0800, Scott McNab wrote:
> Hi.
> 
> I'm using busybox 1.12.1 and linux kernel 2.6.26.5 and am trying to
> get mdev to correctly place the ALSA sound devices under /dev/snd/,
> using wildcard device matching.
> 
> Here is an excerpt from my /etc/mdev.conf file:
> 
> hwC* 0:18 0660 =snd/
> pcmC* 0:18 0660 =snd/
> midiC* 0:18 0660 =snd/
> controlC* 0:18 0660 =snd/
> 
> This does NOT work as expected - the devices are created in /dev
> rather than /dev/snd.
> 
> The strange thing however is that it DOES work if I specify the full
> device name. i.e.:
> 
> pcmC0D0c 0:18 0660 =snd/
> pcmC0D0p 0:18 0660 =snd/
> 
> Why does it work if I specify the full device name, and now when I use
> a wildcard? Am I missing something, or is this a bug?

Yes. You are missing that mdev.conf does not use wildcards but regexps.

This should do the trick for you:

# alsa sound devices and audio stuff
pcm.*           root:audio 0660 =snd/
control.*       root:audio 0660 =snd/
midi.*          root:audio 0660 =snd/
seq             root:audio 0660 =snd/
timer           root:audio 0660 =snd/

And if you use snd-pcm-oss:

adsp            root:audio 0660 >sound/
audio           root:audio 0660 >sound/
dsp             root:audio 0660 >sound/
mixer           root:audio 0660 >sound/
sequencer.*     root:audio 0660 >sound/

-nc






More information about the busybox mailing list