summaryrefslogtreecommitdiff
path: root/src/udev/udev-event.c
diff options
context:
space:
mode:
authorKay Sievers <kay@vrfy.org>2012-04-09 16:37:54 +0200
committerKay Sievers <kay@vrfy.org>2012-04-09 19:25:41 +0200
commit83cd6b754b270091840456a2c8a66dae19f5a7dc (patch)
treec7088359f9927196a9e64b5b1bfb100733725f47 /src/udev/udev-event.c
parentf1ff47be175bdcb8ed8512393fee9f9615501e24 (diff)
udev: convert 'uaccess' to a builtin
Diffstat (limited to 'src/udev/udev-event.c')
-rw-r--r--src/udev/udev-event.c17
1 files changed, 9 insertions, 8 deletions
diff --git a/src/udev/udev-event.c b/src/udev/udev-event.c
index 703581a8b3..2b4cc6923e 100644
--- a/src/udev/udev-event.c
+++ b/src/udev/udev-event.c
@@ -943,15 +943,20 @@ out:
return err;
}
-int udev_event_execute_run(struct udev_event *event, const sigset_t *sigmask)
+void udev_event_execute_run(struct udev_event *event, const sigset_t *sigmask)
{
struct udev_list_entry *list_entry;
- int err = 0;
udev_list_entry_foreach(list_entry, udev_list_get_entry(&event->run_list)) {
const char *cmd = udev_list_entry_get_name(list_entry);
+ enum udev_builtin_cmd builtin_cmd = udev_list_entry_get_num(list_entry);
+
+ if (builtin_cmd < UDEV_BUILTIN_MAX) {
+ char command[UTIL_PATH_SIZE];
- if (strncmp(cmd, "socket:", strlen("socket:")) == 0) {
+ udev_event_apply_format(event, cmd, command, sizeof(command));
+ udev_builtin_run(event->dev, builtin_cmd, command, false);
+ } else if (strncmp(cmd, "socket:", strlen("socket:")) == 0) {
struct udev_monitor *monitor;
monitor = udev_monitor_new_from_socket(event->udev, &cmd[strlen("socket:")]);
@@ -970,11 +975,7 @@ int udev_event_execute_run(struct udev_event *event, const sigset_t *sigmask)
udev_event_apply_format(event, cmd, program, sizeof(program));
envp = udev_device_get_properties_envp(event->dev);
- if (udev_event_spawn(event, program, envp, sigmask, NULL, 0) < 0) {
- if (udev_list_entry_get_num(list_entry))
- err = -1;
- }
+ udev_event_spawn(event, program, envp, sigmask, NULL, 0);
}
}
- return err;
}