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
(from parent 1:
13b28d8
)
backlight: Fix copy/paste error printing an unrelated error code
author
Josh Triplett
<josh@joshtriplett.org>
Wed, 12 Mar 2014 04:09:04 +0000
(21:09 -0700)
committer
Lennart Poettering
<lennart@poettering.net>
Wed, 12 Mar 2014 15:41:45 +0000
(16:41 +0100)
udev_device_get_sysattr_value returns NULL on failure, but doesn't
provide an error code; thus, when printing an error from it, don't print
an unrelated error code from a previous call.
src/backlight/backlight.c
patch
|
blob
|
history
diff --git
a/src/backlight/backlight.c
b/src/backlight/backlight.c
index 86f10cc0cf290f15dc5978a74e8a3b9d9f04add3..81470b3f9d527cc7bf8c35e054c0b5b8491f2773 100644
(file)
--- a/
src/backlight/backlight.c
+++ b/
src/backlight/backlight.c
@@
-322,7
+322,7
@@
int main(int argc, char *argv[]) {
value = udev_device_get_sysattr_value(device, "brightness");
if (!value) {
- log_error("Failed to read system attribute
: %s", strerror(-r)
);
+ log_error("Failed to read system attribute
"
);
return EXIT_FAILURE;
}