summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSven Eden <yamakuzure@gmx.net>2017-12-08 17:52:41 +0100
committerSven Eden <yamakuzure@gmx.net>2017-12-08 17:54:29 +0100
commit7426d18c6001ea1b90267e14d6f85ce24994bebb (patch)
tree0d3a165d02f9eabbf95bd114212f862024f2ef66
parentb2ba58acabda1830f0e58ba0d623861a126c43bf (diff)
Fix various build failures with the latest systemd updates.
-rw-r--r--src/basic/cgroup-util.c4
-rw-r--r--src/basic/path-util.c2
-rw-r--r--src/core/cgroup.c2
-rw-r--r--src/core/cgroup.h2
-rw-r--r--src/login/elogind-dbus.c16
-rw-r--r--src/login/elogind-dbus.h1
-rw-r--r--src/login/loginctl.c2
-rw-r--r--src/shared/clean-ipc.c2
8 files changed, 27 insertions, 4 deletions
diff --git a/src/basic/cgroup-util.c b/src/basic/cgroup-util.c
index a8de2424d..9b4a56085 100644
--- a/src/basic/cgroup-util.c
+++ b/src/basic/cgroup-util.c
@@ -1037,7 +1037,11 @@ int cg_get_xattr(const char *controller, const char *path, const char *name, voi
int cg_pid_get_path(const char *controller, pid_t pid, char **path) {
_cleanup_fclose_ FILE *f = NULL;
char line[LINE_MAX];
+#if 0 // At elogind we do not want that (false alarm) "maybe uninitialized" warning
const char *fs, *controller_str;
+#else
+ const char *fs, *controller_str = NULL;
+#endif // 0
size_t cs = 0;
int unified;
diff --git a/src/basic/path-util.c b/src/basic/path-util.c
index 9ee0547fc..fa17fc034 100644
--- a/src/basic/path-util.c
+++ b/src/basic/path-util.c
@@ -34,7 +34,7 @@
#include "alloc-util.h"
#include "extract-word.h"
#include "fs-util.h"
-#include "glob-util.h"
+//#include "glob-util.h"
#include "log.h"
#include "macro.h"
#include "missing.h"
diff --git a/src/core/cgroup.c b/src/core/cgroup.c
index 742c21669..664defceb 100644
--- a/src/core/cgroup.c
+++ b/src/core/cgroup.c
@@ -21,7 +21,7 @@
#include <fnmatch.h>
#include "alloc-util.h"
-#include "bpf-firewall.h"
+//#include "bpf-firewall.h"
#include "cgroup-util.h"
#include "cgroup.h"
#include "fd-util.h"
diff --git a/src/core/cgroup.h b/src/core/cgroup.h
index dc4b4cadf..14aa68cbf 100644
--- a/src/core/cgroup.h
+++ b/src/core/cgroup.h
@@ -24,7 +24,7 @@
//#include "list.h"
//#include "time-util.h"
#include "cgroup-util.h"
-#include "ip-address-access.h"
+//#include "ip-address-access.h"
#if 0 /// UNNEEDED by elogind
typedef struct CGroupContext CGroupContext;
diff --git a/src/login/elogind-dbus.c b/src/login/elogind-dbus.c
index a9b39c238..ede2bfd35 100644
--- a/src/login/elogind-dbus.c
+++ b/src/login/elogind-dbus.c
@@ -380,6 +380,22 @@ int method_reboot(sd_bus_message *message, void *userdata, sd_bus_error *error)
error);
}
+int method_halt(sd_bus_message *message, void *userdata, sd_bus_error *error) {
+ Manager *m = userdata;
+
+ log_debug_elogind("%s called", __FUNCTION__);
+
+ return method_do_shutdown_or_sleep(
+ m, message,
+ HANDLE_HALT,
+ INHIBIT_SHUTDOWN,
+ "org.freedesktop.login1.halt",
+ "org.freedesktop.login1.halt-multiple-sessions",
+ "org.freedesktop.login1.halt-ignore-inhibit",
+ NULL,
+ error);
+}
+
int method_suspend(sd_bus_message *message, void *userdata, sd_bus_error *error) {
Manager *m = userdata;
diff --git a/src/login/elogind-dbus.h b/src/login/elogind-dbus.h
index 87ab2b869..616208316 100644
--- a/src/login/elogind-dbus.h
+++ b/src/login/elogind-dbus.h
@@ -25,6 +25,7 @@
int manager_scheduled_shutdown_handler(sd_event_source *s, uint64_t usec,
void *userdata);
+int method_halt (sd_bus_message *message, void *userdata, sd_bus_error *error);
int method_hibernate (sd_bus_message *message, void *userdata, sd_bus_error *error);
int method_hybrid_sleep(sd_bus_message *message, void *userdata, sd_bus_error *error);
int method_poweroff (sd_bus_message *message, void *userdata, sd_bus_error *error);
diff --git a/src/login/loginctl.c b/src/login/loginctl.c
index 45daf54fb..4948d2ee7 100644
--- a/src/login/loginctl.c
+++ b/src/login/loginctl.c
@@ -27,7 +27,7 @@
#include "alloc-util.h"
#include "bus-error.h"
-#include "bus-unit-util.h"
+//#include "bus-unit-util.h"
#include "bus-util.h"
//#include "cgroup-show.h"
#include "cgroup-util.h"
diff --git a/src/shared/clean-ipc.c b/src/shared/clean-ipc.c
index b328432ad..defd83e26 100644
--- a/src/shared/clean-ipc.c
+++ b/src/shared/clean-ipc.c
@@ -451,6 +451,7 @@ int clean_ipc_internal(uid_t uid, gid_t gid, bool rm) {
ret = r;
}
+#if 0 /// Nothing in elogind uses mqueues
r = clean_posix_mq(uid, gid, rm);
if (r != 0) {
if (!rm)
@@ -458,6 +459,7 @@ int clean_ipc_internal(uid_t uid, gid_t gid, bool rm) {
if (ret == 0)
ret = r;
}
+#endif // 0
return ret;
}