[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: matching udev attribute keys



On Mon, 27 Dec 2010 15:17:01 +0000 (UTC)
Camaleón <noelamac@gmail.com> wrote:

> 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:
> 
> sm01@stt008:~$ udevinfo -a -p /sys/block/sdc | grep serial
>     ATTRS{serial}=="0000:00:1a.7"
> 

the scroogle provides:

$ udevinfo -a -p $(udevinfo -q path -n /dev/ttyS1)
# NOTE: Debian sid has renamed this utility to udevadm. The equivalent
command is below: # udevadm info --name=/dev/ttyS1 --attribute-walk

Brian


Reply to: