Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 43691 - udev rules oss midi broken, proposed changes
Summary: udev rules oss midi broken, proposed changes
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All All
: High normal (vote)
Assignee: Greg Kroah-Hartman (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-03-04 01:49 UTC by Jordan
Modified: 2004-04-02 15:49 UTC (History)
4 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
patch to udev.rules (udev.patch,1.82 KB, patch)
2004-03-04 01:50 UTC, Jordan
Details | Diff
further simplified (udev.patch,1.75 KB, patch)
2004-03-04 01:58 UTC, Jordan
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jordan 2004-03-04 01:49:16 UTC
the current udev.rules file has the line
KERNEL="midi[CD0-9]*",   NAME="snd/%k"
to capture alsa midi devices. This also captures oss midi devices other then than /dev/midi incorrectly. For example, /dev/midi2 doesn't show up properly, it's showing up in /dev/snd/midi2, it's being grabbed by the regex which it shouldn't be.

Changing this to
KERNEL="midiC[D0-9]*",   NAME="snd/%k"
solves the problem.

In my patch (which will be posted as soon as I submit this,) as well as fixing this, it also puts all oss devices into /dev/sound and links them back to /dev. The current udev.rules only does this partially. The way I did it is a little more complex then it has to be, it seems udev regex doesn't work properly. AFAIK, something like dsp[0-9]* should grab "dsp" as well as "dsp1" "dsp2" etc, but it's only grabbing things it matches. It's acting like * means "one or more" when it should be "zero or more." I see something similar to what I did in the udev rules in the "vc devices" section so apparently I'm not the first to realize this.
Comment 1 Jordan 2004-03-04 01:50:45 UTC
Created attachment 26814 [details, diff]
patch to udev.rules

patch to the default udev.rules (${FILESDIR}/udev.rules-18)
Comment 2 Jordan 2004-03-04 01:58:35 UTC
Created attachment 26815 [details, diff]
further simplified

this just swaps a few names with %k to shorten things up.
Comment 3 Dan A. Dickey 2004-03-11 14:27:16 UTC
Re: the initial comment.

Jordan,
I belive you are confusing regex pattern matching and glob patterns.
if you do a:
$ ls /dev/dsp[0-9]*
you will never see "/dev/dsp" listed, nor should you.
Comment 4 Jordan 2004-03-11 14:35:32 UTC
I see now, thanks. The patch still takes care of it so it's no big deal anyway, just would have been a lot nicer if I could have done it with fewer lines.
Comment 5 Greg Kroah-Hartman (RETIRED) gentoo-dev 2004-03-20 11:33:09 UTC
This isn't needed anymore, correct?
Comment 6 Jordan 2004-03-20 17:10:15 UTC
as far as I know despite udev 022 being released, this problem is still there, as it's not a udev problem, it's because the rules written in udev.rules are grabbing more then they should (midi2 for example) and not enough in other cases (only grabbing and putting some, not all, dsp devices into /dev/sound.)
Comment 7 Greg Kroah-Hartman (RETIRED) gentoo-dev 2004-03-20 17:28:09 UTC
Ok, I'll look into fixing this for the next udev release.
Comment 8 Greg Kroah-Hartman (RETIRED) gentoo-dev 2004-04-02 15:49:29 UTC
fixed in 024 release.