From d8a9d017046661e3433779611f0e23266b68ba3d Mon Sep 17 00:00:00 2001 From: Kay Sievers Date: Tue, 22 Apr 2008 03:19:21 +0200 Subject: [PATCH] udevadm: control - fix --env key to accept --env== --- extras/volume_id/vol_id.8 | 2 +- udevadm.8 | 10 +++++----- udevadm.xml | 10 +++++----- udevcontrol.c | 7 +++++-- 4 files changed, 16 insertions(+), 13 deletions(-) diff --git a/extras/volume_id/vol_id.8 b/extras/volume_id/vol_id.8 index daa583b855..2e4a8c3811 100644 --- a/extras/volume_id/vol_id.8 +++ b/extras/volume_id/vol_id.8 @@ -1,6 +1,6 @@ .\" Title: vol_id .\" Author: -.\" Generator: DocBook XSL Stylesheets v1.73.1 +.\" Generator: DocBook XSL Stylesheets v1.73.2 .\" Date: March 2006 .\" Manual: vol_id .\" Source: volume_id diff --git a/udevadm.8 b/udevadm.8 index 9cd91e209a..65e85e6bc0 100644 --- 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 -\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 -\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 @@ -191,17 +191,17 @@ Signal udevd to enable the execution of events\. 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 -\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 -\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 diff --git a/udevadm.xml b/udevadm.xml index 8537d2ad40..670c991457 100644 --- a/udevadm.xml +++ b/udevadm.xml @@ -171,7 +171,7 @@ - + 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 @@ -180,7 +180,7 @@ - + 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 @@ -258,20 +258,20 @@ - + Set global variable. - + value Set the maximum number of events, udevd will handle at the same time. - + Set the maximum number of events, which are allowed to run at the same time. diff --git a/udevcontrol.c b/udevcontrol.c index 287e8aaf99..4c93b8f464 100644 --- a/udevcontrol.c +++ b/udevcontrol.c @@ -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"))) { - 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; @@ -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" - " --env = set a global environment variable\n" + " --env== set a global environment variable\n" " --max_childs= maximum number of childs\n" " --max_childs_running= maximum number of childs running at the same time\n" " --help print this help text\n\n");