summaryrefslogtreecommitdiff
path: root/udev
diff options
context:
space:
mode:
authorKay Sievers <kay.sievers@vrfy.org>2009-12-25 15:23:45 +0100
committerKay Sievers <kay.sievers@vrfy.org>2009-12-25 15:23:45 +0100
commitf46d2e54a82086eddcd9cd91e7908e87d7424148 (patch)
treeea08dbce116f1411ecb5369f696b3fac000ebf00 /udev
parent1d67ec16c44711bbfb50ac7dd8bb2fb6e64a80f3 (diff)
remove UDEV_RUN environment variable
It handles only RUN but not IMPORT and PROGRAM. There is no sane way to suppress program execution. Most important programs run with IMPORT these days. Also events can no longer suppressed with the libudev netlink messages, so UDEV_RUN does nothing useful and is just inconsistent.
Diffstat (limited to 'udev')
-rw-r--r--udev/test-udev.c2
-rw-r--r--udev/udevadm-test.c3
-rw-r--r--udev/udevd.c9
3 files changed, 5 insertions, 9 deletions
diff --git a/udev/test-udev.c b/udev/test-udev.c
index 75518f628d..28c833a9e5 100644
--- a/udev/test-udev.c
+++ b/udev/test-udev.c
@@ -108,7 +108,7 @@ int main(int argc, char *argv[])
if (udev_device_get_event_timeout(dev) >= 0)
alarm(udev_device_get_event_timeout(dev));
- if (err == 0 && udev_get_run(udev))
+ if (err == 0)
udev_event_execute_run(event, NULL);
udev_event_unref(event);
diff --git a/udev/udevadm-test.c b/udev/udevadm-test.c
index 5dd515bcdc..894620073a 100644
--- a/udev/udevadm-test.c
+++ b/udev/udevadm-test.c
@@ -119,14 +119,13 @@ int udevadm_test(struct udev *udev, int argc, char *argv[])
udev_list_entry_foreach(entry, udev_device_get_properties_list_entry(dev))
info(udev, "%s=%s\n", udev_list_entry_get_name(entry), udev_list_entry_get_value(entry));
- if (err == 0 && udev_get_run(udev)) {
+ if (err == 0)
udev_list_entry_foreach(entry, udev_list_get_entry(&event->run_list)) {
char program[UTIL_PATH_SIZE];
udev_event_apply_format(event, udev_list_entry_get_name(entry), program, sizeof(program));
info(udev, "run: '%s'\n", program);
}
- }
udev_event_unref(event);
udev_device_unref(dev);
exit:
diff --git a/udev/udevd.c b/udev/udevd.c
index 99647c683c..170225d00c 100644
--- a/udev/udevd.c
+++ b/udev/udevd.c
@@ -292,12 +292,9 @@ static void worker_new(struct event *event)
if (udev_device_get_event_timeout(dev) >= 0)
alarm(udev_device_get_event_timeout(dev));
- /* execute RUN= */
- if (err == 0 && udev_get_run(udev_event->udev))
- failed = udev_event_execute_run(udev_event,
- &orig_sigmask);
+ if (err == 0)
+ failed = udev_event_execute_run(udev_event, &orig_sigmask);
- /* reset alarm */
alarm(0);
/* apply/restore inotify watch */
@@ -309,7 +306,7 @@ static void worker_new(struct event *event)
/* send processed event back to libudev listeners */
udev_monitor_send_device(worker_monitor, NULL, dev);
- /* send back the result of the event execution */
+ /* send udevd the result of the event execution */
if (err != 0)
msg.exitcode = err;
else if (failed != 0)