chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
be8594a
)
don't write to sysfs files during test run
author
Kay Sievers
<kay.sievers@vrfy.org>
Fri, 23 Mar 2007 16:18:03 +0000
(17:18 +0100)
committer
Kay Sievers
<kay.sievers@vrfy.org>
Fri, 23 Mar 2007 16:18:03 +0000
(17:18 +0100)
udev_rules.c
patch
|
blob
|
history
diff --git
a/udev_rules.c
b/udev_rules.c
index f8844a8438df8af7ae277c248489ece37d145d7e..5078f2d3d1668a6e4d80b9eb487c9c324234c0c7 100644
(file)
--- 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));