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

Re: matching udev attribute keys



On Mon, Dec 27, 2010 at 10:17 AM, 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.
>
> 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"
>
> But not my internal hard disks, neither from udevinfo:
>
> sm01@stt008:~$ udevinfo -a -p /sys/block/sda | grep serial
> sm01@stt008:~$ udevinfo -a -p /sys/block/sdb | grep serial
> sm01@stt008:~$

Question:

You use the equivalent of "udevadm info --attribute-walk --path=/sys/block/sda".

What if you use "udevadm info --query=property --path=/sys/block/sda"
and it outputs an "ID_SERIAL"? Can it be used in a udev rule?


Reply to: