"mdev: remove undocumented subsystem/devname matching hack" disaster.

Piotr Karbowski piotr.karbowski at gmail.com
Sat Jun 29 15:56:45 UTC 2013


On 05/15/2013 05:18 PM, Piotr Karbowski wrote:
> On 05/13/2013 03:54 AM, Denys Vlasenko wrote:
>> On Sunday 12 May 2013 22:43, Piotr Karbowski wrote:
>>> On 05/12/2013 04:21 PM, Denys Vlasenko wrote:
>>>> On Sunday 12 May 2013 16:19, Denys Vlasenko wrote:
>>>>>>>>>   From $DEVNAMEs I saw it looks like using it makes sense:
>>>>>>>> kernel already tells us the subdir, no need to code it up
>>>>>>>> in the rules.
>>>>>>>
>>>>>>> If so, then mdev -s needs a way to support this, somehow to get the
>>>>>>> snd/X, if that's not possible, I would highly suggest to basename
>>>>>>> $MDEV.
>>>>>
>>>>> Looks like getting snd/X is not possible
>>>>>
>>>>>>> Other, ugly but possible workaround would be for me to put a
>>>>>>> thingy in
>>>>>>> catch-all script to check if $MDEV contain slash (and since it hit
>>>>>>> catch-all it wasn't handled), if it does, then basename it,
>>>>>>> export MDEV,
>>>>>>> DEVPATH etc and exec /sbin/mdev. Sounds better than in-mdev
>>>>>>> basenaming it?
>>>>>>
>>>>>> Hey Denys, any news or comment on this? I'd like to roll out new
>>>>>> mdev on
>>>>>> some of my deployments however I don't want do any workaround like
>>>>>> described above if thats not desired solution to this very issue.
>>>>>
>>>>> I don't know.
>>>>>
>>>>> I don't want to ignore $DEVNAME. Its information is too useful.
>>>>>
>>>>> Maybe we need to teach kernel to export DEVNAME in sysfs.
>>>>
>>>> I spoke too soon! It is available:
>>>>
>>>> # cat /sys/devices/pci0000:00/0000:00:07.0/sound/card0/controlC0/uevent
>>>> MAJOR=116
>>>> MINOR=7
>>>> DEVNAME=snd/controlC0
>>>> ^^^^^^^^^^^^^^^^^^^^^
>>>>
>>>> and I even have a patch...
>>>>
>>>
>>> so all we need is mdev -s support for the DEVNAME from uevent and it
>>> should be all right.
>>
>> I updated
>> http://busybox.net/downloads/fixes-1.21.0/busybox-1.21.0-mdev.patch
>> with the "DEVNAME from uevent" code.
>>
>> Can you test it?
>>
>
> Denys, its awesome.
>
> Works flawless and now I can drop some rules like event[0-9]* =input/
> because mdev will already put it into input subdir. Thanks.

Denys, when you want to merge this patch into mainline busybox?

-- Piotr.



More information about the busybox mailing list