mirror of
https://github.com/clearlinux/systemd-stable.git
synced 2026-11-15 20:04:08 +00:00
backlight: Fix copy/paste error printing an unrelated error code
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. (cherry picked from commitcddc35f75e) (cherry picked from commitb8b80c8aa1)
This commit is contained in:
committed by
Zbigniew Jędrzejewski-Szmek
parent
e58c591e5a
commit
732dc2c66f
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user