Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
SUSE:SLE-12:GA
systemd-mini
0004-backlight-Avoid-error-when-state-restore-i...
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File 0004-backlight-Avoid-error-when-state-restore-is-disabled.patch of Package systemd-mini
From b76388e123e8d73ded1fd53937d816b314948517 Mon Sep 17 00:00:00 2001 From: Michael Biebl <biebl@debian.org> Date: Thu, 11 Sep 2014 00:49:36 +0200 Subject: [PATCH] backlight: Avoid error when state restore is disabled When the state restore is disabled, we would print: "Unknown verb: load" instead of simply skipping loading the state. --- src/backlight/backlight.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git src/backlight/backlight.c src/backlight/backlight.c index 4d94ebf..0a2bac6 100644 --- src/backlight/backlight.c +++ src/backlight/backlight.c @@ -372,9 +372,12 @@ int main(int argc, char *argv[]) { * device probing should be complete), so that the validity * check at boot time doesn't have to be reliable. */ - if (streq(argv[1], "load") && shall_restore_state()) { + if (streq(argv[1], "load")) { _cleanup_free_ char *value = NULL; + if (!shall_restore_state()) + return EXIT_SUCCESS; + if (!validate_device(udev, device)) return EXIT_SUCCESS; -- 1.7.9.2
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor