]> git.ipfire.org Git - thirdparty/systemd.git/commit
backlight: validate read sysattr value 17020/head
authorYu Watanabe <watanabe.yu+github@gmail.com>
Fri, 11 Sep 2020 08:46:08 +0000 (17:46 +0900)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Fri, 11 Sep 2020 08:46:11 +0000 (17:46 +0900)
commit3bacb7e73b0b2364e4a8164c717b765e32ded2a4
tree8770d93c79fa917615309f34e6a97ffea6c9251c
parent06d98bdc81b233584d4b225892d358f324b7030b
backlight: validate read sysattr value

If actual_brightness is larger than max_brightness, then fall back to
use brightness attribute.

Also, if the saved value is invalid, then this makes remove the file in
/var/lib/systemd/backlight.

Hopefully fixes #17011.
src/backlight/backlight.c