chiark / gitweb /
ATTR{}== always fails if the attribute does not exist
authorKay Sievers <kay.sievers@vrfy.org>
Wed, 29 Oct 2008 21:22:12 +0000 (22:22 +0100)
committerKay Sievers <kay.sievers@vrfy.org>
Wed, 29 Oct 2008 21:22:12 +0000 (22:22 +0100)
TODO
udev/udev-rules.c
udev/udev.xml

diff --git a/TODO b/TODO
index 054d52f9848d5348d22566859f2b024a0380e821..a8d3fc0515fe5a1ca6b790f48cf6e5a04a124ee7 100644 (file)
--- a/TODO
+++ b/TODO
@@ -1,3 +1,4 @@
+
   o add DVB variables to kernel (patch sent), and drop shell script rule
   o DEVTYPE for disks is set by the kernel, they will be removed from
     the default rules
index 665ad71e80f3289a1234930e1ab0b06fa4c48503..f6cc45ba750d670d8e54fc16be98f838e474e628 100644 (file)
@@ -1808,11 +1808,10 @@ static int match_attr(struct udev_rules *rules, struct udev_device *dev, struct
                const char *val;
 
                val = udev_device_get_sysattr_value(dev, key_name);
-               if (val != NULL)
-                       util_strlcpy(value, val, sizeof(value));
+               if (val == NULL)
+                       return -1;
+               util_strlcpy(value, val, sizeof(value));
        }
-       if (value[0] == '\0')
-               return -1;
 
        /* strip trailing whitespace of value, if not asked to match for it */
        len = strlen(key_value);
index c4e99f1ad57ff5b92027eb57b573a1c3de3a561f..ccc1f45e4cf92b16bd9f2a9783696667f933a774 100644 (file)
               <listitem>
                 <para>Match sysfs attribute values of the event device. Trailing
                 whitespace in the attribute values is ignored, if the specified match
-                value does not contain trailing whitespace itself. Depending on the type
-                of operator, this key is also used to set the value of a sysfs attribute.
+                value does not contain trailing whitespace itself.
                 </para>
               </listitem>
             </varlistentry>
               <term><option>ATTR{<replaceable>key</replaceable>}</option></term>
               <listitem>
                 <para>The value that should be written to a sysfs attribute of the
-                event device. Depending on the type of operator, this key is also
-                used to match against the value of a sysfs attribute.</para>
+                event device.</para>
               </listitem>
             </varlistentry>