chiark / gitweb /
rules: implement TAGS== match
[elogind.git] / udev / udev.xml
index 225ad5ce3f099426bb6e225e62d07e88468ceffb..abbfee7ad13deff359a7fbe157b3f84b708e6572 100644 (file)
           </listitem>
         </varlistentry>
 
+        <varlistentry>
+          <term><option>TAGS</option></term>
+          <listitem>
+            <para>Search the devpath upwards for a device with matching tag.</para>
+          </listitem>
+        </varlistentry>
+
         <varlistentry>
           <term><option>ENV{<replaceable>key</replaceable>}</option></term>
           <listitem>
             devices claim the same name, the link always points to the device with
             the highest link_priority. If the current device goes away, the links are
             re-evaluated and the device with the next highest link_priority becomes the owner of
-            the link. If no link_priority is specified, the order of the devicesand
-            which one of them owns the link, is undefined. Claiming the same name for
-            a symlink, which is or might be used for a device node, may result in
-            unexpected behavior and is not supported.
+            the link. If no link_priority is specified, the order of the devices (and
+            which one of them owns the link) is undefined. Also, symlink names must
+            never conflict with the kernel's default device node names, as that would
+            result in unpredictable behavior.
             </para>
           </listitem>
         </varlistentry>
           <term><option>ENV{<replaceable>key</replaceable>}</option></term>
           <listitem>
             <para>Set a device property value. Property names with a leading '.'
-            are not stored in the database or exported to external tool or events.</para>
+            are neither stored in the database nor exported to events or
+            external tools (run by, say, the PROGRAM match key).</para>
           </listitem>
         </varlistentry>
 
             this or a dependent device. Long running tasks need to be immediately
             detached from the event process itself.</para>
             <para>If no absolute path is given, the program is expected to live in
-            <filename>/lib/udev</filename>, otherwise the absolute path must be
-            specified. Program name and arguments are separated by spaces. Single quotes
-            can be used to specify arguments with spaces.</para>
+            the directory provided at compile-time to configure via --libexecdir
+            (this is usually <filename>/lib/udev</filename>), otherwise the absolute
+            path must be specified. The program name and following arguments are
+            separated by spaces. Single quotes can be used to specify arguments with
+            spaces.</para>
           </listitem>
         </varlistentry>
 
         <varlistentry>
           <term><option>LABEL</option></term>
           <listitem>
-            <para>Named label where a GOTO can jump to.</para>
+            <para>A named label to which a GOTO may jump.</para>
           </listitem>
         </varlistentry>
 
         <varlistentry>
           <term><option>GOTO</option></term>
           <listitem>
-            <para>Jumps to the next LABEL with a matching name</para>
+            <para>Jumps to the next LABEL with a matching name.</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>
+                  <para>Import a text file specified as the assigned value, the content
+                  of which must be in environment key format.</para>
                 </listitem>
               </varlistentry>
               <varlistentry>
               <varlistentry>
                 <term><option>cmdline</option></term>
                 <listitem>
-                  <para>Import a single property from the kernel commandline. For simple flags
+                  <para>Import a single property from the kernel command line. For simple flags
                   the value of the property is set to '1'.</para>
                 </listitem>
               </varlistentry>
         <varlistentry>
           <term><option>WAIT_FOR</option></term>
           <listitem>
-            <para>Wait for a file to become available or until a 10
-            seconds timeout expires. The path is relative to the sysfs device,
-            i. e. if no path is specified this waits for an attribute to appear.</para>
+            <para>Wait for a file to become available or until a timeout of
+            10 seconds expires. The path is relative to the sysfs device;
+            if no path is specified, this waits for an attribute to appear.</para>
           </listitem>
         </varlistentry>
 
               <varlistentry>
                 <term><option>static_node=</option></term>
                 <listitem>
-                  <para>Apply the permissions specified in this rule to a static device node with
+                  <para>Apply the permissions specified in this rule to the static device node with
                   the specified name. Static device nodes might be provided by kernel modules
                   or copied from <filename>/lib/udev/devices</filename>. These nodes might not have
                   a corresponding kernel device at the time udevd is started; they can trigger
               <varlistentry>
                 <term><option>watch</option></term>
                 <listitem>
-                  <para>Watch the device node with inotify; when closed after being opened for
-                  writing, a change uevent is synthesised.</para>
+                  <para>Watch the device node with inotify; when the node is closed after being opened for
+                  writing, a change uevent is synthesized.</para>
                 </listitem>
               </varlistentry>
               <varlistentry>
 
       <para>The <option>NAME</option>, <option>SYMLINK</option>, <option>PROGRAM</option>,
       <option>OWNER</option>, <option>GROUP</option>, <option>MODE</option>  and  <option>RUN</option>
-      fields support simple printf-like string substitutions. The <option>RUN</option>
-      format chars gets applied after all rules have been processed, right before the program
-      is executed. It allows the use of device properties set by earlier matching
-      rules. For all other fields, substitutions are applied while the individual rule is
+      fields support simple string substitutions. The <option>RUN</option>
+      substitutions are performed after all rules have been processed, right before the program
+      is executed, allowing for the use of device properties set by earlier matching
+      rules. For all other fields, substitutions are performed while the individual rule is
       being processed. The available substitutions are:</para>
       <variablelist>
         <varlistentry>
             <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, and a previous KERNELS, SUBSYSTEMS, DRIVERS, or
-            ATTRS test selected a parent device, use the attribute from that
-            parent device.
-            If the attribute is a symlink, the last element of the symlink target is
+            ATTRS test selected a parent device, then the attribute from that
+            parent device is used.</para>
+            <para>If the attribute is a symlink, the last element of the symlink target is
             returned as the value.</para>
           </listitem>
         </varlistentry>
           <term><option>$result</option>, <option>%c</option></term>
           <listitem>
             <para>The string returned by the external program requested with PROGRAM.
-            A single part of the string, separated by a space character may be selected
+            A single part of the string, separated by a space character, may be selected
             by specifying the part number as an attribute: <option>%c{N}</option>.
-            If the number is followed by the '+' char this part plus all remaining parts
+            If the number is followed by the '+' character, this part plus all remaining parts
             of the result string are substituted: <option>%c{N+}</option></para>
           </listitem>
         </varlistentry>
         <varlistentry>
           <term><option>$links</option></term>
           <listitem>
-            <para>The current list of symlinks, separated by a space character. The value is
-            only set if an earlier rule assigned a value, or during a remove events.</para>
+            <para>A space-separated list of the current symlinks. The value is
+            only set during a remove event or if an earlier rule assigned a value.</para>
           </listitem>
         </varlistentry>
 
         <varlistentry>
           <term><option>$tempnode</option>, <option>%N</option></term>
           <listitem>
-            <para>The name of a created temporary device node to provide access to
+            <para>The name of a temporary device node created to provide access to
             the device from a external program before the real node is created.</para>
           </listitem>
         </varlistentry>