chiark / gitweb /
trivial: rfkill - don't include util.h twice
[elogind.git] / src / rfkill / rfkill.c
index ad1d63d..d5b6f27 100644 (file)
@@ -86,7 +86,7 @@ int main(int argc, char *argv[]) {
                         return EXIT_FAILURE;
                 }
 
-                saved = strjoin("/var/lib/systemd/rfkill/", escaped_path_id, "-", escaped_name, NULL);
+                saved = strjoin("/var/lib/systemd/rfkill/", escaped_path_id, ":", escaped_name, NULL);
         } else
                 saved = strjoin("/var/lib/systemd/rfkill/", escaped_name, NULL);
 
@@ -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);