Aw: Re: mdev woes

Mike Frysinger vapier at gentoo.org
Thu Jun 28 20:22:46 UTC 2007


On Thursday 28 June 2007, Jason Curl wrote:
> Mike Frysinger wrote:
> > On Thursday 28 June 2007, Jason Curl wrote:
> >> Mike Frysinger wrote:
> >>> On Thursday 28 June 2007, Jason Curl wrote:
> >>>> As a nice feature, does it exist in the newest mdev.conf the ability
> >>>> to specify the name of the device that should be created?
> >>>
> >>> all mdev functionality is explained in docs/mdev.txt
> >>>
> >>> if you want to change the name, write a little script to do so and have
> >>> mdev.conf execute it
> >>
> >> Do all the hotplug variables set by the kernel propogate to the programs
> >> that mdev run?
> >
> > of course ... that's how the environment works, children processes
> > inherit from the parent (mdev)
> >
> >> mdev
> >> already knows about the device, so a symlink option like udev has would
> >> save flash space overall (less scripts, faster and as an option in the
> >> menuconfig would mean only those who want it would use it).
> >
> > there is a patch on the mailing list to add this ... i'm debating adding
> > it as the purpose of mdev is to provide the bare min required features;
> > if you need more, go use udev
>
> I like the link especially for 'stderr' and what not, certainly much
> faster at boot.
>
> But I'm starting to understand that everything else would be too much
> for the purposes of mdev as what I'd really like is to name a
> usb-to-serial device based on it's position in the usb-tree instead of
> what the kernel calls it. Then I can be guaranteed of a physical
> interface and not an arbitrary device number (ttyUSB*) when two of the
> same devices are connected to each USB port.
>
> At least I don't think it's easily possible from a shell script given
> what I've seen at http://linux-hotplug.sourceforge.net

guess that depends on what you mean by "easy" ;)

you can obtain it via /sys/ ... each device would be linked to the actual 
position in the usb tree if you walked enough symlinks ... i dont have any 
usb-serial devices handy so i cant post an example.

you could also check out the sysfsutils package to see if that might help ... 
but really, what you want to do is something udev excels at in its rules 
file.
-mike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 827 bytes
Desc: This is a digitally signed message part.
Url : http://lists.busybox.net/pipermail/busybox/attachments/20070628/3643f226/attachment-0002.pgp 


More information about the busybox mailing list