summaryrefslogtreecommitdiff
path: root/udev_rules.c
diff options
context:
space:
mode:
authorAndrey Borzenkov <arvidjaar@mail.ru>2006-01-24 20:10:48 +0100
committerKay Sievers <kay.sievers@suse.de>2006-01-24 20:10:48 +0100
commitf5f0c34f6dc32769fd788560ce0d0cac843872b2 (patch)
treef2010d2a36dc9f8fdb38fc227469c08bf419962f /udev_rules.c
parent7d1e179f86aabeb5c206bf9b5bcac52235a9afbf (diff)
substitute format chars in RUN after rule matching
Apply substitutions before running a program, not while the rule is parsed. It allows to use environment variables set during rule processing as command arguments.
Diffstat (limited to 'udev_rules.c')
-rw-r--r--udev_rules.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/udev_rules.c b/udev_rules.c
index e9d8d7560e..fbcbbe0083 100644
--- a/udev_rules.c
+++ b/udev_rules.c
@@ -362,7 +362,7 @@ static int wait_for_sysfs(struct udevice *udev, const char *file, int timeout)
return -1;
}
-static void apply_format(struct udevice *udev, char *string, size_t maxsize)
+void apply_format(struct udevice *udev, char *string, size_t maxsize)
{
char temp[PATH_SIZE];
char temp2[PATH_SIZE];
@@ -1017,7 +1017,6 @@ int udev_rules_get_name(struct udev_rules *rules, struct udevice *udev)
name_list_cleanup(&udev->run_list);
}
strlcpy(program, key_val(rule, &rule->run), sizeof(program));
- apply_format(udev, program, sizeof(program));
dbg("add run '%s'", program);
name_list_add(&udev->run_list, program, 0);
}