diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2014-10-11 21:34:40 +0100 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2014-10-11 21:36:11 +0100 |
commit | 49376ba3bddd15e62df55928198160d9970dc1c6 (patch) | |
tree | 1154394c81d2133bff7e8238d79d4566d7e7d5d8 | |
parent | 70a1710e18f874f9efd8e97f0f873d65bf1b46ca (diff) |
backlight: Open bl_power using WRONLY for writing.
Jan spotted that we open the bl_power file using O_RDONLY and then attempt
to write the new power state into it. This fails...
Reported-by: Jan Steffens
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
-rw-r--r-- | src/backlight.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/backlight.c b/src/backlight.c index 4d3c39fd..c7ff1055 100644 --- a/src/backlight.c +++ b/src/backlight.c @@ -217,7 +217,7 @@ __backlight_write(const char *iface, const char *file, const char *value) { int fd, ret; - fd = __backlight_open(iface, file, O_RDONLY); + fd = __backlight_open(iface, file, O_WRONLY); if (fd < 0) return -1; |