diff options
author | Kay Sievers <kay.sievers@vrfy.org> | 2007-03-23 17:18:03 +0100 |
---|---|---|
committer | Kay Sievers <kay.sievers@vrfy.org> | 2007-03-23 17:18:03 +0100 |
commit | d2c9a56e0e624ed448aed8ad18460deed63973e1 (patch) | |
tree | 37c2023ed655db88a1394a746e9f40f154d0a074 | |
parent | be8594ab14f15203fcea4b2aa0115171472f3e43 (diff) |
don't write to sysfs files during test run
-rw-r--r-- | udev_rules.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/udev_rules.c b/udev_rules.c index f8844a8438..5078f2d3d1 100644 --- a/udev_rules.c +++ b/udev_rules.c @@ -861,8 +861,9 @@ try_parent: info("writing '%s' to sysfs file '%s'", value, attr); f = fopen(attr, "w"); if (f != NULL) { - if (fprintf(f, "%s", value) <= 0) - err("error writing ATTR{%s}: %s", attr, strerror(errno)); + if (!udev->test_run) + if (fprintf(f, "%s", value) <= 0) + err("error writing ATTR{%s}: %s", attr, strerror(errno)); fclose(f); } else err("error opening ATTR{%s} for writing: %s", attr, strerror(errno)); |