chiark / gitweb /
udevadm: control - fix --env key to accept --env=<KEY>=<value>
authorKay Sievers <kay.sievers@vrfy.org>
Tue, 22 Apr 2008 01:19:21 +0000 (03:19 +0200)
committerKay Sievers <kay.sievers@vrfy.org>
Tue, 22 Apr 2008 01:19:21 +0000 (03:19 +0200)
extras/volume_id/vol_id.8
udevadm.8
udevadm.xml
udevcontrol.c

index daa583b855b0d182678d6baa4688bac40432f259..2e4a8c38118c49997884020f3064953f1527d6e0 100644 (file)
@@ -1,6 +1,6 @@
 .\"     Title: vol_id
 .\"    Author: 
 .\"     Title: vol_id
 .\"    Author: 
-.\" Generator: DocBook XSL Stylesheets v1.73.1 <http://docbook.sf.net/>
+.\" Generator: DocBook XSL Stylesheets v1.73.2 <http://docbook.sf.net/>
 .\"      Date: March 2006
 .\"    Manual: vol_id
 .\"    Source: volume_id
 .\"      Date: March 2006
 .\"    Manual: vol_id
 .\"    Source: volume_id
index 9cd91e209a64bf77b65a2824c083e7f54fb33670..65e85e6bc0db4cb11b3a83ab2998e98dc878cd8a 100644 (file)
--- a/udevadm.8
+++ b/udevadm.8
@@ -129,12 +129,12 @@ Trigger events for devices which belong to a matching subsystem\. This option ca
 Do not trigger events for devices which belong to a matching subsystem\. This option can be specified multiple times and supports shell style pattern matching\.
 .RE
 .PP
 Do not trigger events for devices which belong to a matching subsystem\. This option can be specified multiple times and supports shell style pattern matching\.
 .RE
 .PP
-\fB\-\-attr\-match=\fR\fB\fIattribute=value\fR\fR
+\fB\-\-attr\-match=\fR\fB\fIattribute\fR\fR\fB=\fR\fB\fIvalue\fR\fR
 .RS 4
 Trigger events for devices with a matching sysfs attribute\. If a value is specified along with the attribute name, the content of the attribute is matched against the given value using shell style pattern matching\. If no value is specified, the existence of the sysfs attribute is checked\. This option can be specified multiple times\.
 .RE
 .PP
 .RS 4
 Trigger events for devices with a matching sysfs attribute\. If a value is specified along with the attribute name, the content of the attribute is matched against the given value using shell style pattern matching\. If no value is specified, the existence of the sysfs attribute is checked\. This option can be specified multiple times\.
 .RE
 .PP
-\fB\-\-attr\-nomatch=\fR\fB\fIattribute=value\fR\fR
+\fB\-\-attr\-nomatch=\fR\fB\fIattribute\fR\fR\fB=\fR\fB\fIvalue\fR\fR
 .RS 4
 Do not trigger events for devices with a matching sysfs attribute\. If a value is specified along with the attribute name, the content of the attribute is matched against the given value using shell style pattern matching\. If no value is specified, the existence of the sysfs attribute is checked\. This option can be specified multiple times\.
 .RE
 .RS 4
 Do not trigger events for devices with a matching sysfs attribute\. If a value is specified along with the attribute name, the content of the attribute is matched against the given value using shell style pattern matching\. If no value is specified, the existence of the sysfs attribute is checked\. This option can be specified multiple times\.
 .RE
@@ -191,17 +191,17 @@ Signal udevd to enable the execution of events\.
 Signal udevd to reload the rules from the config\.
 .RE
 .PP
 Signal udevd to reload the rules from the config\.
 .RE
 .PP
-\fB\-\-env \fR\fB\fIvar\fR\fR\fB=\fR\fB\fIvalue\fR\fR
+\fB\-\-env=\fR\fB\fIKEY\fR\fR\fB=\fR\fB\fIvalue\fR\fR
 .RS 4
 Set global variable\.
 .RE
 .PP
 .RS 4
 Set global variable\.
 .RE
 .PP
-\fB\-\-max_childs\fR
+\fB\-\-max_childs=\fR\fIvalue\fR
 .RS 4
 Set the maximum number of events, udevd will handle at the same time\.
 .RE
 .PP
 .RS 4
 Set the maximum number of events, udevd will handle at the same time\.
 .RE
 .PP
-\fB\-\-max_childs_running\fR
+\fB\-\-max_childs_running=\fR\fB\fIvalue\fR\fR
 .RS 4
 Set the maximum number of events, which are allowed to run at the same time\.
 .RE
 .RS 4
 Set the maximum number of events, which are allowed to run at the same time\.
 .RE
index 8537d2ad407f61264339b2022ce4f8b798fb11f8..670c991457145e7c53b62a47ead133101b6efb4b 100644 (file)
               </listitem>
             </varlistentry>
             <varlistentry>
               </listitem>
             </varlistentry>
             <varlistentry>
-              <term><option>--attr-match=<replaceable>attribute=value</replaceable></option></term>
+              <term><option>--attr-match=<replaceable>attribute</replaceable>=<replaceable>value</replaceable></option></term>
               <listitem>
                 <para>Trigger events for devices with a matching sysfs attribute. If a value is specified
                 along with the attribute name, the content of the attribute is matched against the given
               <listitem>
                 <para>Trigger events for devices with a matching sysfs attribute. If a value is specified
                 along with the attribute name, the content of the attribute is matched against the given
               </listitem>
             </varlistentry>
             <varlistentry>
               </listitem>
             </varlistentry>
             <varlistentry>
-              <term><option>--attr-nomatch=<replaceable>attribute=value</replaceable></option></term>
+              <term><option>--attr-nomatch=<replaceable>attribute</replaceable>=<replaceable>value</replaceable></option></term>
               <listitem>
                 <para>Do not trigger events for devices with a matching sysfs attribute. If a value is
                 specified along with the attribute name, the content of the attribute is matched against
               <listitem>
                 <para>Do not trigger events for devices with a matching sysfs attribute. If a value is
                 specified along with the attribute name, the content of the attribute is matched against
               </listitem>
             </varlistentry>
             <varlistentry>
               </listitem>
             </varlistentry>
             <varlistentry>
-              <term><option>--env <replaceable>var</replaceable>=<replaceable>value</replaceable></option></term>
+              <term><option>--env=<replaceable>KEY</replaceable>=<replaceable>value</replaceable></option></term>
               <listitem>
                 <para>Set global variable.</para>
               </listitem>
             </varlistentry>
             <varlistentry>
               <listitem>
                 <para>Set global variable.</para>
               </listitem>
             </varlistentry>
             <varlistentry>
-              <term><option>--max_childs</option></term>
+              <term><option>--max_childs=</option><replaceable>value</replaceable></term>
               <listitem>
                 <para>Set the maximum number of events, udevd will handle at the
                 same time.</para>
               </listitem>
             </varlistentry>
             <varlistentry>
               <listitem>
                 <para>Set the maximum number of events, udevd will handle at the
                 same time.</para>
               </listitem>
             </varlistentry>
             <varlistentry>
-              <term><option>--max_childs_running</option></term>
+              <term><option>--max_childs_running=<replaceable>value</replaceable></option></term>
               <listitem>
                 <para>Set the maximum number of events, which are allowed to run at the
                 same time.</para>
               <listitem>
                 <para>Set the maximum number of events, which are allowed to run at the
                 same time.</para>
index 287e8aaf99b00182db7a33c07b3000fa0babb7f3..4c93b8f464f4258a35116768fa81d77c459525af 100644 (file)
@@ -105,7 +105,10 @@ int udevcontrol(int argc, char *argv[], char *envp[])
                *intval = count;
                info("send max_childs_running=%i\n", *intval);
        } else if (!strncmp(arg, "env", strlen("env"))) {
                *intval = count;
                info("send max_childs_running=%i\n", *intval);
        } else if (!strncmp(arg, "env", strlen("env"))) {
-               val = argv[2];
+               if (!strncmp(arg, "env=", strlen("env=")))
+                       val = &arg[strlen("env=")];
+               else
+                       val = argv[2];
                if (val == NULL) {
                        fprintf(stderr, "missing key\n");
                        goto exit;
                if (val == NULL) {
                        fprintf(stderr, "missing key\n");
                        goto exit;
@@ -119,7 +122,7 @@ int udevcontrol(int argc, char *argv[], char *envp[])
                        "  --stop_exec_queue        keep udevd from executing events, queue only\n"
                        "  --start_exec_queue       execute events, flush queue\n"
                        "  --reload_rules           reloads the rules files\n"
                        "  --stop_exec_queue        keep udevd from executing events, queue only\n"
                        "  --start_exec_queue       execute events, flush queue\n"
                        "  --reload_rules           reloads the rules files\n"
-                       "  --env <var>=<value>      set a global environment variable\n"
+                       "  --env=<KEY>=<value>      set a global environment variable\n"
                        "  --max_childs=<N>         maximum number of childs\n"
                        "  --max_childs_running=<N> maximum number of childs running at the same time\n"
                        "  --help                   print this help text\n\n");
                        "  --max_childs=<N>         maximum number of childs\n"
                        "  --max_childs_running=<N> maximum number of childs running at the same time\n"
                        "  --help                   print this help text\n\n");