chiark / gitweb /
install: make InstallContext::{will_install,have_installed} OrderedHashmaps
[elogind.git] / src / backlight / backlight.c
index 4d94ebf58a7e30b6b5ed7ad345a5235336f52b8e..0a2bac6f1665427207370f67e95b23913ec994d1 100644 (file)
@@ -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;