summaryrefslogtreecommitdiff
path: root/udevd.c
diff options
context:
space:
mode:
authorKay Sievers <kay.sievers@vrfy.org>2007-07-14 20:44:19 +0200
committerKay Sievers <kay.sievers@vrfy.org>2007-07-14 20:44:19 +0200
commit274da2b23d37f2dd174f765e9cfcc485e4a5a898 (patch)
tree93a296ef8b7674e9265f1dbd11e5da9b8cc915eb /udevd.c
parentfb819f5554530dd136d50aa40438e9dbeeceac01 (diff)
add udev_rules_run() to handle RUN list
Diffstat (limited to 'udevd.c')
-rw-r--r--udevd.c20
1 files changed, 2 insertions, 18 deletions
diff --git a/udevd.c b/udevd.c
index 5ed8e38c98..7dedf078f3 100644
--- a/udevd.c
+++ b/udevd.c
@@ -135,24 +135,8 @@ static int udev_event_process(struct udevd_uevent_msg *msg)
retval = udev_device_event(&rules, udev);
/* run programs collected by RUN-key*/
- if (retval == 0 && !udev->ignore_device && udev_run) {
- struct name_entry *name_loop;
-
- dbg("executing run list");
- 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:")], udev->dev->devpath, udev->action);
- else {
- char program[PATH_SIZE];
-
- strlcpy(program, name_loop->name, sizeof(program));
- udev_rules_apply_format(udev, program, sizeof(program));
- if (run_program(program, udev->dev->subsystem, NULL, 0, NULL) != 0)
- if (!name_loop->ignore_error)
- retval = -1;
- }
- }
- }
+ if (retval == 0 && !udev->ignore_device && udev_run)
+ retval = udev_rules_run(udev);
udev_device_cleanup(udev);
return retval;