On Tue, Nov 30, 2004 at 09:17:26PM -0500, Edwin Olson wrote: > At the risk of beating a dead horse... > > >You can work backwards from a /dev node to the sysfs /class path using > >udevinfo: > > udevinfo -n /dev/tts/USB0 -q all > > P: /class/tty/ttyUSB0 > > N: tts/USB0 > > S: > > > >From the "P:" line above, you can follow the "device" symlink in that > >directory to get to the directory that you need, right? > > > > > Will udev *always* return a /class path, or might it sometimes return a > /device path or a /bus path? Is this behavior defined?
P: will always return the location in the sysfs tree for the device that created the node. Only devices in /sys/block/* or /sys/class/* provide information to userspace to create device nodes. Symlinks in those sysfs directories, then point back to a location in the /sys/device/ directory, for which there will also be other symlinks to the /sys/bus/ directories. Just remember, sysfs is, "A web woven by a spider on drugs"[1] and everything will become more clear :) thanks, greg k-h [1] a quote from lwn.net that I can't find at this moment, sorry. ------------------------------------------------------- SF email is sponsored by - The IT Product Guide Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now. http://productguide.itmanagersjournal.com/ _______________________________________________ [EMAIL PROTECTED] To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-devel
