chiark / gitweb /
Prep v228: Removed EFI bits. elogind can not support EFI at all.
[elogind.git] / src / login / logind-dbus.c
index 0c25d1f6f13dc70286cfb76c438eb13a55d2c271..5383538d118c3df88769aa97c4d72565db0caecb 100644 (file)
@@ -32,7 +32,7 @@
 #include "bus-error.h"
 #include "bus-util.h"
 #include "dirent-util.h"
-#include "efivars.h"
+//#include "efivars.h"
 #include "escape.h"
 #include "fd-util.h"
 #include "fileio-label.h"
@@ -50,7 +50,7 @@
 #include "udev-util.h"
 #include "unit-name.h"
 #include "user-util.h"
-#include "utmp-wtmp.h"
+//#include "utmp-wtmp.h"
 
 int manager_get_session_from_creds(Manager *m, sd_bus_message *message, const char *name, sd_bus_error *error, Session **ret) {
         _cleanup_bus_creds_unref_ sd_bus_creds *creds = NULL;
@@ -2052,9 +2052,12 @@ static int method_schedule_shutdown(sd_bus_message *message, void *userdata, sd_
                 }
         }
 
+/// elogind does not support utmp-wtmp
+#if 0
         r = manager_setup_wall_message_timer(m);
         if (r < 0)
                 return r;
+#endif // 0
 
         if (!isempty(type)) {
                 r = update_schedule_file(m);
@@ -2076,6 +2079,8 @@ static int method_cancel_scheduled_shutdown(sd_bus_message *message, void *userd
         cancelled = m->scheduled_shutdown_type != NULL;
         reset_scheduled_shutdown(m);
 
+/// elogind does not support utmp-wtmp
+#if 0
         if (cancelled) {
                 _cleanup_bus_creds_unref_ sd_bus_creds *creds = NULL;
                 const char *tty = NULL;
@@ -2091,6 +2096,7 @@ static int method_cancel_scheduled_shutdown(sd_bus_message *message, void *userd
                 utmp_wall("The system shutdown has been cancelled",
                           uid_to_name(uid), tty, logind_wall_tty_filter, m);
         }
+#endif // 0
 
         return sd_bus_reply_method_return(message, "b", cancelled);
 }
@@ -2288,6 +2294,8 @@ static int property_get_reboot_to_firmware_setup(
                 sd_bus_message *reply,
                 void *userdata,
                 sd_bus_error *error) {
+/// elogind does not support EFI
+#if 0
         int r;
 
         assert(bus);
@@ -2299,6 +2307,9 @@ static int property_get_reboot_to_firmware_setup(
                 return r;
 
         return sd_bus_message_append(reply, "b", r > 0);
+#else
+        return sd_bus_message_append(reply, "b", -EOPNOTSUPP);
+#endif // 0
 }
 
 static int method_set_reboot_to_firmware_setup(
@@ -2329,9 +2340,12 @@ static int method_set_reboot_to_firmware_setup(
         if (r == 0)
                 return 1; /* No authorization for now, but the async polkit stuff will call us again when it has it */
 
+/// elogind does not support EFI
+#if 0
         r = efi_set_reboot_to_firmware(b);
         if (r < 0)
                 return r;
+#endif // 0
 
         return sd_bus_reply_method_return(message, NULL);
 }
@@ -2341,6 +2355,8 @@ static int method_can_reboot_to_firmware_setup(
                 void *userdata,
                 sd_bus_error *error) {
 
+/// elogind does not support EFI
+#if 0
         int r;
         bool challenge;
         const char *result;
@@ -2373,6 +2389,9 @@ static int method_can_reboot_to_firmware_setup(
                 result = "no";
 
         return sd_bus_reply_method_return(message, "s", result);
+#else
+        return sd_bus_reply_method_return(message, "s", "na");
+#endif // 0
 }
 
 static int method_set_wall_message(