summaryrefslogtreecommitdiff
path: root/udev_rules.c
diff options
context:
space:
mode:
authorKay Sievers <kay.sievers@suse.de>2006-04-15 19:32:05 +0200
committerKay Sievers <kay.sievers@suse.de>2006-04-15 19:32:05 +0200
commit7ba2d2e6ae70964b68056283fcea209cb4b617ec (patch)
tree765455e79d0fd4000f80d55d8fcf126ffeee30ad /udev_rules.c
parent0c4a805bccbc52e48f972a87f83007fdb0ffe19e (diff)
apply format char to variables exported by ENV
Diffstat (limited to 'udev_rules.c')
-rw-r--r--udev_rules.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/udev_rules.c b/udev_rules.c
index 623ca46858..5b1e6889ec 100644
--- a/udev_rules.c
+++ b/udev_rules.c
@@ -903,10 +903,13 @@ try_parent:
if (pair->key.operation == KEY_OP_ASSIGN) {
const char *key_name = key_pair_name(rule, pair);
const char *value = key_val(rule, &pair->key);
+ char *key_value = name_list_key_add(&udev->env_list, key_name, value);
+ if (key_value == NULL)
+ break;
- name_list_key_add(&udev->env_list, key_name, value);
- setenv(key_name, value, 1);
- dbg("export ENV '%s=%s'", key_name, value);
+ udev_rules_apply_format(udev, key_value, NAME_SIZE);
+ putenv(key_value);
+ dbg("export ENV '%s'", key_value);
}
}