From bb7386472466e55f75df024d18e8da37a222bb41 Mon Sep 17 00:00:00 2001 From: "kay.sievers@vrfy.org" Date: Mon, 16 Feb 2004 21:39:40 -0800 Subject: [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. --- test/udev-test.pl | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'test') 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 @@ -191,6 +191,16 @@ EOF expected => "Major:8:minor:3:kernelnumber:3:bus:0:0:0:0" , conf => < "select sysfs attribute by SYSFS{vendor}", + subsys => "block", + devpath => "block/sda", + expected => "disk-IBM-ESXS-sda" , + conf => <