chiark / gitweb /
man: add $attr{} section about symlinks
authorKay Sievers <kay.sievers@suse.de>
Thu, 7 Sep 2006 09:08:07 +0000 (11:08 +0200)
committerKay Sievers <kay.sievers@suse.de>
Thu, 7 Sep 2006 09:08:07 +0000 (11:08 +0200)
udev.7
udev.xml

diff --git a/udev.7 b/udev.7
index fa6e52fdf3f6a8fbd2e292ffa69277e5cc5cd68f..05fa2e622bb49d54a6e67c0c8ade4e3b737289dd 100644 (file)
--- a/udev.7
+++ b/udev.7
@@ -196,13 +196,13 @@ The devpath of the device.
 \fB$id\fR, \fB%b\fR
 The name of the device matched while searching the devpath upwards for
 \fBSUBSYSTEMS\fR,
-\fBKERNELS\fR
+\fBKERNELS\fR,
 \fBDRIVERS\fR
 and
 \fBATTRS\fR.
 .TP 3n
 \fB$attr{\fR\fB\fIfile\fR\fR\fB}\fR, \fB%s{\fR\fB\fIfile\fR\fR\fB}\fR
-The value of a sysfs attribute found at the current or a parent device.
+The value of a sysfs attribute found at the device, where all keys of the rule have matched. If the matching device does not have such an attribute, all devices along the chain of parents are searched for a matching attribute. If the attribute is a symlink, the last element of the symlink target is returned as the value.
 .TP 3n
 \fB$env{\fR\fB\fIkey\fR\fR\fB}\fR, \fB%E{\fR\fB\fIkey\fR\fR\fB}\fR
 The value of an environment variable.
index b2781b767d322893b849c7dd7b1c07388c479854..852ae039e7117282ab5f0fae8d46ef8ef5317d07 100644 (file)
--- a/udev.xml
+++ b/udev.xml
               <term><option>$id</option>, <option>%b</option></term>
               <listitem>
                 <para>The name of the device matched while searching the devpath upwards for
-                  <option>SUBSYSTEMS</option>, <option>KERNELS</option> <option>DRIVERS</option> and <option>ATTRS</option>.
+                  <option>SUBSYSTEMS</option>, <option>KERNELS</option>, <option>DRIVERS</option> and <option>ATTRS</option>.
                 </para>
               </listitem>
             </varlistentry>
             <varlistentry>
               <term><option>$attr{<replaceable>file</replaceable>}</option>, <option>%s{<replaceable>file</replaceable>}</option></term>
               <listitem>
-                <para>The value of a sysfs attribute found at the current or a parent device.</para>
+                <para>The value of a sysfs attribute found at the device, where
+                all keys of the rule have matched. If the matching device does not have
+                such an attribute, all devices along the chain of parents are searched
+                for a matching attribute.
+                If the attribute is a symlink, the last element of the symlink target is
+                returned as the value.</para>
               </listitem>
             </varlistentry>