chiark / gitweb /
machine: make sure unpriviliged "machinectl status" can show the machine's OS version
[elogind.git] / src / rfkill / rfkill.c
index 986605e50b183da334f70af4de42ed9b9d448f97..c7c659292abefb0fb0ece120bbf70878fe4dd47d 100644 (file)
@@ -24,7 +24,6 @@
 #include "fileio.h"
 #include "libudev.h"
 #include "udev-util.h"
-#include "util.h"
 
 int main(int argc, char *argv[]) {
         _cleanup_udev_unref_ struct udev *udev = NULL;
@@ -96,9 +95,12 @@ int main(int argc, char *argv[]) {
                 return EXIT_FAILURE;
         }
 
-        if (streq(argv[1], "load") && restore_state()) {
+        if (streq(argv[1], "load")) {
                 _cleanup_free_ char *value = NULL;
 
+                if (!shall_restore_state())
+                        return EXIT_SUCCESS;
+
                 r = read_one_line_file(saved, &value);
                 if (r < 0) {