mdev

Denys Vlasenko vda.linux at googlemail.com
Sun Apr 19 02:03:27 UTC 2009


Hi,

On Sunday 19 April 2009 02:41, Rob Landley wrote:
> On Saturday 18 April 2009 09:10:47 Vladimir Dronnikov wrote:
> > > So you want them to share code, but not worry about a speed/functionality
> > > tradeoff between two different users of the share code which have
> > > conflicting goals. And you believe refactoring will achieve this...
> >
> > I want to not touch "mdev -s" branch. I want to add some lines of code
> > to _hotplug_ part. If the code of mdev as whole is considered stable
> > enough, I just proposed to not touch mdev and make another tester
> > applet. Just that I meant.
> 
> So you wouldn't be reusing any of the existing code in mdev?  (Otherwise, 
> you're going to have to touch it, because it doesn't export anything outside 
> of its file...)

I think there is not need to add new applet. We have users, and
therefore should not change API without a good reason.

"'hotplug' sounds nicer than 'mdev'" is not such a reason.

I'd formulate the goal of this discussion this way:

Is there some devices which fail to show up when we do:

echo /bin/mdev > /proc/sys/kernel/hotplug
mdev -s

at system boot? If yes, then:

(a) why?
(b) how udev achieves that?
(c) what is the minimal and reasonably clean way to make them appear?

> I just did:
> 
>   find . -name "modalias" | xargs cat
> 
> And got back lots of:
> 
> pci:v00008086d000027CBsv00001028sd000001BDbc0Csc03i00
> usb:v0000p0000d0206dc09dsc00dp00ic09isc00ip00
> pci:v00008086d000027CCsv00001028sd000001BDbc0Csc03i20
> usb:v0000p0000d0206dc09dsc00dp01ic09isc00ip00
> pci:v00008086d00002448sv00000000sd00000000bc06sc04i01
> pci:v000014E4d0000170Csv00001028sd000001AFbc02sc00i00
> pci:v00001180d00000832sv00001028sd000001BDbc0Csc00i10
> pci:v00001180d00000822sv00001028sd000001BDbc08sc05i01
> pci:v00001180d00000843sv00001028sd000001BDbc08sc80i00
> pci:v00001180d00000592sv00001028sd000001BDbc08sc80i00
> pci:v00001180d00000852sv00001028sd000001BDbc08sc80i00
> pci:v00008086d000027B9sv00001028sd000001BDbc06sc01i00
> pci:v00008086d000027C4sv00001028sd000001BDbc01sc01i80
> scsi:t-0x00
> scsi:t-0x05
> pci:v00008086d000027DAsv00001028sd000001BDbc0Csc05i00

These look like they cam be given to modprobe as modules aliases.
We can either make "mdev -s" do it or invent new "mdev -d".
IIUC it won't need to do anything more, as successful modprobe
will result in a hotplug event, and mdev-as-hotplug will handle it.

Will there be problems with this approach?
--
vda



More information about the busybox mailing list