chiark / gitweb /
finally remove the directory event-multiplexer crap
[elogind.git] / udev_rules.c
index f8844a8438df8af7ae277c248489ece37d145d7e..5078f2d3d1668a6e4d80b9eb487c9c324234c0c7 100644 (file)
@@ -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));