chiark / gitweb /
bus: only if the user tries to read over the end of an array we should handle this...
[elogind.git] / src / rfkill / rfkill.c
index 812cf408fb2aacbe20f890f3e153e470b8f58b07..d5b6f27b8d06480380affc36f453dc5ca5b1134e 100644 (file)
@@ -95,7 +95,7 @@ int main(int argc, char *argv[]) {
                 return EXIT_FAILURE;
         }
 
-        if (streq(argv[1], "load")) {
+        if (streq(argv[1], "load") && restore_state()) {
                 _cleanup_free_ char *value = NULL;
 
                 r = read_one_line_file(saved, &value);