On Tuesday 08 of December 2009 23:05:04 John W. Linville wrote: > On Tue, Dec 08, 2009 at 08:29:11PM +0100, Johannes Berg wrote: > > On Tue, 2009-12-08 at 13:52 -0500, John W. Linville wrote: > > > So, probably we need to map from the wlanX name to the phyY name, > > > then determine whether or not this is the first wlanX for phyY. > > > If not, then the name should be left alone. > > > > > > Now, how do we figure out how many wlanX's belong to phyY? > > > > And what's the "first" one? :) > > I suppose I was figuring that if there was only one, it was the > first. :-) But you're right, I suppose that could be racy... > > > ls /sys/class/net/wlan0/device/net/ > > > > will give you the list of interface associated with this device. > > Cool... > Is it possible to distinguish between automatic system enumeration when new device is created and explicit name that user gives? Because in example above (iw phy add interface) user already supplied specific name; there is no reason for udev to (try to) mangle it. So far the only possibility seems to check for wild card in interface name. So what about adding new event attribute NAME_AUTOGENERATED=(yes| no) and simply leaving any event with NAME_AUTOGENERATED=no alone in udev? Any immediate problems?
Attachment:
signature.asc
Description: This is a digitally signed message part.