mirror of
https://github.com/systemd/systemd.git
synced 2026-08-03 06:30:30 +00:00
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.
This commit is contained in:
Notes:
Lennart Poettering
2014-10-24 18:12:13 +02:00
Backport: bugfix
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user