summaryrefslogtreecommitdiff
path: root/udevcontrol.c
diff options
context:
space:
mode:
authorKay Sievers <kay.sievers@vrfy.org>2008-04-22 03:19:21 +0200
committerKay Sievers <kay.sievers@vrfy.org>2008-04-22 03:19:21 +0200
commitd8a9d017046661e3433779611f0e23266b68ba3d (patch)
treeb042bacf0be4707237af47bf489039d83909bf5e /udevcontrol.c
parent7b2aad3343f8523db35ff2edfcfa9fcb816b7264 (diff)
udevadm: control - fix --env key to accept --env=<KEY>=<value>
Diffstat (limited to 'udevcontrol.c')
-rw-r--r--udevcontrol.c7
1 files changed, 5 insertions, 2 deletions
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 <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");