summaryrefslogtreecommitdiff
path: root/udevtest.c
diff options
context:
space:
mode:
authorKay Sievers <kay.sievers@suse.de>2006-01-25 02:18:13 +0100
committerKay Sievers <kay.sievers@suse.de>2006-01-25 02:18:13 +0100
commitad27f5b3962d4cb1e4fcc25d3d0c7d0c81abc82a (patch)
tree7f113c73f81aedd8b1650de328bb6d61fd36065e /udevtest.c
parenta9bd2ed84a7b0871c281adc8226f12ae46da4de0 (diff)
udevtest: add udev_rules_apply_format() to RUN keys
Signed-off-by: Kay Sievers <kay.sievers@suse.de>
Diffstat (limited to 'udevtest.c')
-rw-r--r--udevtest.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/udevtest.c b/udevtest.c
index 22fd3735c2..d736711a3f 100644
--- a/udevtest.c
+++ b/udevtest.c
@@ -113,11 +113,16 @@ int main(int argc, char *argv[], char *envp[])
info("looking at device '%s' from subsystem '%s'", udev->dev->devpath, udev->dev->subsystem);
retval = udev_device_event(&rules, udev);
- if (retval == 0) {
+ if (retval == 0 && !udev->ignore_device && udev_run) {
struct name_entry *name_loop;
- list_for_each_entry(name_loop, &udev->run_list, node)
- info("run: '%s'", name_loop->name);
+ list_for_each_entry(name_loop, &udev->run_list, node) {
+ char program[PATH_SIZE];
+
+ strlcpy(program, name_loop->name, sizeof(program));
+ udev_rules_apply_format(udev, program, sizeof(program));
+ info("run: '%s'", program);
+ }
}
exit: