On Sun, 26 Dec 2010 15:58:08 -0800, briand wrote:

> how do I know that "SerialNumber" is a valid udev key other than the
> fact that it is listed in dmesg when the device is plugged in.

(...)

Available information for the sysfs attributes can be fetched (if 
present):

http://reactivated.net/writing_udev_rules.html#sysfstree

For what I see, this means that you can use both ("sysfstree" attribute 
values and "udevinfo" ones) for writing rules, just ensure the attribute 
you are going to use is present in one of the locations from where udev 
gathers the data. 

For instance, my USB key has at least one "ATTRS{serial}" value:

s...@stt008:~$ udevinfo -a -p /sys/block/sdc | grep serial
    ATTRS{serial}=="0000:00:1a.7"

But not my internal hard disks, neither from udevinfo:

s...@stt008:~$ udevinfo -a -p /sys/block/sda | grep serial
s...@stt008:~$ udevinfo -a -p /sys/block/sdb | grep serial
s...@stt008:~$ 

Nor from sysfs:

s...@stt008:~$ ls -l /sys/block/sda | grep -i serial
s...@stt008:~$ ls -l /sys/block/sdb | grep -i serial
s...@stt008:~$ 

Greetings,

-- 
Camaleón


-- 
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org 
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/pan.2010.12.27.15.17...@gmail.com

Reply via email to