summaryrefslogtreecommitdiff
path: root/udevd.c
diff options
context:
space:
mode:
Diffstat (limited to 'udevd.c')
-rw-r--r--udevd.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/udevd.c b/udevd.c
index ffa81bbb75..8a352e1eb9 100644
--- a/udevd.c
+++ b/udevd.c
@@ -123,10 +123,15 @@ static int udev_event_process(struct uevent_msg *msg)
list_for_each_entry(name_loop, &udev->run_list, node) {
if (strncmp(name_loop->name, "socket:", strlen("socket:")) == 0)
pass_env_to_socket(&name_loop->name[strlen("socket:")], msg->devpath, msg->action);
- else
- if (run_program(name_loop->name, udev->dev->subsystem, NULL, 0, NULL,
+ else {
+ char program[PATH_SIZE];
+
+ strlcpy(program, name_loop->name, sizeof(program));
+ apply_format(udev, program, sizeof(program));
+ if (run_program(program, udev->dev->subsystem, NULL, 0, NULL,
(udev_log_priority >= LOG_INFO)))
retval = -1;
+ }
}
}