1 |
Michael Mauch wrote: |
2 |
> Maarten wrote: |
3 |
> |
4 |
> |
5 |
>>All is cleared up now. Sorry for bothering you. |
6 |
> |
7 |
> |
8 |
> FWIW, you could also run "udevinfo -d" to see all your devices, and use |
9 |
> the left side of its output for "udevinfo -a -p". |
10 |
|
11 |
Wow, yes, that is a useful tip! Thanks! |
12 |
|
13 |
> I wonder why the -d switch is not documented neither in "udevinfo -h" |
14 |
> nor in the man page. |
15 |
|
16 |
I fully concur. |
17 |
|
18 |
Handling the /sys/ dir for the first time when you don't yet know your |
19 |
way around it can be a daunting task anyway. Look at this little |
20 |
example, which illustrates how incredibly picky udevinfo is about the |
21 |
right pathname. Only the third form prints any useful info, the first |
22 |
yields an error and the second one does give some little output, but |
23 |
alas nothing useful. (It is awful that the simple fact of omitting a |
24 |
trailing "/" makes that much of a difference): |
25 |
|
26 |
|
27 |
server mnt # udevinfo -a -p /sys/class/tty/ttyUSB0/device |
28 |
couldn't get the class device |
29 |
|
30 |
server mnt # udevinfo -a -p /sys/class/tty/ttyUSB0/device/ |
31 |
|
32 |
looking at class device '/sys/class/tty/ttyUSB0/device': |
33 |
KERNEL=="device" |
34 |
SUBSYSTEM=="tty" |
35 |
SYSFS{detach_state}=="0" |
36 |
|
37 |
server mnt # udevinfo -a -p /sys/class/tty/ttyUSB0 |
38 |
|
39 |
device '/sys/class/tty/ttyUSB0' has major:minor 188:0 |
40 |
looking at class device '/sys/class/tty/ttyUSB0': |
41 |
KERNEL=="ttyUSB0" |
42 |
SUBSYSTEM=="tty" |
43 |
SYSFS{dev}=="188:0" |
44 |
|
45 |
follow the "device"-link to the physical device: |
46 |
looking at the device chain at |
47 |
'/sys/devices/pci0000:00/0000:00:1d.0/usb2/2-2/2-2:1.0/ttyUSB0': |
48 |
BUS=="usb-serial" |
49 |
ID=="ttyUSB0" |
50 |
DRIVER=="PL-2303" |
51 |
SYSFS{detach_state}=="0" |
52 |
|
53 |
<snip much more info> |
54 |
|
55 |
Maarten |
56 |
-- |
57 |
gentoo-user@g.o mailing list |