I was thinking, if we're not planning on use the chardev/kernel route. There already exists an ifindex file in /sys/class/net/XXX/ifindex. Should udev/helper be creating links to this, or is it better to keep everything under the /dev/ tree? Using this method would require the patch to udev to handle renaming events. --jordan hargrave Dell Enterprise Linux Engineering -----Original Message----- From: dann frazier [mailto:dannf@xxxxxx] Sent: Wed 10/28/2009 10:09 To: Domsch, Matt Cc: Kay Sievers; linux-hotplug@xxxxxxxxxxxxxxx; K, Narendra; netdev@xxxxxxxxxxxxxxx; Hargrave, Jordan; Rose, Charles; Ben Hutchings Subject: Re: [PATCH] udev: create empty regular files to represent net interfaces On Wed, Oct 28, 2009 at 08:03:08AM -0500, Matt Domsch wrote: > On Wed, Oct 28, 2009 at 09:23:57AM +0100, Kay Sievers wrote: [...] > > That all sounds very much like something which will hit us back some > > day. I'm not sure, if udev should publish such dead text files in > > /dev, it does not seem to fit the usual APIs/assumptions where /sys > > and /dev match, and libudev provides access to both. It all sounds > > more like a database for a possible netdevname library, which does not > > need to be public in /dev, right? > > Right, it doesn't need to be in /dev. We could have udev rules that > simply call yet another program to maintain that database, in yet > another way. Or have udev maintain them in a private directory (e.g., /var/lib/udev/netalias). Personally, I like the approach of having udev manage them as files - its an abstraction our users already get, and they don't have to learn two mechanisms when aliasing disks and nics (SYMLINK ftw). Plus there's obviously a lot of code reuse to be had (most of my patch was moving code into a common section). If we want to hide the file implementation - we could invent another udev construct that basically aliases SYMLINK (e.g. NETALIAS) that works iff the device is a netdevice. That would let us switch out implementations in the future, but would obviously be much more invasive. -- dann frazier -- To unsubscribe from this list: send the line "unsubscribe linux-hotplug" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html