chiark / gitweb /
use git-archive instead of git-tar-tree
[elogind.git] / udev.xml
index 01e9d522ed4d5f2b29499f875b565b65d1c3fa46..5e5388da51cd691df38e56678f90b88ac5940e8e 100644 (file)
--- a/udev.xml
+++ b/udev.xml
             </varlistentry>
 
             <varlistentry>
-              <term><option>KERNEL</option></term>
+              <term><option>DEVPATH</option></term>
               <listitem>
-                <para>Match the name of the device.</para>
+                <para>Match the devpath of the event device.</para>
               </listitem>
             </varlistentry>
 
             <varlistentry>
-              <term><option>DEVPATH</option></term>
+              <term><option>KERNEL</option></term>
               <listitem>
-                <para>Match the devpath of the device.</para>
+                <para>Match the name of the event device.</para>
               </listitem>
             </varlistentry>
 
             <varlistentry>
               <term><option>SUBSYSTEM</option></term>
               <listitem>
-                <para>Match the subsystem of the device.</para>
+                <para>Match the subsystem of the event device.</para>
+              </listitem>
+            </varlistentry>
+<!--
+            <varlistentry>
+              <term><option>DRIVER</option></term>
+              <listitem>
+                <para>Match the driver name of the event device. Only set for devices created by a bus driver.</para>
+              </listitem>
+            </varlistentry>
+-->
+            <varlistentry>
+              <term><option>ATTR{<replaceable>filename</replaceable>}</option></term>
+              <listitem>
+                <para>Match sysfs attribute values of the event device. Up to five
+                <option>ATTR</option> keys can be specified per rule. 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.
+                </para>
               </listitem>
             </varlistentry>
 
             <varlistentry>
-              <term><option>BUS</option></term>
+              <term><option>KERNELS</option></term>
               <listitem>
-                <para>Search the devpath upwards for a matching device subsystem name.</para>
+                <para>Search the devpath upwards for a matching device name.</para>
               </listitem>
             </varlistentry>
 
             <varlistentry>
-              <term><option>DRIVER</option></term>
+              <term><option>SUBSYSTEMS</option></term>
               <listitem>
-                <para>Search the devpath upwards for a matching device driver name.</para>
+                <para>Search the devpath upwards for a matching device subsystem name.</para>
               </listitem>
             </varlistentry>
 
             <varlistentry>
-              <term><option>ID</option></term>
+              <term><option>DRIVERS</option></term>
               <listitem>
-                <para>Search the devpath upwards for a matching device name.</para>
+                <para>Search the devpath upwards for a matching device driver name.</para>
               </listitem>
             </varlistentry>
 
             <varlistentry>
-              <term><option>SYSFS{<replaceable>filename</replaceable>}</option></term>
+              <term><option>ATTRS{<replaceable>filename</replaceable>}</option></term>
               <listitem>
                 <para>Search the devpath upwards for a device with matching sysfs attribute values.
-                Up to five <option>SYSFS</option> keys can be specified per rule. All attributes
+                Up to five <option>ATTRS</option> keys can be specified per rule. All attributes
                 must match on the same device. Trailing whitespace in the attribute values is ignored,
                 if the specified match value does not contain trailing whitespace itself.</para>
               </listitem>
               <term><option>ENV{<replaceable>key</replaceable>}</option></term>
               <listitem>
                 <para>Match against the value of an environment variable. Up to five <option>ENV</option>
-                keys can be specified per rule. This key can also be used to export a variable to
-                the environment.</para>
+                keys can be specified per rule. Depending on the type of operator, this key is also used
+                to export a variable to the environment.</para>
               </listitem>
             </varlistentry>
 
               </listitem>
             </varlistentry>
 
+            <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>
+              </listitem>
+            </varlistentry>
+
             <varlistentry>
               <term><option>ENV{<replaceable>key</replaceable>}</option></term>
               <listitem>
-                <para>Export a variable to the environment. This key can also be used to match
-                against an environment variable.</para>
+                <para>Export a variable to the environment. Depending on the type of operator,
+                this key is also to match against an environment variable.</para>
               </listitem>
             </varlistentry>
 
             <varlistentry>
               <term><option>IMPORT{<replaceable>type</replaceable>}</option></term>
               <listitem>
-                <para>Import the printed result or the value of a file in environment key
-                format into the event environment. <option>program</option> will execute an
-                external program and read its output. <option>file</option> will import a
-                text file. If no option is given, udev will determine it from the  executable
-                bit of of the file permissions.</para>
+                <para>Import a set of variables into the event environment,
+                depending on <replaceable>type</replaceable>:</para>
+                <variablelist>
+                  <varlistentry>
+                    <term><option>program</option></term>
+                    <listitem>
+                      <para>Execute an external program specified as the assigned value and
+                      import its output, which must be in environment key format.</para>
+                    </listitem>
+                  </varlistentry>
+                  <varlistentry>
+                    <term><option>file</option></term>
+                    <listitem>
+                      <para>Import a text file specified as the assigned value, which must be in
+                      environment key format.</para>
+                    </listitem>
+                  </varlistentry>
+                  <varlistentry>
+                    <term><option>parent</option></term>
+                    <listitem>
+                      <para>Import the stored keys from the parent device by reading
+                      the database entry of the parent device. The value assigned to
+                      <option>IMPORT{parent}</option> is used as a filter of key names
+                      to import (with the same shell-style pattern matching used for
+                      comparisons).</para>
+                    </listitem>
+                  </varlistentry>
+                </variablelist>
+                <para>If no option is given, udev will choose between <option>program</option>
+                and <option>file</option> based on the executable bit of of the file
+                permissions.</para>
               </listitem>
             </varlistentry>
 
               <term><option>$id</option>, <option>%b</option></term>
               <listitem>
                 <para>The name of the device matched while searching the devpath upwards for
-                  <option>BUS</option>, <option>ID</option> <option>DRIVER</option> and <option>SYSFS</option>.
+                  <option>SUBSYSTEMS</option>, <option>KERNELS</option>, <option>DRIVERS</option> and <option>ATTRS</option>.
                 </para>
               </listitem>
             </varlistentry>
 
             <varlistentry>
-              <term><option>$sysfs{<replaceable>file</replaceable>}</option>, <option>%s{<replaceable>file</replaceable>}</option></term>
+              <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>