diff options
author | kay.sievers@vrfy.org <kay.sievers@vrfy.org> | 2004-02-16 21:39:40 -0800 |
---|---|---|
committer | Greg KH <gregkh@suse.de> | 2005-04-26 21:32:28 -0700 |
commit | bb7386472466e55f75df024d18e8da37a222bb41 (patch) | |
tree | 7d4af2ceff39fd29a623801207e85e46378e133e /test/udev-test.pl | |
parent | a27cd06c6d3c83d9906f5e1aaf8d3c4b32055830 (diff) |
[PATCH] allow SYSFS{file}
On Sun, Feb 15, 2004 at 03:36:00AM +0100, Kay Sievers wrote:
>
> Since we have %s{file} it may be nice to allow SYSFS{file}.
> This patch allows:
>
> BUS="usb", SYSFS{idProduct}="a511", NAME="video%n"
>
> compared to the current:
>
> BUS="usb", SYSFS_idProduct="a511", NAME="video%n"
>
> The curent syntax is still supported.
> Looks a bit nicer and less hackish, I think.
Better patch with infrastructure to easily implement KEY{attribute}
for every other key. The first user is the SYSFS{file} key.
Both versions, brackets or underscore is supported for the attribute.
Diffstat (limited to 'test/udev-test.pl')
-rw-r--r-- | test/udev-test.pl | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/test/udev-test.pl b/test/udev-test.pl index cbe110f797..abe622cf8a 100644 --- a/test/udev-test.pl +++ b/test/udev-test.pl @@ -194,6 +194,16 @@ BUS="scsi", PLACE="0:0:0:0", NAME="Major:%M:minor:%m:kernelnumber:%n:bus:%b" EOF }, { + desc => "select sysfs attribute by SYSFS{vendor}", + subsys => "block", + devpath => "block/sda", + expected => "disk-IBM-ESXS-sda" , + conf => <<EOF +BUS="scsi", SYSFS{vendor}="IBM-ESXS", NAME="disk-%s{vendor}-%k" +KERNEL="ttyUSB0", NAME="visor" +EOF + }, + { desc => "sustitution of sysfs value (%s{file})", subsys => "block", devpath => "block/sda", |