Michael Mauch wrote:
> Maarten wrote:
> 
> 
>>All is cleared up now.  Sorry for bothering you.
> 
> 
> FWIW, you could also run "udevinfo -d" to see all your devices, and use
> the left side of its output for "udevinfo -a -p".

Wow, yes, that is a useful tip!  Thanks!

> I wonder why the -d switch is not documented neither in "udevinfo -h"
> nor in the man page.

I fully concur.

Handling the /sys/ dir for the first time when you don't yet know your
way around it can be a daunting task anyway.  Look at this little
example, which illustrates how incredibly picky udevinfo is about the
right pathname.  Only the third form prints any useful info, the first
yields an error and the second one does give some little output, but
alas nothing useful. (It is awful that the simple fact of omitting a
trailing "/" makes that much of a difference):


server mnt # udevinfo -a -p /sys/class/tty/ttyUSB0/device
couldn't get the class device

server mnt # udevinfo -a -p /sys/class/tty/ttyUSB0/device/

  looking at class device '/sys/class/tty/ttyUSB0/device':
    KERNEL=="device"
    SUBSYSTEM=="tty"
    SYSFS{detach_state}=="0"

server mnt # udevinfo -a -p /sys/class/tty/ttyUSB0

device '/sys/class/tty/ttyUSB0' has major:minor 188:0
  looking at class device '/sys/class/tty/ttyUSB0':
    KERNEL=="ttyUSB0"
    SUBSYSTEM=="tty"
    SYSFS{dev}=="188:0"

follow the "device"-link to the physical device:
  looking at the device chain at
'/sys/devices/pci0000:00/0000:00:1d.0/usb2/2-2/2-2:1.0/ttyUSB0':
    BUS=="usb-serial"
    ID=="ttyUSB0"
    DRIVER=="PL-2303"
    SYSFS{detach_state}=="0"

<snip much more info>

Maarten
-- 
gentoo-user@gentoo.org mailing list

Reply via email to