summaryrefslogtreecommitdiff
path: root/udevd.c
diff options
context:
space:
mode:
authorkay.sievers@vrfy.org <kay.sievers@vrfy.org>2004-11-23 06:14:21 +0100
committerGreg KH <gregkh@suse.de>2005-04-26 22:35:00 -0700
commit6f59ed5547426ddaf6bedf574d19a19f6bd20e1f (patch)
treed2df87bc0296dea39bc826d76b8d6e964aebe130 /udevd.c
parenta97b06483e3006a7d21e534694e8d67d3b3c694d (diff)
[PATCH] add MANAGED_EVENT to the forked udev environment
This will prevent a loop, if udev sends events back into the daemon.
Diffstat (limited to 'udevd.c')
-rw-r--r--udevd.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/udevd.c b/udevd.c
index 2337493f1e..bd36d2c192 100644
--- a/udevd.c
+++ b/udevd.c
@@ -291,7 +291,7 @@ static void handle_udevsend_msg(int sock)
/* copy environment buffer and reconstruct envp */
memcpy(msg->envbuf, usend_msg.envbuf, envbuf_size);
bufpos = 0;
- for (i = 0; (bufpos < envbuf_size) && (i < HOTPLUG_NUM_ENVP-1); i++) {
+ for (i = 0; (bufpos < envbuf_size) && (i < HOTPLUG_NUM_ENVP-2); i++) {
int keylen;
char *key;
@@ -314,6 +314,7 @@ static void handle_udevsend_msg(int sock)
if (strncmp(key, "SEQNUM=", 7) == 0)
msg->seqnum = strtoull(&key[7], NULL, 10);
}
+ msg->envp[i++] = "MANAGED_EVENT=1";
msg->envp[i] = NULL;
/* if no seqnum is given, we move straight to exec queue */