summaryrefslogtreecommitdiff
path: root/src/grp-system/libcore
diff options
context:
space:
mode:
authorLuke Shumaker <lukeshu@sbcglobal.net>2016-10-21 14:10:13 -0400
committerLuke Shumaker <lukeshu@sbcglobal.net>2016-10-21 14:10:13 -0400
commit0b4288e3168dee3224c04871528170442305348f (patch)
treedd7088c01724398bbb6edb47ba07f4737fcc8a5d /src/grp-system/libcore
parent3ff85c76a6594fae008a548800fd47a126ab6eb5 (diff)
libcore, nspawn
Diffstat (limited to 'src/grp-system/libcore')
-rw-r--r--src/grp-system/libcore/Makefile148
-rw-r--r--src/grp-system/libcore/include/core/automount.h (renamed from src/grp-system/libcore/automount.h)0
-rw-r--r--src/grp-system/libcore/include/core/bus-policy.h (renamed from src/grp-system/libcore/bus-policy.h)3
-rw-r--r--src/grp-system/libcore/include/core/busname.h (renamed from src/grp-system/libcore/busname.h)0
-rw-r--r--src/grp-system/libcore/include/core/cgroup.h (renamed from src/grp-system/libcore/cgroup.h)8
-rw-r--r--src/grp-system/libcore/include/core/dbus-manager.h (renamed from src/grp-system/libcore/dbus-manager.h)0
-rw-r--r--src/grp-system/libcore/include/core/device.h (renamed from src/grp-system/libcore/device.h)0
-rw-r--r--src/grp-system/libcore/include/core/execute.h (renamed from src/grp-system/libcore/execute.h)0
-rw-r--r--src/grp-system/libcore/include/core/failure-action.h (renamed from src/grp-system/libcore/failure-action.h)0
-rw-r--r--src/grp-system/libcore/include/core/hostname-setup.h (renamed from src/grp-system/libcore/hostname-setup.h)0
-rw-r--r--src/grp-system/libcore/include/core/ima-setup.h (renamed from src/grp-system/libcore/ima-setup.h)0
-rw-r--r--src/grp-system/libcore/include/core/job.h (renamed from src/grp-system/libcore/job.h)0
-rw-r--r--src/grp-system/libcore/include/core/kill.h (renamed from src/grp-system/libcore/kill.h)0
-rw-r--r--src/grp-system/libcore/include/core/killall.h (renamed from src/grp-system/libcore/killall.h)0
-rw-r--r--src/grp-system/libcore/include/core/kmod-setup.h (renamed from src/grp-system/libcore/kmod-setup.h)0
-rw-r--r--src/grp-system/libcore/include/core/load-fragment.h (renamed from src/grp-system/libcore/load-fragment.h)0
-rw-r--r--src/grp-system/libcore/include/core/loopback-setup.h (renamed from src/grp-system/libcore/loopback-setup.h)0
-rw-r--r--src/grp-system/libcore/include/core/machine-id-setup.h (renamed from src/grp-system/libcore/machine-id-setup.h)0
-rw-r--r--src/grp-system/libcore/include/core/manager.h (renamed from src/grp-system/libcore/manager.h)0
-rw-r--r--src/grp-system/libcore/include/core/mount-setup.h (renamed from src/grp-system/libcore/mount-setup.h)0
-rw-r--r--src/grp-system/libcore/include/core/mount.h (renamed from src/grp-system/libcore/mount.h)0
-rw-r--r--src/grp-system/libcore/include/core/namespace.h (renamed from src/grp-system/libcore/namespace.h)0
-rw-r--r--src/grp-system/libcore/include/core/path.h (renamed from src/grp-system/libcore/path.h)0
-rw-r--r--src/grp-system/libcore/include/core/scope.h (renamed from src/grp-system/libcore/scope.h)0
-rw-r--r--src/grp-system/libcore/include/core/selinux-setup.h (renamed from src/grp-system/libcore/selinux-setup.h)0
-rw-r--r--src/grp-system/libcore/include/core/service.h (renamed from src/grp-system/libcore/service.h)0
-rw-r--r--src/grp-system/libcore/include/core/show-status.h (renamed from src/grp-system/libcore/show-status.h)0
-rw-r--r--src/grp-system/libcore/include/core/slice.h (renamed from src/grp-system/libcore/slice.h)0
-rw-r--r--src/grp-system/libcore/include/core/smack-setup.h (renamed from src/grp-system/libcore/smack-setup.h)0
-rw-r--r--src/grp-system/libcore/include/core/socket.h (renamed from src/grp-system/libcore/socket.h)0
-rw-r--r--src/grp-system/libcore/include/core/swap.h (renamed from src/grp-system/libcore/swap.h)0
-rw-r--r--src/grp-system/libcore/include/core/target.h (renamed from src/grp-system/libcore/target.h)0
-rw-r--r--src/grp-system/libcore/include/core/timer.h (renamed from src/grp-system/libcore/timer.h)0
-rw-r--r--src/grp-system/libcore/include/core/unit.h (renamed from src/grp-system/libcore/unit.h)0
-rw-r--r--src/grp-system/libcore/src/Makefile175
-rw-r--r--src/grp-system/libcore/src/audit-fd.c (renamed from src/grp-system/libcore/audit-fd.c)0
-rw-r--r--src/grp-system/libcore/src/audit-fd.h (renamed from src/grp-system/libcore/audit-fd.h)0
-rw-r--r--src/grp-system/libcore/src/automount.c (renamed from src/grp-system/libcore/automount.c)6
-rw-r--r--src/grp-system/libcore/src/bus-policy.c (renamed from src/grp-system/libcore/bus-policy.c)3
-rw-r--r--src/grp-system/libcore/src/busname.c (renamed from src/grp-system/libcore/busname.c)6
-rw-r--r--src/grp-system/libcore/src/cgroup.c (renamed from src/grp-system/libcore/cgroup.c)3
-rw-r--r--src/grp-system/libcore/src/dbus-automount.c (renamed from src/grp-system/libcore/dbus-automount.c)2
-rw-r--r--src/grp-system/libcore/src/dbus-automount.h (renamed from src/grp-system/libcore/dbus-automount.h)0
-rw-r--r--src/grp-system/libcore/src/dbus-busname.c (renamed from src/grp-system/libcore/dbus-busname.c)4
-rw-r--r--src/grp-system/libcore/src/dbus-busname.h (renamed from src/grp-system/libcore/dbus-busname.h)0
-rw-r--r--src/grp-system/libcore/src/dbus-cgroup.c (renamed from src/grp-system/libcore/dbus-cgroup.c)2
-rw-r--r--src/grp-system/libcore/src/dbus-cgroup.h (renamed from src/grp-system/libcore/dbus-cgroup.h)2
-rw-r--r--src/grp-system/libcore/src/dbus-device.c (renamed from src/grp-system/libcore/dbus-device.c)5
-rw-r--r--src/grp-system/libcore/src/dbus-device.h (renamed from src/grp-system/libcore/dbus-device.h)2
-rw-r--r--src/grp-system/libcore/src/dbus-execute.c (renamed from src/grp-system/libcore/dbus-execute.c)4
-rw-r--r--src/grp-system/libcore/src/dbus-execute.h (renamed from src/grp-system/libcore/dbus-execute.h)2
-rw-r--r--src/grp-system/libcore/src/dbus-job.c (renamed from src/grp-system/libcore/dbus-job.c)2
-rw-r--r--src/grp-system/libcore/src/dbus-job.h (renamed from src/grp-system/libcore/dbus-job.h)2
-rw-r--r--src/grp-system/libcore/src/dbus-kill.c (renamed from src/grp-system/libcore/dbus-kill.c)2
-rw-r--r--src/grp-system/libcore/src/dbus-kill.h (renamed from src/grp-system/libcore/dbus-kill.h)4
-rw-r--r--src/grp-system/libcore/src/dbus-manager.c (renamed from src/grp-system/libcore/dbus-manager.c)2
-rw-r--r--src/grp-system/libcore/src/dbus-mount.c (renamed from src/grp-system/libcore/dbus-mount.c)4
-rw-r--r--src/grp-system/libcore/src/dbus-mount.h (renamed from src/grp-system/libcore/dbus-mount.h)2
-rw-r--r--src/grp-system/libcore/src/dbus-path.c (renamed from src/grp-system/libcore/dbus-path.c)4
-rw-r--r--src/grp-system/libcore/src/dbus-path.h (renamed from src/grp-system/libcore/dbus-path.h)0
-rw-r--r--src/grp-system/libcore/src/dbus-scope.c (renamed from src/grp-system/libcore/dbus-scope.c)4
-rw-r--r--src/grp-system/libcore/src/dbus-scope.h (renamed from src/grp-system/libcore/dbus-scope.h)2
-rw-r--r--src/grp-system/libcore/src/dbus-service.c (renamed from src/grp-system/libcore/dbus-service.c)4
-rw-r--r--src/grp-system/libcore/src/dbus-service.h (renamed from src/grp-system/libcore/dbus-service.h)2
-rw-r--r--src/grp-system/libcore/src/dbus-slice.c (renamed from src/grp-system/libcore/dbus-slice.c)5
-rw-r--r--src/grp-system/libcore/src/dbus-slice.h (renamed from src/grp-system/libcore/dbus-slice.h)2
-rw-r--r--src/grp-system/libcore/src/dbus-socket.c (renamed from src/grp-system/libcore/dbus-socket.c)4
-rw-r--r--src/grp-system/libcore/src/dbus-socket.h (renamed from src/grp-system/libcore/dbus-socket.h)2
-rw-r--r--src/grp-system/libcore/src/dbus-swap.c (renamed from src/grp-system/libcore/dbus-swap.c)4
-rw-r--r--src/grp-system/libcore/src/dbus-swap.h (renamed from src/grp-system/libcore/dbus-swap.h)2
-rw-r--r--src/grp-system/libcore/src/dbus-target.c (renamed from src/grp-system/libcore/dbus-target.c)3
-rw-r--r--src/grp-system/libcore/src/dbus-target.h (renamed from src/grp-system/libcore/dbus-target.h)0
-rw-r--r--src/grp-system/libcore/src/dbus-timer.c (renamed from src/grp-system/libcore/dbus-timer.c)4
-rw-r--r--src/grp-system/libcore/src/dbus-timer.h (renamed from src/grp-system/libcore/dbus-timer.h)2
-rw-r--r--src/grp-system/libcore/src/dbus-unit.c (renamed from src/grp-system/libcore/dbus-unit.c)0
-rw-r--r--src/grp-system/libcore/src/dbus-unit.h (renamed from src/grp-system/libcore/dbus-unit.h)2
-rw-r--r--src/grp-system/libcore/src/dbus.c (renamed from src/grp-system/libcore/dbus.c)2
-rw-r--r--src/grp-system/libcore/src/dbus.h (renamed from src/grp-system/libcore/dbus.h)2
-rw-r--r--src/grp-system/libcore/src/device.c (renamed from src/grp-system/libcore/device.c)6
-rw-r--r--src/grp-system/libcore/src/execute.c (renamed from src/grp-system/libcore/execute.c)8
-rw-r--r--src/grp-system/libcore/src/failure-action.c (renamed from src/grp-system/libcore/failure-action.c)3
-rw-r--r--src/grp-system/libcore/src/hostname-setup.c (renamed from src/grp-system/libcore/hostname-setup.c)3
-rw-r--r--src/grp-system/libcore/src/ima-setup.c (renamed from src/grp-system/libcore/ima-setup.c)3
-rw-r--r--src/grp-system/libcore/src/job.c (renamed from src/grp-system/libcore/job.c)4
-rw-r--r--src/grp-system/libcore/src/kill.c (renamed from src/grp-system/libcore/kill.c)3
-rw-r--r--src/grp-system/libcore/src/killall.c (renamed from src/grp-system/libcore/killall.c)3
-rw-r--r--src/grp-system/libcore/src/kmod-setup.c (renamed from src/grp-system/libcore/kmod-setup.c)3
-rw-r--r--src/grp-system/libcore/src/linux/auto_dev-ioctl.h (renamed from src/grp-system/libcore/linux/auto_dev-ioctl.h)0
-rw-r--r--src/grp-system/libcore/src/load-dropin.c (renamed from src/grp-system/libcore/load-dropin.c)4
-rw-r--r--src/grp-system/libcore/src/load-dropin.h (renamed from src/grp-system/libcore/load-dropin.h)3
-rw-r--r--src/grp-system/libcore/src/load-fragment-gperf.gperf.m4 (renamed from src/grp-system/libcore/load-fragment-gperf.gperf.m4)8
-rw-r--r--src/grp-system/libcore/src/load-fragment.c (renamed from src/grp-system/libcore/load-fragment.c)7
-rw-r--r--src/grp-system/libcore/src/locale-setup.c (renamed from src/grp-system/libcore/locale-setup.c)0
-rw-r--r--src/grp-system/libcore/src/locale-setup.h (renamed from src/grp-system/libcore/locale-setup.h)0
-rw-r--r--src/grp-system/libcore/src/loopback-setup.c (renamed from src/grp-system/libcore/loopback-setup.c)3
-rw-r--r--src/grp-system/libcore/src/machine-id-setup.c (renamed from src/grp-system/libcore/machine-id-setup.c)3
-rw-r--r--src/grp-system/libcore/src/manager.c (renamed from src/grp-system/libcore/manager.c)4
-rw-r--r--src/grp-system/libcore/src/mount-setup.c (renamed from src/grp-system/libcore/mount-setup.c)3
-rw-r--r--src/grp-system/libcore/src/mount.c (renamed from src/grp-system/libcore/mount.c)8
-rw-r--r--src/grp-system/libcore/src/namespace.c (renamed from src/grp-system/libcore/namespace.c)5
-rw-r--r--src/grp-system/libcore/src/path.c (renamed from src/grp-system/libcore/path.c)4
-rw-r--r--src/grp-system/libcore/src/scope.c (renamed from src/grp-system/libcore/scope.c)4
-rw-r--r--src/grp-system/libcore/src/selinux-access.c (renamed from src/grp-system/libcore/selinux-access.c)0
-rw-r--r--src/grp-system/libcore/src/selinux-access.h (renamed from src/grp-system/libcore/selinux-access.h)3
-rw-r--r--src/grp-system/libcore/src/selinux-setup.c (renamed from src/grp-system/libcore/selinux-setup.c)3
-rw-r--r--src/grp-system/libcore/src/service.c (renamed from src/grp-system/libcore/service.c)8
-rw-r--r--src/grp-system/libcore/src/show-status.c (renamed from src/grp-system/libcore/show-status.c)3
-rw-r--r--src/grp-system/libcore/src/slice.c (renamed from src/grp-system/libcore/slice.c)4
-rw-r--r--src/grp-system/libcore/src/smack-setup.c (renamed from src/grp-system/libcore/smack-setup.c)3
-rw-r--r--src/grp-system/libcore/src/socket.c (renamed from src/grp-system/libcore/socket.c)4
-rw-r--r--src/grp-system/libcore/src/swap.c (renamed from src/grp-system/libcore/swap.c)4
-rw-r--r--src/grp-system/libcore/src/target.c (renamed from src/grp-system/libcore/target.c)2
-rw-r--r--src/grp-system/libcore/src/timer.c (renamed from src/grp-system/libcore/timer.c)4
-rw-r--r--src/grp-system/libcore/src/transaction.c (renamed from src/grp-system/libcore/transaction.c)0
-rw-r--r--src/grp-system/libcore/src/transaction.h (renamed from src/grp-system/libcore/transaction.h)7
-rw-r--r--src/grp-system/libcore/src/unit-printf.c (renamed from src/grp-system/libcore/unit-printf.c)2
-rw-r--r--src/grp-system/libcore/src/unit-printf.h (renamed from src/grp-system/libcore/unit-printf.h)2
-rw-r--r--src/grp-system/libcore/src/unit.c (renamed from src/grp-system/libcore/unit.c)6
118 files changed, 302 insertions, 288 deletions
diff --git a/src/grp-system/libcore/Makefile b/src/grp-system/libcore/Makefile
index a72b4dc7ee..76e6e9ddee 100644
--- a/src/grp-system/libcore/Makefile
+++ b/src/grp-system/libcore/Makefile
@@ -23,152 +23,6 @@
include $(dir $(lastword $(MAKEFILE_LIST)))/../../../config.mk
include $(topsrcdir)/build-aux/Makefile.head.mk
-noinst_LTLIBRARIES += \
- libcore.la
-
-libcore_la_SOURCES = \
- src/core/unit.c \
- src/core/unit.h \
- src/core/unit-printf.c \
- src/core/unit-printf.h \
- src/core/job.c \
- src/core/job.h \
- src/core/manager.c \
- src/core/manager.h \
- src/core/transaction.c \
- src/core/transaction.h \
- src/core/load-fragment.c \
- src/core/load-fragment.h \
- src/core/service.c \
- src/core/service.h \
- src/core/socket.c \
- src/core/socket.h \
- src/core/busname.c \
- src/core/busname.h \
- src/core/bus-policy.c \
- src/core/bus-policy.h \
- src/core/target.c \
- src/core/target.h \
- src/core/device.c \
- src/core/device.h \
- src/core/mount.c \
- src/core/mount.h \
- src/core/automount.c \
- src/core/automount.h \
- src/core/swap.c \
- src/core/swap.h \
- src/core/timer.c \
- src/core/timer.h \
- src/core/path.c \
- src/core/path.h \
- src/core/slice.c \
- src/core/slice.h \
- src/core/scope.c \
- src/core/scope.h \
- src/core/load-dropin.c \
- src/core/load-dropin.h \
- src/core/execute.c \
- src/core/execute.h \
- src/core/kill.c \
- src/core/kill.h \
- src/core/dbus.c \
- src/core/dbus.h \
- src/core/dbus-manager.c \
- src/core/dbus-manager.h \
- src/core/dbus-unit.c \
- src/core/dbus-unit.h \
- src/core/dbus-job.c \
- src/core/dbus-job.h \
- src/core/dbus-service.c \
- src/core/dbus-service.h \
- src/core/dbus-socket.c \
- src/core/dbus-socket.h \
- src/core/dbus-busname.c \
- src/core/dbus-busname.h \
- src/core/dbus-target.c \
- src/core/dbus-target.h \
- src/core/dbus-device.c \
- src/core/dbus-device.h \
- src/core/dbus-mount.c \
- src/core/dbus-mount.h \
- src/core/dbus-automount.c \
- src/core/dbus-automount.h \
- src/core/dbus-swap.c \
- src/core/dbus-swap.h \
- src/core/dbus-timer.c \
- src/core/dbus-timer.h \
- src/core/dbus-path.c \
- src/core/dbus-path.h \
- src/core/dbus-slice.c \
- src/core/dbus-slice.h \
- src/core/dbus-scope.c \
- src/core/dbus-scope.h \
- src/core/dbus-execute.c \
- src/core/dbus-execute.h \
- src/core/dbus-kill.c \
- src/core/dbus-kill.h \
- src/core/dbus-cgroup.c \
- src/core/dbus-cgroup.h \
- src/core/cgroup.c \
- src/core/cgroup.h \
- src/core/selinux-access.c \
- src/core/selinux-access.h \
- src/core/selinux-setup.c \
- src/core/selinux-setup.h \
- src/core/smack-setup.c \
- src/core/smack-setup.h \
- src/core/ima-setup.c \
- src/core/ima-setup.h \
- src/core/locale-setup.h \
- src/core/locale-setup.c \
- src/core/hostname-setup.c \
- src/core/hostname-setup.h \
- src/core/machine-id-setup.c \
- src/core/machine-id-setup.h \
- src/core/mount-setup.c \
- src/core/mount-setup.h \
- src/core/kmod-setup.c \
- src/core/kmod-setup.h \
- src/core/loopback-setup.h \
- src/core/loopback-setup.c \
- src/core/namespace.c \
- src/core/namespace.h \
- src/core/killall.h \
- src/core/killall.c \
- src/core/audit-fd.c \
- src/core/audit-fd.h \
- src/core/show-status.c \
- src/core/show-status.h \
- src/core/failure-action.c \
- src/core/failure-action.h
-
-nodist_libcore_la_SOURCES = \
- src/core/load-fragment-gperf.c \
- src/core/load-fragment-gperf-nulstr.c
-
-libcore_la_CFLAGS = \
- $(PAM_CFLAGS) \
- $(AUDIT_CFLAGS) \
- $(KMOD_CFLAGS) \
- $(APPARMOR_CFLAGS) \
- $(MOUNT_CFLAGS) \
- $(SECCOMP_CFLAGS)
-
-libcore_la_LIBADD = \
- libsystemd-shared.la \
- $(PAM_LIBS) \
- $(AUDIT_LIBS) \
- $(KMOD_LIBS) \
- $(APPARMOR_LIBS) \
- $(MOUNT_LIBS)
-
-$(outdir)/load-fragment-gperf-nulstr.c: $(outdir)/load-fragment-gperf.gperf
- $(AM_V_GEN)$(AWK) 'BEGIN{ keywords=0 ; FS="," ; print "extern const char load_fragment_gperf_nulstr[];" ; print "const char load_fragment_gperf_nulstr[] ="} ; keyword==1 { print "\"" $$1 "\\0\"" } ; /%%/ { keyword=1} ; END { print ";" }' < $< > $@
-
-sd.CPPFLAGS += -I$(topsrcdir)/src/libudev/src
-sd.CPPFLAGS += -DMOUNT_PATH=\"$(MOUNT_PATH)\"
-sd.CPPFLAGS += -DUMOUNT_PATH=\"$(UMOUNT_PATH)\"
-sd.CPPFLAGS += -DSYSTEMD_CGROUP_AGENT_PATH=\"$(libexecdir)/systemd-cgroups-agent\"
-sd.CPPFLAGS += -DSYSTEMD_BINARY_PATH=\"$(libexecdir)/systemd\"
+nested.subdirs += src
include $(topsrcdir)/build-aux/Makefile.tail.mk
diff --git a/src/grp-system/libcore/automount.h b/src/grp-system/libcore/include/core/automount.h
index 76a201178e..76a201178e 100644
--- a/src/grp-system/libcore/automount.h
+++ b/src/grp-system/libcore/include/core/automount.h
diff --git a/src/grp-system/libcore/bus-policy.h b/src/grp-system/libcore/include/core/bus-policy.h
index a338f29af6..3fb64f0fd0 100644
--- a/src/grp-system/libcore/bus-policy.h
+++ b/src/grp-system/libcore/include/core/bus-policy.h
@@ -19,10 +19,11 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
-#include "sd-bus/kdbus.h"
#include "systemd-basic/list.h"
#include "systemd-basic/macro.h"
+struct kdbus_item;
+
typedef struct BusNamePolicy BusNamePolicy;
typedef enum BusPolicyAccess {
diff --git a/src/grp-system/libcore/busname.h b/src/grp-system/libcore/include/core/busname.h
index 95a356bddc..95a356bddc 100644
--- a/src/grp-system/libcore/busname.h
+++ b/src/grp-system/libcore/include/core/busname.h
diff --git a/src/grp-system/libcore/cgroup.h b/src/grp-system/libcore/include/core/cgroup.h
index a52a70b5e6..0026609570 100644
--- a/src/grp-system/libcore/cgroup.h
+++ b/src/grp-system/libcore/include/core/cgroup.h
@@ -21,6 +21,10 @@
#include <stdbool.h>
+#include "systemd-basic/cgroup-util.h"
+#include "systemd-basic/list.h"
+#include "systemd-basic/time-util.h"
+
typedef struct CGroupContext CGroupContext;
typedef struct CGroupDeviceAllow CGroupDeviceAllow;
typedef struct CGroupIODeviceWeight CGroupIODeviceWeight;
@@ -28,10 +32,6 @@ typedef struct CGroupIODeviceLimit CGroupIODeviceLimit;
typedef struct CGroupBlockIODeviceWeight CGroupBlockIODeviceWeight;
typedef struct CGroupBlockIODeviceBandwidth CGroupBlockIODeviceBandwidth;
-#include "systemd-basic/cgroup-util.h"
-#include "systemd-basic/list.h"
-#include "systemd-basic/time-util.h"
-
typedef enum CGroupDevicePolicy {
/* When devices listed, will allow those, plus built-in ones,
diff --git a/src/grp-system/libcore/dbus-manager.h b/src/grp-system/libcore/include/core/dbus-manager.h
index 36a2e9481b..36a2e9481b 100644
--- a/src/grp-system/libcore/dbus-manager.h
+++ b/src/grp-system/libcore/include/core/dbus-manager.h
diff --git a/src/grp-system/libcore/device.h b/src/grp-system/libcore/include/core/device.h
index 60d5122966..60d5122966 100644
--- a/src/grp-system/libcore/device.h
+++ b/src/grp-system/libcore/include/core/device.h
diff --git a/src/grp-system/libcore/execute.h b/src/grp-system/libcore/include/core/execute.h
index 178adc00ae..178adc00ae 100644
--- a/src/grp-system/libcore/execute.h
+++ b/src/grp-system/libcore/include/core/execute.h
diff --git a/src/grp-system/libcore/failure-action.h b/src/grp-system/libcore/include/core/failure-action.h
index 47c08f4006..47c08f4006 100644
--- a/src/grp-system/libcore/failure-action.h
+++ b/src/grp-system/libcore/include/core/failure-action.h
diff --git a/src/grp-system/libcore/hostname-setup.h b/src/grp-system/libcore/include/core/hostname-setup.h
index 73e8c75c71..73e8c75c71 100644
--- a/src/grp-system/libcore/hostname-setup.h
+++ b/src/grp-system/libcore/include/core/hostname-setup.h
diff --git a/src/grp-system/libcore/ima-setup.h b/src/grp-system/libcore/include/core/ima-setup.h
index 472b58cb00..472b58cb00 100644
--- a/src/grp-system/libcore/ima-setup.h
+++ b/src/grp-system/libcore/include/core/ima-setup.h
diff --git a/src/grp-system/libcore/job.h b/src/grp-system/libcore/include/core/job.h
index 7338601bb7..7338601bb7 100644
--- a/src/grp-system/libcore/job.h
+++ b/src/grp-system/libcore/include/core/job.h
diff --git a/src/grp-system/libcore/kill.h b/src/grp-system/libcore/include/core/kill.h
index ad8583b9b0..ad8583b9b0 100644
--- a/src/grp-system/libcore/kill.h
+++ b/src/grp-system/libcore/include/core/kill.h
diff --git a/src/grp-system/libcore/killall.h b/src/grp-system/libcore/include/core/killall.h
index bbb101c863..bbb101c863 100644
--- a/src/grp-system/libcore/killall.h
+++ b/src/grp-system/libcore/include/core/killall.h
diff --git a/src/grp-system/libcore/kmod-setup.h b/src/grp-system/libcore/include/core/kmod-setup.h
index 685f4df301..685f4df301 100644
--- a/src/grp-system/libcore/kmod-setup.h
+++ b/src/grp-system/libcore/include/core/kmod-setup.h
diff --git a/src/grp-system/libcore/load-fragment.h b/src/grp-system/libcore/include/core/load-fragment.h
index b36a2e3a02..b36a2e3a02 100644
--- a/src/grp-system/libcore/load-fragment.h
+++ b/src/grp-system/libcore/include/core/load-fragment.h
diff --git a/src/grp-system/libcore/loopback-setup.h b/src/grp-system/libcore/include/core/loopback-setup.h
index e7547b8a26..e7547b8a26 100644
--- a/src/grp-system/libcore/loopback-setup.h
+++ b/src/grp-system/libcore/include/core/loopback-setup.h
diff --git a/src/grp-system/libcore/machine-id-setup.h b/src/grp-system/libcore/include/core/machine-id-setup.h
index 88830ecc42..88830ecc42 100644
--- a/src/grp-system/libcore/machine-id-setup.h
+++ b/src/grp-system/libcore/include/core/machine-id-setup.h
diff --git a/src/grp-system/libcore/manager.h b/src/grp-system/libcore/include/core/manager.h
index ae56cf1a9a..ae56cf1a9a 100644
--- a/src/grp-system/libcore/manager.h
+++ b/src/grp-system/libcore/include/core/manager.h
diff --git a/src/grp-system/libcore/mount-setup.h b/src/grp-system/libcore/include/core/mount-setup.h
index 647bd770ae..647bd770ae 100644
--- a/src/grp-system/libcore/mount-setup.h
+++ b/src/grp-system/libcore/include/core/mount-setup.h
diff --git a/src/grp-system/libcore/mount.h b/src/grp-system/libcore/include/core/mount.h
index 0caef2b451..0caef2b451 100644
--- a/src/grp-system/libcore/mount.h
+++ b/src/grp-system/libcore/include/core/mount.h
diff --git a/src/grp-system/libcore/namespace.h b/src/grp-system/libcore/include/core/namespace.h
index 89c6225c39..89c6225c39 100644
--- a/src/grp-system/libcore/namespace.h
+++ b/src/grp-system/libcore/include/core/namespace.h
diff --git a/src/grp-system/libcore/path.h b/src/grp-system/libcore/include/core/path.h
index 4230c8fb99..4230c8fb99 100644
--- a/src/grp-system/libcore/path.h
+++ b/src/grp-system/libcore/include/core/path.h
diff --git a/src/grp-system/libcore/scope.h b/src/grp-system/libcore/include/core/scope.h
index eaf8e8b447..eaf8e8b447 100644
--- a/src/grp-system/libcore/scope.h
+++ b/src/grp-system/libcore/include/core/scope.h
diff --git a/src/grp-system/libcore/selinux-setup.h b/src/grp-system/libcore/include/core/selinux-setup.h
index 7b613249b0..7b613249b0 100644
--- a/src/grp-system/libcore/selinux-setup.h
+++ b/src/grp-system/libcore/include/core/selinux-setup.h
diff --git a/src/grp-system/libcore/service.h b/src/grp-system/libcore/include/core/service.h
index 8670913dbd..8670913dbd 100644
--- a/src/grp-system/libcore/service.h
+++ b/src/grp-system/libcore/include/core/service.h
diff --git a/src/grp-system/libcore/show-status.h b/src/grp-system/libcore/include/core/show-status.h
index 08d6b7f6e1..08d6b7f6e1 100644
--- a/src/grp-system/libcore/show-status.h
+++ b/src/grp-system/libcore/include/core/show-status.h
diff --git a/src/grp-system/libcore/slice.h b/src/grp-system/libcore/include/core/slice.h
index 71e05a4d6a..71e05a4d6a 100644
--- a/src/grp-system/libcore/slice.h
+++ b/src/grp-system/libcore/include/core/slice.h
diff --git a/src/grp-system/libcore/smack-setup.h b/src/grp-system/libcore/include/core/smack-setup.h
index f8c62ce067..f8c62ce067 100644
--- a/src/grp-system/libcore/smack-setup.h
+++ b/src/grp-system/libcore/include/core/smack-setup.h
diff --git a/src/grp-system/libcore/socket.h b/src/grp-system/libcore/include/core/socket.h
index 0e3ead5060..0e3ead5060 100644
--- a/src/grp-system/libcore/socket.h
+++ b/src/grp-system/libcore/include/core/socket.h
diff --git a/src/grp-system/libcore/swap.h b/src/grp-system/libcore/include/core/swap.h
index 52e22e22e8..52e22e22e8 100644
--- a/src/grp-system/libcore/swap.h
+++ b/src/grp-system/libcore/include/core/swap.h
diff --git a/src/grp-system/libcore/target.h b/src/grp-system/libcore/include/core/target.h
index 406b80019c..406b80019c 100644
--- a/src/grp-system/libcore/target.h
+++ b/src/grp-system/libcore/include/core/target.h
diff --git a/src/grp-system/libcore/timer.h b/src/grp-system/libcore/include/core/timer.h
index 4195423a61..4195423a61 100644
--- a/src/grp-system/libcore/timer.h
+++ b/src/grp-system/libcore/include/core/timer.h
diff --git a/src/grp-system/libcore/unit.h b/src/grp-system/libcore/include/core/unit.h
index d57caceb19..d57caceb19 100644
--- a/src/grp-system/libcore/unit.h
+++ b/src/grp-system/libcore/include/core/unit.h
diff --git a/src/grp-system/libcore/src/Makefile b/src/grp-system/libcore/src/Makefile
new file mode 100644
index 0000000000..4f0224e70d
--- /dev/null
+++ b/src/grp-system/libcore/src/Makefile
@@ -0,0 +1,175 @@
+# -*- Mode: makefile; indent-tabs-mode: t -*-
+#
+# This file is part of systemd.
+#
+# Copyright 2010-2012 Lennart Poettering
+# Copyright 2010-2012 Kay Sievers
+# Copyright 2013 Zbigniew Jędrzejewski-Szmek
+# Copyright 2013 David Strauss
+# Copyright 2016 Luke Shumaker
+#
+# systemd is free software; you can redistribute it and/or modify it
+# under the terms of the GNU Lesser General Public License as published by
+# the Free Software Foundation; either version 2.1 of the License, or
+# (at your option) any later version.
+#
+# systemd is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public License
+# along with systemd; If not, see <http://www.gnu.org/licenses/>.
+include $(dir $(lastword $(MAKEFILE_LIST)))/../../../../config.mk
+include $(topsrcdir)/build-aux/Makefile.head.mk
+
+noinst_LTLIBRARIES += \
+ libcore.la
+
+libcore_la_SOURCES = \
+ src/core/unit.c \
+ src/core/unit.h \
+ src/core/unit-printf.c \
+ src/core/unit-printf.h \
+ src/core/job.c \
+ src/core/job.h \
+ src/core/manager.c \
+ src/core/manager.h \
+ src/core/transaction.c \
+ src/core/transaction.h \
+ src/core/load-fragment.c \
+ src/core/load-fragment.h \
+ src/core/service.c \
+ src/core/service.h \
+ src/core/socket.c \
+ src/core/socket.h \
+ src/core/busname.c \
+ src/core/busname.h \
+ src/core/bus-policy.c \
+ src/core/bus-policy.h \
+ src/core/target.c \
+ src/core/target.h \
+ src/core/device.c \
+ src/core/device.h \
+ src/core/mount.c \
+ src/core/mount.h \
+ src/core/automount.c \
+ src/core/automount.h \
+ src/core/swap.c \
+ src/core/swap.h \
+ src/core/timer.c \
+ src/core/timer.h \
+ src/core/path.c \
+ src/core/path.h \
+ src/core/slice.c \
+ src/core/slice.h \
+ src/core/scope.c \
+ src/core/scope.h \
+ src/core/load-dropin.c \
+ src/core/load-dropin.h \
+ src/core/execute.c \
+ src/core/execute.h \
+ src/core/kill.c \
+ src/core/kill.h \
+ src/core/dbus.c \
+ src/core/dbus.h \
+ src/core/dbus-manager.c \
+ src/core/dbus-manager.h \
+ src/core/dbus-unit.c \
+ src/core/dbus-unit.h \
+ src/core/dbus-job.c \
+ src/core/dbus-job.h \
+ src/core/dbus-service.c \
+ src/core/dbus-service.h \
+ src/core/dbus-socket.c \
+ src/core/dbus-socket.h \
+ src/core/dbus-busname.c \
+ src/core/dbus-busname.h \
+ src/core/dbus-target.c \
+ src/core/dbus-target.h \
+ src/core/dbus-device.c \
+ src/core/dbus-device.h \
+ src/core/dbus-mount.c \
+ src/core/dbus-mount.h \
+ src/core/dbus-automount.c \
+ src/core/dbus-automount.h \
+ src/core/dbus-swap.c \
+ src/core/dbus-swap.h \
+ src/core/dbus-timer.c \
+ src/core/dbus-timer.h \
+ src/core/dbus-path.c \
+ src/core/dbus-path.h \
+ src/core/dbus-slice.c \
+ src/core/dbus-slice.h \
+ src/core/dbus-scope.c \
+ src/core/dbus-scope.h \
+ src/core/dbus-execute.c \
+ src/core/dbus-execute.h \
+ src/core/dbus-kill.c \
+ src/core/dbus-kill.h \
+ src/core/dbus-cgroup.c \
+ src/core/dbus-cgroup.h \
+ src/core/cgroup.c \
+ src/core/cgroup.h \
+ src/core/selinux-access.c \
+ src/core/selinux-access.h \
+ src/core/selinux-setup.c \
+ src/core/selinux-setup.h \
+ src/core/smack-setup.c \
+ src/core/smack-setup.h \
+ src/core/ima-setup.c \
+ src/core/ima-setup.h \
+ src/core/locale-setup.h \
+ src/core/locale-setup.c \
+ src/core/hostname-setup.c \
+ src/core/hostname-setup.h \
+ src/core/machine-id-setup.c \
+ src/core/machine-id-setup.h \
+ src/core/mount-setup.c \
+ src/core/mount-setup.h \
+ src/core/kmod-setup.c \
+ src/core/kmod-setup.h \
+ src/core/loopback-setup.h \
+ src/core/loopback-setup.c \
+ src/core/namespace.c \
+ src/core/namespace.h \
+ src/core/killall.h \
+ src/core/killall.c \
+ src/core/audit-fd.c \
+ src/core/audit-fd.h \
+ src/core/show-status.c \
+ src/core/show-status.h \
+ src/core/failure-action.c \
+ src/core/failure-action.h
+
+nodist_libcore_la_SOURCES = \
+ src/core/load-fragment-gperf.c \
+ src/core/load-fragment-gperf-nulstr.c
+
+libcore_la_CFLAGS = \
+ $(PAM_CFLAGS) \
+ $(AUDIT_CFLAGS) \
+ $(KMOD_CFLAGS) \
+ $(APPARMOR_CFLAGS) \
+ $(MOUNT_CFLAGS) \
+ $(SECCOMP_CFLAGS)
+
+libcore_la_LIBADD = \
+ libsystemd-internal.la \
+ libsystemd-shared.la \
+ $(PAM_LIBS) \
+ $(AUDIT_LIBS) \
+ $(KMOD_LIBS) \
+ $(APPARMOR_LIBS) \
+ $(MOUNT_LIBS)
+
+$(outdir)/load-fragment-gperf-nulstr.c: $(outdir)/load-fragment-gperf.gperf
+ $(AM_V_GEN)$(AWK) 'BEGIN{ keywords=0 ; FS="," ; print "extern const char load_fragment_gperf_nulstr[];" ; print "const char load_fragment_gperf_nulstr[] ="} ; keyword==1 { print "\"" $$1 "\\0\"" } ; /%%/ { keyword=1} ; END { print ";" }' < $< > $@
+
+sd.CPPFLAGS += -I$(topsrcdir)/src/libudev/src
+sd.CPPFLAGS += -DMOUNT_PATH=\"$(MOUNT_PATH)\"
+sd.CPPFLAGS += -DUMOUNT_PATH=\"$(UMOUNT_PATH)\"
+sd.CPPFLAGS += -DSYSTEMD_CGROUP_AGENT_PATH=\"$(libexecdir)/systemd-cgroups-agent\"
+sd.CPPFLAGS += -DSYSTEMD_BINARY_PATH=\"$(libexecdir)/systemd\"
+
+include $(topsrcdir)/build-aux/Makefile.tail.mk
diff --git a/src/grp-system/libcore/audit-fd.c b/src/grp-system/libcore/src/audit-fd.c
index 12509951b7..12509951b7 100644
--- a/src/grp-system/libcore/audit-fd.c
+++ b/src/grp-system/libcore/src/audit-fd.c
diff --git a/src/grp-system/libcore/audit-fd.h b/src/grp-system/libcore/src/audit-fd.h
index 0eccb59210..0eccb59210 100644
--- a/src/grp-system/libcore/audit-fd.h
+++ b/src/grp-system/libcore/src/audit-fd.h
diff --git a/src/grp-system/libcore/automount.c b/src/grp-system/libcore/src/automount.c
index ffe84c0cbb..2f116977de 100644
--- a/src/grp-system/libcore/automount.c
+++ b/src/grp-system/libcore/src/automount.c
@@ -28,6 +28,9 @@
#include <linux/auto_dev-ioctl.h>
#include <linux/auto_fs4.h>
+#include "core/automount.h"
+#include "core/mount.h"
+#include "core/unit.h"
#include "sd-bus/bus-error.h"
#include "sd-bus/bus-util.h"
#include "systemd-basic/alloc-util.h"
@@ -47,10 +50,7 @@
#include "systemd-basic/string-util.h"
#include "systemd-basic/unit-name.h"
-#include "automount.h"
#include "dbus-automount.h"
-#include "mount.h"
-#include "unit.h"
static const UnitActiveState state_translation_table[_AUTOMOUNT_STATE_MAX] = {
[AUTOMOUNT_DEAD] = UNIT_INACTIVE,
diff --git a/src/grp-system/libcore/bus-policy.c b/src/grp-system/libcore/src/bus-policy.c
index 38fcfd5fa9..d5bba61a93 100644
--- a/src/grp-system/libcore/bus-policy.c
+++ b/src/grp-system/libcore/src/bus-policy.c
@@ -19,6 +19,7 @@
#include <stdlib.h>
+#include "core/bus-policy.h"
#include "sd-bus/bus-kernel.h"
#include "sd-bus/kdbus.h"
#include "systemd-basic/alloc-util.h"
@@ -26,8 +27,6 @@
#include "systemd-basic/user-util.h"
#include "systemd-basic/util.h"
-#include "bus-policy.h"
-
int bus_kernel_translate_access(BusPolicyAccess access) {
assert(access >= 0);
assert(access < _BUS_POLICY_ACCESS_MAX);
diff --git a/src/grp-system/libcore/busname.c b/src/grp-system/libcore/src/busname.c
index ff05c4194b..178866fc15 100644
--- a/src/grp-system/libcore/busname.c
+++ b/src/grp-system/libcore/src/busname.c
@@ -19,6 +19,9 @@
#include <sys/mman.h>
+#include "core/bus-policy.h"
+#include "core/busname.h"
+#include "core/service.h"
#include "sd-bus/bus-internal.h"
#include "sd-bus/bus-kernel.h"
#include "sd-bus/bus-util.h"
@@ -33,10 +36,7 @@
#include "systemd-basic/string-table.h"
#include "systemd-basic/string-util.h"
-#include "bus-policy.h"
-#include "busname.h"
#include "dbus-busname.h"
-#include "service.h"
static const UnitActiveState state_translation_table[_BUSNAME_STATE_MAX] = {
[BUSNAME_DEAD] = UNIT_INACTIVE,
diff --git a/src/grp-system/libcore/cgroup.c b/src/grp-system/libcore/src/cgroup.c
index e1143d28e1..fca369c4ff 100644
--- a/src/grp-system/libcore/cgroup.c
+++ b/src/grp-system/libcore/src/cgroup.c
@@ -20,6 +20,7 @@
#include <fcntl.h>
#include <fnmatch.h>
+#include "core/cgroup.h"
#include "systemd-basic/alloc-util.h"
#include "systemd-basic/cgroup-util.h"
#include "systemd-basic/fd-util.h"
@@ -33,8 +34,6 @@
#include "systemd-basic/string-table.h"
#include "systemd-basic/string-util.h"
-#include "cgroup.h"
-
#define CGROUP_CPU_QUOTA_PERIOD_USEC ((usec_t) 100 * USEC_PER_MSEC)
static void cgroup_compat_warn(void) {
diff --git a/src/grp-system/libcore/dbus-automount.c b/src/grp-system/libcore/src/dbus-automount.c
index 7033c1b1d3..500dcee502 100644
--- a/src/grp-system/libcore/dbus-automount.c
+++ b/src/grp-system/libcore/src/dbus-automount.c
@@ -17,10 +17,10 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
+#include "core/automount.h"
#include "sd-bus/bus-util.h"
#include "systemd-basic/string-util.h"
-#include "automount.h"
#include "dbus-automount.h"
static BUS_DEFINE_PROPERTY_GET_ENUM(property_get_result, automount_result, AutomountResult);
diff --git a/src/grp-system/libcore/dbus-automount.h b/src/grp-system/libcore/src/dbus-automount.h
index d1168c8188..d1168c8188 100644
--- a/src/grp-system/libcore/dbus-automount.h
+++ b/src/grp-system/libcore/src/dbus-automount.h
diff --git a/src/grp-system/libcore/dbus-busname.c b/src/grp-system/libcore/src/dbus-busname.c
index 8db3c67a73..d1324e66bd 100644
--- a/src/grp-system/libcore/dbus-busname.c
+++ b/src/grp-system/libcore/src/dbus-busname.c
@@ -17,12 +17,12 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
+#include "core/busname.h"
+#include "core/unit.h"
#include "sd-bus/bus-util.h"
#include "systemd-basic/string-util.h"
-#include "busname.h"
#include "dbus-busname.h"
-#include "unit.h"
static BUS_DEFINE_PROPERTY_GET_ENUM(property_get_result, busname_result, BusNameResult);
diff --git a/src/grp-system/libcore/dbus-busname.h b/src/grp-system/libcore/src/dbus-busname.h
index c6aa90a424..c6aa90a424 100644
--- a/src/grp-system/libcore/dbus-busname.h
+++ b/src/grp-system/libcore/src/dbus-busname.h
diff --git a/src/grp-system/libcore/dbus-cgroup.c b/src/grp-system/libcore/src/dbus-cgroup.c
index 30afc2f7e4..e531f780fd 100644
--- a/src/grp-system/libcore/dbus-cgroup.c
+++ b/src/grp-system/libcore/src/dbus-cgroup.c
@@ -17,6 +17,7 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
+#include "core/cgroup.h"
#include "sd-bus/bus-util.h"
#include "systemd-basic/alloc-util.h"
#include "systemd-basic/cgroup-util.h"
@@ -24,7 +25,6 @@
#include "systemd-basic/fileio.h"
#include "systemd-basic/path-util.h"
-#include "cgroup.h"
#include "dbus-cgroup.h"
static BUS_DEFINE_PROPERTY_GET_ENUM(property_get_cgroup_device_policy, cgroup_device_policy, CGroupDevicePolicy);
diff --git a/src/grp-system/libcore/dbus-cgroup.h b/src/grp-system/libcore/src/dbus-cgroup.h
index 84d0f1ba04..b61ca2fcef 100644
--- a/src/grp-system/libcore/dbus-cgroup.h
+++ b/src/grp-system/libcore/src/dbus-cgroup.h
@@ -21,7 +21,7 @@
#include <systemd/sd-bus.h>
-#include "cgroup.h"
+#include "core/cgroup.h"
extern const sd_bus_vtable bus_cgroup_vtable[];
diff --git a/src/grp-system/libcore/dbus-device.c b/src/grp-system/libcore/src/dbus-device.c
index e1a12224d3..75e9beb55e 100644
--- a/src/grp-system/libcore/dbus-device.c
+++ b/src/grp-system/libcore/src/dbus-device.c
@@ -17,9 +17,10 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
+#include "core/device.h"
+#include "core/unit.h"
+
#include "dbus-device.h"
-#include "device.h"
-#include "unit.h"
const sd_bus_vtable bus_device_vtable[] = {
SD_BUS_VTABLE_START(0),
diff --git a/src/grp-system/libcore/dbus-device.h b/src/grp-system/libcore/src/dbus-device.h
index eb1d8c3278..84b7ed56ec 100644
--- a/src/grp-system/libcore/dbus-device.h
+++ b/src/grp-system/libcore/src/dbus-device.h
@@ -19,6 +19,6 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
-#include "unit.h"
+#include "core/unit.h"
extern const sd_bus_vtable bus_device_vtable[];
diff --git a/src/grp-system/libcore/dbus-execute.c b/src/grp-system/libcore/src/dbus-execute.c
index 2578ce6552..8029497c3c 100644
--- a/src/grp-system/libcore/dbus-execute.c
+++ b/src/grp-system/libcore/src/dbus-execute.c
@@ -23,6 +23,8 @@
#include <seccomp.h>
#endif
+#include "core/execute.h"
+#include "core/namespace.h"
#include "sd-bus/bus-util.h"
#include "systemd-basic/af-list.h"
#include "systemd-basic/alloc-util.h"
@@ -38,8 +40,6 @@
#include "systemd-basic/rlimit-util.h"
#include "dbus-execute.h"
-#include "execute.h"
-#include "namespace.h"
#ifdef HAVE_SECCOMP
#include "systemd-shared/seccomp-util.h"
#endif
diff --git a/src/grp-system/libcore/dbus-execute.h b/src/grp-system/libcore/src/dbus-execute.h
index bdfef41db4..25137d9516 100644
--- a/src/grp-system/libcore/dbus-execute.h
+++ b/src/grp-system/libcore/src/dbus-execute.h
@@ -21,7 +21,7 @@
#include <systemd/sd-bus.h>
-#include "execute.h"
+#include "core/execute.h"
#define BUS_EXEC_STATUS_VTABLE(prefix, offset, flags) \
BUS_PROPERTY_DUAL_TIMESTAMP(prefix "StartTimestamp", (offset) + offsetof(ExecStatus, start_timestamp), flags), \
diff --git a/src/grp-system/libcore/dbus-job.c b/src/grp-system/libcore/src/dbus-job.c
index e85d690cd2..0eddfe60d7 100644
--- a/src/grp-system/libcore/dbus-job.c
+++ b/src/grp-system/libcore/src/dbus-job.c
@@ -19,13 +19,13 @@
#include <systemd/sd-bus.h>
+#include "core/job.h"
#include "systemd-basic/alloc-util.h"
#include "systemd-basic/log.h"
#include "systemd-basic/string-util.h"
#include "dbus-job.h"
#include "dbus.h"
-#include "job.h"
#include "selinux-access.h"
static BUS_DEFINE_PROPERTY_GET_ENUM(property_get_type, job_type, JobType);
diff --git a/src/grp-system/libcore/dbus-job.h b/src/grp-system/libcore/src/dbus-job.h
index 95664cb90c..4e2d4f086d 100644
--- a/src/grp-system/libcore/dbus-job.h
+++ b/src/grp-system/libcore/src/dbus-job.h
@@ -21,7 +21,7 @@
#include <systemd/sd-bus.h>
-#include "job.h"
+#include "core/job.h"
extern const sd_bus_vtable bus_job_vtable[];
diff --git a/src/grp-system/libcore/dbus-kill.c b/src/grp-system/libcore/src/dbus-kill.c
index e49a2333c1..71337306a6 100644
--- a/src/grp-system/libcore/dbus-kill.c
+++ b/src/grp-system/libcore/src/dbus-kill.c
@@ -17,11 +17,11 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
+#include "core/kill.h"
#include "sd-bus/bus-util.h"
#include "systemd-basic/signal-util.h"
#include "dbus-kill.h"
-#include "kill.h"
static BUS_DEFINE_PROPERTY_GET_ENUM(property_get_kill_mode, kill_mode, KillMode);
diff --git a/src/grp-system/libcore/dbus-kill.h b/src/grp-system/libcore/src/dbus-kill.h
index b32ce9d223..3f908c40d9 100644
--- a/src/grp-system/libcore/dbus-kill.h
+++ b/src/grp-system/libcore/src/dbus-kill.h
@@ -21,8 +21,8 @@
#include <systemd/sd-bus.h>
-#include "kill.h"
-#include "unit.h"
+#include "core/kill.h"
+#include "core/unit.h"
extern const sd_bus_vtable bus_kill_vtable[];
diff --git a/src/grp-system/libcore/dbus-manager.c b/src/grp-system/libcore/src/dbus-manager.c
index d38f5814fe..8ae359f2d4 100644
--- a/src/grp-system/libcore/dbus-manager.c
+++ b/src/grp-system/libcore/src/dbus-manager.c
@@ -21,6 +21,7 @@
#include <sys/prctl.h>
#include <unistd.h>
+#include "core/dbus-manager.h"
#include "sd-bus/bus-common-errors.h"
#include "systemd-basic/alloc-util.h"
#include "systemd-basic/architecture.h"
@@ -42,7 +43,6 @@
#include "dbus-execute.h"
#include "dbus-job.h"
-#include "dbus-manager.h"
#include "dbus-unit.h"
#include "dbus.h"
#include "selinux-access.h"
diff --git a/src/grp-system/libcore/dbus-mount.c b/src/grp-system/libcore/src/dbus-mount.c
index 9dea002eec..ea2abb0e4e 100644
--- a/src/grp-system/libcore/dbus-mount.c
+++ b/src/grp-system/libcore/src/dbus-mount.c
@@ -17,6 +17,8 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
+#include "core/mount.h"
+#include "core/unit.h"
#include "sd-bus/bus-util.h"
#include "systemd-basic/string-util.h"
@@ -24,8 +26,6 @@
#include "dbus-execute.h"
#include "dbus-kill.h"
#include "dbus-mount.h"
-#include "mount.h"
-#include "unit.h"
static int property_get_what(
sd_bus *bus,
diff --git a/src/grp-system/libcore/dbus-mount.h b/src/grp-system/libcore/src/dbus-mount.h
index f9844e449d..81ef769a44 100644
--- a/src/grp-system/libcore/dbus-mount.h
+++ b/src/grp-system/libcore/src/dbus-mount.h
@@ -21,7 +21,7 @@
#include <systemd/sd-bus.h>
-#include "unit.h"
+#include "core/unit.h"
extern const sd_bus_vtable bus_mount_vtable[];
diff --git a/src/grp-system/libcore/dbus-path.c b/src/grp-system/libcore/src/dbus-path.c
index 835f6d49bf..ed57c2133a 100644
--- a/src/grp-system/libcore/dbus-path.c
+++ b/src/grp-system/libcore/src/dbus-path.c
@@ -17,12 +17,12 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
+#include "core/path.h"
+#include "core/unit.h"
#include "sd-bus/bus-util.h"
#include "systemd-basic/string-util.h"
#include "dbus-path.h"
-#include "path.h"
-#include "unit.h"
static BUS_DEFINE_PROPERTY_GET_ENUM(property_get_result, path_result, PathResult);
diff --git a/src/grp-system/libcore/dbus-path.h b/src/grp-system/libcore/src/dbus-path.h
index f24b1d5d3d..f24b1d5d3d 100644
--- a/src/grp-system/libcore/dbus-path.h
+++ b/src/grp-system/libcore/src/dbus-path.h
diff --git a/src/grp-system/libcore/dbus-scope.c b/src/grp-system/libcore/src/dbus-scope.c
index 8dc0bd22ed..da930418d5 100644
--- a/src/grp-system/libcore/dbus-scope.c
+++ b/src/grp-system/libcore/src/dbus-scope.c
@@ -17,6 +17,8 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
+#include "core/scope.h"
+#include "core/unit.h"
#include "sd-bus/bus-common-errors.h"
#include "sd-bus/bus-internal.h"
#include "sd-bus/bus-util.h"
@@ -27,9 +29,7 @@
#include "dbus-scope.h"
#include "dbus-unit.h"
#include "dbus.h"
-#include "scope.h"
#include "selinux-access.h"
-#include "unit.h"
static int bus_scope_abandon(sd_bus_message *message, void *userdata, sd_bus_error *error) {
Scope *s = userdata;
diff --git a/src/grp-system/libcore/dbus-scope.h b/src/grp-system/libcore/src/dbus-scope.h
index f96ddef0cf..ad1cb52adc 100644
--- a/src/grp-system/libcore/dbus-scope.h
+++ b/src/grp-system/libcore/src/dbus-scope.h
@@ -21,7 +21,7 @@
#include <systemd/sd-bus.h>
-#include "unit.h"
+#include "core/unit.h"
extern const sd_bus_vtable bus_scope_vtable[];
diff --git a/src/grp-system/libcore/dbus-service.c b/src/grp-system/libcore/src/dbus-service.c
index 2e92caecaf..42cd1c52bd 100644
--- a/src/grp-system/libcore/dbus-service.c
+++ b/src/grp-system/libcore/src/dbus-service.c
@@ -17,6 +17,8 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
+#include "core/service.h"
+#include "core/unit.h"
#include "sd-bus/bus-util.h"
#include "systemd-basic/alloc-util.h"
#include "systemd-basic/async.h"
@@ -30,8 +32,6 @@
#include "dbus-execute.h"
#include "dbus-kill.h"
#include "dbus-service.h"
-#include "service.h"
-#include "unit.h"
static BUS_DEFINE_PROPERTY_GET_ENUM(property_get_type, service_type, ServiceType);
static BUS_DEFINE_PROPERTY_GET_ENUM(property_get_result, service_result, ServiceResult);
diff --git a/src/grp-system/libcore/dbus-service.h b/src/grp-system/libcore/src/dbus-service.h
index 291959325c..1d3df67bf0 100644
--- a/src/grp-system/libcore/dbus-service.h
+++ b/src/grp-system/libcore/src/dbus-service.h
@@ -21,7 +21,7 @@
#include <systemd/sd-bus.h>
-#include "unit.h"
+#include "core/unit.h"
extern const sd_bus_vtable bus_service_vtable[];
diff --git a/src/grp-system/libcore/dbus-slice.c b/src/grp-system/libcore/src/dbus-slice.c
index e37f50b283..ce357cadae 100644
--- a/src/grp-system/libcore/dbus-slice.c
+++ b/src/grp-system/libcore/src/dbus-slice.c
@@ -17,10 +17,11 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
+#include "core/slice.h"
+#include "core/unit.h"
+
#include "dbus-cgroup.h"
#include "dbus-slice.h"
-#include "slice.h"
-#include "unit.h"
const sd_bus_vtable bus_slice_vtable[] = {
SD_BUS_VTABLE_START(0),
diff --git a/src/grp-system/libcore/dbus-slice.h b/src/grp-system/libcore/src/dbus-slice.h
index 8e4cabbf8a..fa039b2c0b 100644
--- a/src/grp-system/libcore/dbus-slice.h
+++ b/src/grp-system/libcore/src/dbus-slice.h
@@ -21,7 +21,7 @@
#include <systemd/sd-bus.h>
-#include "unit.h"
+#include "core/unit.h"
extern const sd_bus_vtable bus_slice_vtable[];
diff --git a/src/grp-system/libcore/dbus-socket.c b/src/grp-system/libcore/src/dbus-socket.c
index 14c295959e..2bdfd0a47f 100644
--- a/src/grp-system/libcore/dbus-socket.c
+++ b/src/grp-system/libcore/src/dbus-socket.c
@@ -17,6 +17,8 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
+#include "core/socket.h"
+#include "core/unit.h"
#include "sd-bus/bus-util.h"
#include "systemd-basic/alloc-util.h"
#include "systemd-basic/string-util.h"
@@ -24,8 +26,6 @@
#include "dbus-cgroup.h"
#include "dbus-execute.h"
#include "dbus-socket.h"
-#include "socket.h"
-#include "unit.h"
static BUS_DEFINE_PROPERTY_GET_ENUM(property_get_result, socket_result, SocketResult);
static BUS_DEFINE_PROPERTY_GET_ENUM(property_get_bind_ipv6_only, socket_address_bind_ipv6_only, SocketAddressBindIPv6Only);
diff --git a/src/grp-system/libcore/dbus-socket.h b/src/grp-system/libcore/src/dbus-socket.h
index a31906feea..e68d33ace7 100644
--- a/src/grp-system/libcore/dbus-socket.h
+++ b/src/grp-system/libcore/src/dbus-socket.h
@@ -21,7 +21,7 @@
#include <systemd/sd-bus.h>
-#include "unit.h"
+#include "core/unit.h"
extern const sd_bus_vtable bus_socket_vtable[];
diff --git a/src/grp-system/libcore/dbus-swap.c b/src/grp-system/libcore/src/dbus-swap.c
index bb486b9546..3b0f274ba7 100644
--- a/src/grp-system/libcore/dbus-swap.c
+++ b/src/grp-system/libcore/src/dbus-swap.c
@@ -18,14 +18,14 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
+#include "core/swap.h"
+#include "core/unit.h"
#include "sd-bus/bus-util.h"
#include "systemd-basic/string-util.h"
#include "dbus-cgroup.h"
#include "dbus-execute.h"
#include "dbus-swap.h"
-#include "swap.h"
-#include "unit.h"
static int property_get_priority(
sd_bus *bus,
diff --git a/src/grp-system/libcore/dbus-swap.h b/src/grp-system/libcore/src/dbus-swap.h
index 19151fb771..6c1b862665 100644
--- a/src/grp-system/libcore/dbus-swap.h
+++ b/src/grp-system/libcore/src/dbus-swap.h
@@ -22,7 +22,7 @@
#include <systemd/sd-bus.h>
-#include "unit.h"
+#include "core/unit.h"
extern const sd_bus_vtable bus_swap_vtable[];
diff --git a/src/grp-system/libcore/dbus-target.c b/src/grp-system/libcore/src/dbus-target.c
index 6858b1ce72..5a846432d0 100644
--- a/src/grp-system/libcore/dbus-target.c
+++ b/src/grp-system/libcore/src/dbus-target.c
@@ -17,8 +17,9 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
+#include "core/unit.h"
+
#include "dbus-target.h"
-#include "unit.h"
const sd_bus_vtable bus_target_vtable[] = {
SD_BUS_VTABLE_START(0),
diff --git a/src/grp-system/libcore/dbus-target.h b/src/grp-system/libcore/src/dbus-target.h
index c97a9d626e..c97a9d626e 100644
--- a/src/grp-system/libcore/dbus-target.h
+++ b/src/grp-system/libcore/src/dbus-target.h
diff --git a/src/grp-system/libcore/dbus-timer.c b/src/grp-system/libcore/src/dbus-timer.c
index 14f09b3d0e..6b00168361 100644
--- a/src/grp-system/libcore/dbus-timer.c
+++ b/src/grp-system/libcore/src/dbus-timer.c
@@ -17,13 +17,13 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
+#include "core/timer.h"
+#include "core/unit.h"
#include "sd-bus/bus-util.h"
#include "systemd-basic/alloc-util.h"
#include "systemd-basic/strv.h"
#include "dbus-timer.h"
-#include "timer.h"
-#include "unit.h"
static BUS_DEFINE_PROPERTY_GET_ENUM(property_get_result, timer_result, TimerResult);
diff --git a/src/grp-system/libcore/dbus-timer.h b/src/grp-system/libcore/src/dbus-timer.h
index 505fb5df72..5e366918f8 100644
--- a/src/grp-system/libcore/dbus-timer.h
+++ b/src/grp-system/libcore/src/dbus-timer.h
@@ -21,7 +21,7 @@
#include <systemd/sd-bus.h>
-#include "unit.h"
+#include "core/unit.h"
extern const sd_bus_vtable bus_timer_vtable[];
diff --git a/src/grp-system/libcore/dbus-unit.c b/src/grp-system/libcore/src/dbus-unit.c
index ef12ad66a3..ef12ad66a3 100644
--- a/src/grp-system/libcore/dbus-unit.c
+++ b/src/grp-system/libcore/src/dbus-unit.c
diff --git a/src/grp-system/libcore/dbus-unit.h b/src/grp-system/libcore/src/dbus-unit.h
index 758045a47c..d6351f9552 100644
--- a/src/grp-system/libcore/dbus-unit.h
+++ b/src/grp-system/libcore/src/dbus-unit.h
@@ -21,7 +21,7 @@
#include <systemd/sd-bus.h>
-#include "unit.h"
+#include "core/unit.h"
extern const sd_bus_vtable bus_unit_vtable[];
extern const sd_bus_vtable bus_unit_cgroup_vtable[];
diff --git a/src/grp-system/libcore/dbus.c b/src/grp-system/libcore/src/dbus.c
index 0c5617ec44..4485b38e2e 100644
--- a/src/grp-system/libcore/dbus.c
+++ b/src/grp-system/libcore/src/dbus.c
@@ -23,6 +23,7 @@
#include <systemd/sd-bus.h>
+#include "core/dbus-manager.h"
#include "sd-bus/bus-common-errors.h"
#include "sd-bus/bus-error.h"
#include "sd-bus/bus-internal.h"
@@ -42,7 +43,6 @@
#include "dbus-execute.h"
#include "dbus-job.h"
#include "dbus-kill.h"
-#include "dbus-manager.h"
#include "dbus-unit.h"
#include "dbus.h"
#include "selinux-access.h"
diff --git a/src/grp-system/libcore/dbus.h b/src/grp-system/libcore/src/dbus.h
index 6baaffbd75..36f8d34a1d 100644
--- a/src/grp-system/libcore/dbus.h
+++ b/src/grp-system/libcore/src/dbus.h
@@ -19,7 +19,7 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
-#include "manager.h"
+#include "core/manager.h"
int bus_send_queued_message(Manager *m);
diff --git a/src/grp-system/libcore/device.c b/src/grp-system/libcore/src/device.c
index 038908ba7d..a147de3280 100644
--- a/src/grp-system/libcore/device.c
+++ b/src/grp-system/libcore/src/device.c
@@ -22,6 +22,9 @@
#include <libudev.h>
+#include "core/device.h"
+#include "core/swap.h"
+#include "core/unit.h"
#include "systemd-basic/alloc-util.h"
#include "systemd-basic/log.h"
#include "systemd-basic/parse-util.h"
@@ -32,9 +35,6 @@
#include "systemd-shared/udev-util.h"
#include "dbus-device.h"
-#include "device.h"
-#include "swap.h"
-#include "unit.h"
static const UnitActiveState state_translation_table[_DEVICE_STATE_MAX] = {
[DEVICE_DEAD] = UNIT_INACTIVE,
diff --git a/src/grp-system/libcore/execute.c b/src/grp-system/libcore/src/execute.c
index 183fcba0b3..83b43c3535 100644
--- a/src/grp-system/libcore/execute.c
+++ b/src/grp-system/libcore/src/execute.c
@@ -57,6 +57,8 @@
#ifdef HAVE_APPARMOR
#include "systemd-shared/apparmor-util.h"
#endif
+#include "core/execute.h"
+#include "core/namespace.h"
#include "systemd-basic/async.h"
#include "systemd-basic/barrier.h"
#include "systemd-basic/cap-list.h"
@@ -81,12 +83,10 @@
#include "systemd-basic/process-util.h"
#include "systemd-basic/rlimit-util.h"
#include "systemd-basic/rm-rf.h"
-
-#include "execute.h"
-#include "namespace.h"
#ifdef HAVE_SECCOMP
#include "systemd-shared/seccomp-util.h"
#endif
+#include "core/unit.h"
#include "systemd-basic/securebits.h"
#include "systemd-basic/selinux-util.h"
#include "systemd-basic/signal-util.h"
@@ -100,8 +100,6 @@
#include "systemd-basic/util.h"
#include "systemd-shared/utmp-wtmp.h"
-#include "unit.h"
-
#define IDLE_TIMEOUT_USEC (5*USEC_PER_SEC)
#define IDLE_TIMEOUT2_USEC (1*USEC_PER_SEC)
diff --git a/src/grp-system/libcore/failure-action.c b/src/grp-system/libcore/src/failure-action.c
index e7d7e4530d..e17ed7219b 100644
--- a/src/grp-system/libcore/failure-action.c
+++ b/src/grp-system/libcore/src/failure-action.c
@@ -22,14 +22,13 @@
#include <linux/reboot.h>
+#include "core/failure-action.h"
#include "sd-bus/bus-error.h"
#include "sd-bus/bus-util.h"
#include "systemd-basic/special.h"
#include "systemd-basic/string-table.h"
#include "systemd-basic/terminal-util.h"
-#include "failure-action.h"
-
static void log_and_status(Manager *m, const char *message) {
log_warning("%s", message);
manager_status_printf(m, STATUS_TYPE_EMERGENCY,
diff --git a/src/grp-system/libcore/hostname-setup.c b/src/grp-system/libcore/src/hostname-setup.c
index a85cb8048a..6170d5e030 100644
--- a/src/grp-system/libcore/hostname-setup.c
+++ b/src/grp-system/libcore/src/hostname-setup.c
@@ -21,6 +21,7 @@
#include <stdio.h>
#include <stdlib.h>
+#include "core/hostname-setup.h"
#include "systemd-basic/alloc-util.h"
#include "systemd-basic/fileio.h"
#include "systemd-basic/hostname-util.h"
@@ -29,8 +30,6 @@
#include "systemd-basic/string-util.h"
#include "systemd-basic/util.h"
-#include "hostname-setup.h"
-
int hostname_setup(void) {
int r;
_cleanup_free_ char *b = NULL;
diff --git a/src/grp-system/libcore/ima-setup.c b/src/grp-system/libcore/src/ima-setup.c
index 3967e6951a..d1ec4852c9 100644
--- a/src/grp-system/libcore/ima-setup.c
+++ b/src/grp-system/libcore/src/ima-setup.c
@@ -22,13 +22,12 @@
#include <errno.h>
#include <unistd.h>
+#include "core/ima-setup.h"
#include "systemd-basic/fd-util.h"
#include "systemd-basic/fileio.h"
#include "systemd-basic/log.h"
#include "systemd-basic/util.h"
-#include "ima-setup.h"
-
#define IMA_SECFS_DIR "/sys/kernel/security/ima"
#define IMA_SECFS_POLICY IMA_SECFS_DIR "/policy"
#define IMA_POLICY_PATH "/etc/ima/ima-policy"
diff --git a/src/grp-system/libcore/job.c b/src/grp-system/libcore/src/job.c
index 803caaf819..5c28ea1bd6 100644
--- a/src/grp-system/libcore/job.c
+++ b/src/grp-system/libcore/src/job.c
@@ -22,6 +22,8 @@
#include <systemd/sd-id128.h>
#include <systemd/sd-messages.h>
+#include "core/job.h"
+#include "core/unit.h"
#include "systemd-basic/alloc-util.h"
#include "systemd-basic/async.h"
#include "systemd-basic/escape.h"
@@ -39,8 +41,6 @@
#include "dbus-job.h"
#include "dbus.h"
-#include "job.h"
-#include "unit.h"
Job* job_new_raw(Unit *unit) {
Job *j;
diff --git a/src/grp-system/libcore/kill.c b/src/grp-system/libcore/src/kill.c
index 86363bb1c7..2f6d81f4eb 100644
--- a/src/grp-system/libcore/kill.c
+++ b/src/grp-system/libcore/src/kill.c
@@ -17,12 +17,11 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
+#include "core/kill.h"
#include "systemd-basic/signal-util.h"
#include "systemd-basic/string-table.h"
#include "systemd-basic/util.h"
-#include "kill.h"
-
void kill_context_init(KillContext *c) {
assert(c);
diff --git a/src/grp-system/libcore/killall.c b/src/grp-system/libcore/src/killall.c
index 2841805711..3e4b5e5186 100644
--- a/src/grp-system/libcore/killall.c
+++ b/src/grp-system/libcore/src/killall.c
@@ -22,6 +22,7 @@
#include <sys/wait.h>
#include <unistd.h>
+#include "core/killall.h"
#include "systemd-basic/alloc-util.h"
#include "systemd-basic/def.h"
#include "systemd-basic/fd-util.h"
@@ -33,8 +34,6 @@
#include "systemd-basic/terminal-util.h"
#include "systemd-basic/util.h"
-#include "killall.h"
-
static bool ignore_proc(pid_t pid, bool warn_rootfs) {
_cleanup_fclose_ FILE *f = NULL;
char c;
diff --git a/src/grp-system/libcore/kmod-setup.c b/src/grp-system/libcore/src/kmod-setup.c
index d58a0455d4..0f935380b2 100644
--- a/src/grp-system/libcore/kmod-setup.c
+++ b/src/grp-system/libcore/src/kmod-setup.c
@@ -24,12 +24,11 @@
#include <libkmod.h>
#endif
+#include "core/kmod-setup.h"
#include "sd-bus/bus-util.h"
#include "systemd-basic/capability-util.h"
#include "systemd-basic/macro.h"
-#include "kmod-setup.h"
-
#ifdef HAVE_KMOD
static void systemd_kmod_log(
void *data,
diff --git a/src/grp-system/libcore/linux/auto_dev-ioctl.h b/src/grp-system/libcore/src/linux/auto_dev-ioctl.h
index aeaeb3ea7a..aeaeb3ea7a 100644
--- a/src/grp-system/libcore/linux/auto_dev-ioctl.h
+++ b/src/grp-system/libcore/src/linux/auto_dev-ioctl.h
diff --git a/src/grp-system/libcore/load-dropin.c b/src/grp-system/libcore/src/load-dropin.c
index 56d81ed16c..4374a1fc25 100644
--- a/src/grp-system/libcore/load-dropin.c
+++ b/src/grp-system/libcore/src/load-dropin.c
@@ -18,14 +18,14 @@
***/
+#include "core/load-fragment.h"
+#include "core/unit.h"
#include "systemd-basic/log.h"
#include "systemd-basic/strv.h"
#include "systemd-basic/unit-name.h"
#include "systemd-shared/conf-parser.h"
#include "load-dropin.h"
-#include "load-fragment.h"
-#include "unit.h"
static int add_dependency_consumer(
UnitDependency dependency,
diff --git a/src/grp-system/libcore/load-dropin.h b/src/grp-system/libcore/src/load-dropin.h
index d007aec604..aa0fa024de 100644
--- a/src/grp-system/libcore/load-dropin.h
+++ b/src/grp-system/libcore/src/load-dropin.h
@@ -19,10 +19,9 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
+#include "core/unit.h"
#include "systemd-shared/dropin.h"
-#include "unit.h"
-
/* Read service data supplementary drop-in directories */
static inline int unit_find_dropin_paths(Unit *u, char ***paths) {
diff --git a/src/grp-system/libcore/load-fragment-gperf.gperf.m4 b/src/grp-system/libcore/src/load-fragment-gperf.gperf.m4
index ac4598f4c2..9a99f3453d 100644
--- a/src/grp-system/libcore/load-fragment-gperf.gperf.m4
+++ b/src/grp-system/libcore/src/load-fragment-gperf.gperf.m4
@@ -1,8 +1,10 @@
%{
#include <stddef.h>
-#include "shared/conf-parser.h"
-#include "load-fragment.h"
-#include "basic/missing.h"
+
+#include "systemd-basic/missing.h"
+#include "systemd-shared/conf-parser.h"
+
+#include "core/load-fragment.h"
%}
struct ConfigPerfItem;
%null_strings
diff --git a/src/grp-system/libcore/load-fragment.c b/src/grp-system/libcore/src/load-fragment.c
index 83fe2fc420..53f3746f4d 100644
--- a/src/grp-system/libcore/load-fragment.c
+++ b/src/grp-system/libcore/src/load-fragment.c
@@ -31,6 +31,8 @@
#include <sys/resource.h>
#include <sys/stat.h>
+#include "core/cgroup.h"
+#include "core/load-fragment.h"
#include "sd-bus/bus-error.h"
#include "sd-bus/bus-internal.h"
#include "sd-bus/bus-util.h"
@@ -52,12 +54,10 @@
#include "systemd-basic/process-util.h"
#include "systemd-basic/rlimit-util.h"
#include "systemd-shared/conf-parser.h"
-
-#include "cgroup.h"
-#include "load-fragment.h"
#ifdef HAVE_SECCOMP
#include "systemd-shared/seccomp-util.h"
#endif
+#include "core/unit.h"
#include "systemd-basic/securebits.h"
#include "systemd-basic/signal-util.h"
#include "systemd-basic/stat-util.h"
@@ -68,7 +68,6 @@
#include "systemd-basic/web-util.h"
#include "unit-printf.h"
-#include "unit.h"
int config_parse_warn_compat(
const char *unit,
diff --git a/src/grp-system/libcore/locale-setup.c b/src/grp-system/libcore/src/locale-setup.c
index 1794b474b8..1794b474b8 100644
--- a/src/grp-system/libcore/locale-setup.c
+++ b/src/grp-system/libcore/src/locale-setup.c
diff --git a/src/grp-system/libcore/locale-setup.h b/src/grp-system/libcore/src/locale-setup.h
index 3b97497afe..3b97497afe 100644
--- a/src/grp-system/libcore/locale-setup.h
+++ b/src/grp-system/libcore/src/locale-setup.h
diff --git a/src/grp-system/libcore/loopback-setup.c b/src/grp-system/libcore/src/loopback-setup.c
index 37bbbc47ec..d7085640e1 100644
--- a/src/grp-system/libcore/loopback-setup.c
+++ b/src/grp-system/libcore/src/loopback-setup.c
@@ -20,11 +20,10 @@
#include <net/if.h>
#include <stdlib.h>
+#include "core/loopback-setup.h"
#include "systemd-basic/missing.h"
#include "systemd-staging/sd-netlink.h"
-#include "loopback-setup.h"
-
static int start_loopback(sd_netlink *rtnl) {
_cleanup_(sd_netlink_message_unrefp) sd_netlink_message *req = NULL;
int r;
diff --git a/src/grp-system/libcore/machine-id-setup.c b/src/grp-system/libcore/src/machine-id-setup.c
index f9b6b2d2ed..a8c6ae046c 100644
--- a/src/grp-system/libcore/machine-id-setup.c
+++ b/src/grp-system/libcore/src/machine-id-setup.c
@@ -24,6 +24,7 @@
#include <systemd/sd-id128.h>
+#include "core/machine-id-setup.h"
#include "sd-id128/id128-util.h"
#include "systemd-basic/alloc-util.h"
#include "systemd-basic/fd-util.h"
@@ -40,8 +41,6 @@
#include "systemd-basic/util.h"
#include "systemd-basic/virt.h"
-#include "machine-id-setup.h"
-
static int generate_machine_id(const char *root, sd_id128_t *ret) {
const char *dbus_machine_id;
_cleanup_close_ int fd = -1;
diff --git a/src/grp-system/libcore/manager.c b/src/grp-system/libcore/src/manager.c
index b8b6cb248e..efc002cf87 100644
--- a/src/grp-system/libcore/manager.c
+++ b/src/grp-system/libcore/src/manager.c
@@ -39,6 +39,8 @@
#include <systemd/sd-daemon.h>
#include <systemd/sd-messages.h>
+#include "core/dbus-manager.h"
+#include "core/manager.h"
#include "sd-bus/bus-common-errors.h"
#include "sd-bus/bus-error.h"
#include "sd-bus/bus-kernel.h"
@@ -80,11 +82,9 @@
#include "audit-fd.h"
#include "dbus-job.h"
-#include "dbus-manager.h"
#include "dbus-unit.h"
#include "dbus.h"
#include "locale-setup.h"
-#include "manager.h"
#include "transaction.h"
#define NOTIFY_RCVBUF_SIZE (8*1024*1024)
diff --git a/src/grp-system/libcore/mount-setup.c b/src/grp-system/libcore/src/mount-setup.c
index 761527dd44..a4e72eda03 100644
--- a/src/grp-system/libcore/mount-setup.c
+++ b/src/grp-system/libcore/src/mount-setup.c
@@ -23,6 +23,7 @@
#include <sys/mount.h>
#include <unistd.h>
+#include "core/mount-setup.h"
#include "sd-bus/bus-util.h"
#include "systemd-basic/alloc-util.h"
#include "systemd-basic/cgroup-util.h"
@@ -43,8 +44,6 @@
#include "systemd-shared/dev-setup.h"
#include "systemd-shared/efivars.h"
-#include "mount-setup.h"
-
typedef enum MountMode {
MNT_NONE = 0,
MNT_FATAL = 1 << 0,
diff --git a/src/grp-system/libcore/mount.c b/src/grp-system/libcore/src/mount.c
index a4bc71caae..b0c3b6722c 100644
--- a/src/grp-system/libcore/mount.c
+++ b/src/grp-system/libcore/src/mount.c
@@ -24,6 +24,10 @@
#include <systemd/sd-messages.h>
+#include "core/manager.h"
+#include "core/mount-setup.h"
+#include "core/mount.h"
+#include "core/unit.h"
#include "systemd-basic/alloc-util.h"
#include "systemd-basic/escape.h"
#include "systemd-basic/exit-status.h"
@@ -42,10 +46,6 @@
#include "systemd-shared/fstab-util.h"
#include "dbus-mount.h"
-#include "manager.h"
-#include "mount-setup.h"
-#include "mount.h"
-#include "unit.h"
#define RETRY_UMOUNT_MAX 32
diff --git a/src/grp-system/libcore/namespace.c b/src/grp-system/libcore/src/namespace.c
index 942bae33b3..f67b0136bf 100644
--- a/src/grp-system/libcore/namespace.c
+++ b/src/grp-system/libcore/src/namespace.c
@@ -27,6 +27,8 @@
#include <linux/fs.h>
+#include "core/loopback-setup.h"
+#include "core/namespace.h"
#include "systemd-basic/alloc-util.h"
#include "systemd-basic/fd-util.h"
#include "systemd-basic/missing.h"
@@ -43,9 +45,6 @@
#include "systemd-basic/util.h"
#include "systemd-shared/dev-setup.h"
-#include "loopback-setup.h"
-#include "namespace.h"
-
#define DEV_MOUNT_OPTIONS (MS_NOSUID|MS_STRICTATIME|MS_NOEXEC)
typedef enum MountMode {
diff --git a/src/grp-system/libcore/path.c b/src/grp-system/libcore/src/path.c
index 5e4d82c3e4..49c81dffec 100644
--- a/src/grp-system/libcore/path.c
+++ b/src/grp-system/libcore/src/path.c
@@ -22,6 +22,8 @@
#include <sys/inotify.h>
#include <unistd.h>
+#include "core/path.h"
+#include "core/unit.h"
#include "sd-bus/bus-error.h"
#include "sd-bus/bus-util.h"
#include "systemd-basic/fd-util.h"
@@ -36,8 +38,6 @@
#include "systemd-basic/unit-name.h"
#include "dbus-path.h"
-#include "path.h"
-#include "unit.h"
static const UnitActiveState state_translation_table[_PATH_STATE_MAX] = {
[PATH_DEAD] = UNIT_INACTIVE,
diff --git a/src/grp-system/libcore/scope.c b/src/grp-system/libcore/src/scope.c
index aa7d591e66..11816469a6 100644
--- a/src/grp-system/libcore/scope.c
+++ b/src/grp-system/libcore/src/scope.c
@@ -20,6 +20,8 @@
#include <errno.h>
#include <unistd.h>
+#include "core/scope.h"
+#include "core/unit.h"
#include "systemd-basic/alloc-util.h"
#include "systemd-basic/log.h"
#include "systemd-basic/special.h"
@@ -30,8 +32,6 @@
#include "dbus-scope.h"
#include "load-dropin.h"
-#include "scope.h"
-#include "unit.h"
static const UnitActiveState state_translation_table[_SCOPE_STATE_MAX] = {
[SCOPE_DEAD] = UNIT_INACTIVE,
diff --git a/src/grp-system/libcore/selinux-access.c b/src/grp-system/libcore/src/selinux-access.c
index 6807af86c1..6807af86c1 100644
--- a/src/grp-system/libcore/selinux-access.c
+++ b/src/grp-system/libcore/src/selinux-access.c
diff --git a/src/grp-system/libcore/selinux-access.h b/src/grp-system/libcore/src/selinux-access.h
index 687bf07031..19adabdee3 100644
--- a/src/grp-system/libcore/selinux-access.h
+++ b/src/grp-system/libcore/src/selinux-access.h
@@ -21,10 +21,9 @@
#include <systemd/sd-bus.h>
+#include "core/manager.h"
#include "sd-bus/bus-util.h"
-#include "manager.h"
-
int mac_selinux_generic_access_check(sd_bus_message *message, const char *path, const char *permission, sd_bus_error *error);
#ifdef HAVE_SELINUX
diff --git a/src/grp-system/libcore/selinux-setup.c b/src/grp-system/libcore/src/selinux-setup.c
index 0813a7d2ac..d81a8e7fa1 100644
--- a/src/grp-system/libcore/selinux-setup.c
+++ b/src/grp-system/libcore/src/selinux-setup.c
@@ -25,14 +25,13 @@
#include <selinux/selinux.h>
#endif
+#include "core/selinux-setup.h"
#include "systemd-basic/log.h"
#include "systemd-basic/macro.h"
#include "systemd-basic/selinux-util.h"
#include "systemd-basic/string-util.h"
#include "systemd-basic/util.h"
-#include "selinux-setup.h"
-
#ifdef HAVE_SELINUX
_printf_(2,3)
static int null_log(int type, const char *fmt, ...) {
diff --git a/src/grp-system/libcore/service.c b/src/grp-system/libcore/src/service.c
index eed6efc758..df114edf09 100644
--- a/src/grp-system/libcore/service.c
+++ b/src/grp-system/libcore/src/service.c
@@ -21,6 +21,10 @@
#include <signal.h>
#include <unistd.h>
+#include "core/load-fragment.h"
+#include "core/manager.h"
+#include "core/service.h"
+#include "core/unit.h"
#include "sd-bus/bus-error.h"
#include "sd-bus/bus-kernel.h"
#include "sd-bus/bus-util.h"
@@ -49,11 +53,7 @@
#include "dbus-service.h"
#include "load-dropin.h"
-#include "load-fragment.h"
-#include "manager.h"
-#include "service.h"
#include "unit-printf.h"
-#include "unit.h"
static const UnitActiveState state_translation_table[_SERVICE_STATE_MAX] = {
[SERVICE_DEAD] = UNIT_INACTIVE,
diff --git a/src/grp-system/libcore/show-status.c b/src/grp-system/libcore/src/show-status.c
index 16db8a92a7..dec0eb00be 100644
--- a/src/grp-system/libcore/show-status.c
+++ b/src/grp-system/libcore/src/show-status.c
@@ -17,6 +17,7 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
+#include "core/show-status.h"
#include "systemd-basic/alloc-util.h"
#include "systemd-basic/fd-util.h"
#include "systemd-basic/io-util.h"
@@ -25,8 +26,6 @@
#include "systemd-basic/terminal-util.h"
#include "systemd-basic/util.h"
-#include "show-status.h"
-
int parse_show_status(const char *v, ShowStatus *ret) {
int r;
diff --git a/src/grp-system/libcore/slice.c b/src/grp-system/libcore/src/slice.c
index a96a94e0ac..4ab5548572 100644
--- a/src/grp-system/libcore/slice.c
+++ b/src/grp-system/libcore/src/slice.c
@@ -19,6 +19,8 @@
#include <errno.h>
+#include "core/slice.h"
+#include "core/unit.h"
#include "systemd-basic/alloc-util.h"
#include "systemd-basic/log.h"
#include "systemd-basic/special.h"
@@ -27,8 +29,6 @@
#include "systemd-basic/unit-name.h"
#include "dbus-slice.h"
-#include "slice.h"
-#include "unit.h"
static const UnitActiveState state_translation_table[_SLICE_STATE_MAX] = {
[SLICE_DEAD] = UNIT_INACTIVE,
diff --git a/src/grp-system/libcore/smack-setup.c b/src/grp-system/libcore/src/smack-setup.c
index 87d2980fbb..5d94873419 100644
--- a/src/grp-system/libcore/smack-setup.c
+++ b/src/grp-system/libcore/src/smack-setup.c
@@ -26,6 +26,7 @@
#include <stdlib.h>
#include <string.h>
+#include "core/smack-setup.h"
#include "systemd-basic/alloc-util.h"
#include "systemd-basic/dirent-util.h"
#include "systemd-basic/fd-util.h"
@@ -35,8 +36,6 @@
#include "systemd-basic/string-util.h"
#include "systemd-basic/util.h"
-#include "smack-setup.h"
-
#ifdef HAVE_SMACK
static int write_access2_rules(const char* srcdir) {
diff --git a/src/grp-system/libcore/socket.c b/src/grp-system/libcore/src/socket.c
index af3e65ff37..7e57cc7e79 100644
--- a/src/grp-system/libcore/socket.c
+++ b/src/grp-system/libcore/src/socket.c
@@ -29,6 +29,8 @@
#include <linux/sctp.h>
+#include "core/socket.h"
+#include "core/unit.h"
#include "sd-bus/bus-error.h"
#include "sd-bus/bus-util.h"
#include "systemd-basic/alloc-util.h"
@@ -56,9 +58,7 @@
#include "systemd-basic/user-util.h"
#include "dbus-socket.h"
-#include "socket.h"
#include "unit-printf.h"
-#include "unit.h"
static const UnitActiveState state_translation_table[_SOCKET_STATE_MAX] = {
[SOCKET_DEAD] = UNIT_INACTIVE,
diff --git a/src/grp-system/libcore/swap.c b/src/grp-system/libcore/src/swap.c
index 942548fb61..29f3971720 100644
--- a/src/grp-system/libcore/swap.c
+++ b/src/grp-system/libcore/src/swap.c
@@ -24,6 +24,8 @@
#include <libudev.h>
+#include "core/swap.h"
+#include "core/unit.h"
#include "systemd-basic/alloc-util.h"
#include "systemd-basic/escape.h"
#include "systemd-basic/exit-status.h"
@@ -41,8 +43,6 @@
#include "systemd-shared/udev-util.h"
#include "dbus-swap.h"
-#include "swap.h"
-#include "unit.h"
static const UnitActiveState state_translation_table[_SWAP_STATE_MAX] = {
[SWAP_DEAD] = UNIT_INACTIVE,
diff --git a/src/grp-system/libcore/target.c b/src/grp-system/libcore/src/target.c
index 99ed054d0e..c44d76468c 100644
--- a/src/grp-system/libcore/target.c
+++ b/src/grp-system/libcore/src/target.c
@@ -17,13 +17,13 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
+#include "core/unit.h"
#include "systemd-basic/log.h"
#include "systemd-basic/special.h"
#include "systemd-basic/string-util.h"
#include "systemd-basic/unit-name.h"
#include "dbus-target.h"
-#include "unit.h"
static const UnitActiveState state_translation_table[_TARGET_STATE_MAX] = {
[TARGET_DEAD] = UNIT_INACTIVE,
diff --git a/src/grp-system/libcore/timer.c b/src/grp-system/libcore/src/timer.c
index c459999e44..882d871dc9 100644
--- a/src/grp-system/libcore/timer.c
+++ b/src/grp-system/libcore/src/timer.c
@@ -19,6 +19,8 @@
#include <errno.h>
+#include "core/timer.h"
+#include "core/unit.h"
#include "sd-bus/bus-error.h"
#include "sd-bus/bus-util.h"
#include "systemd-basic/alloc-util.h"
@@ -33,8 +35,6 @@
#include "systemd-basic/virt.h"
#include "dbus-timer.h"
-#include "timer.h"
-#include "unit.h"
static const UnitActiveState state_translation_table[_TIMER_STATE_MAX] = {
[TIMER_DEAD] = UNIT_INACTIVE,
diff --git a/src/grp-system/libcore/transaction.c b/src/grp-system/libcore/src/transaction.c
index 2768be914f..2768be914f 100644
--- a/src/grp-system/libcore/transaction.c
+++ b/src/grp-system/libcore/src/transaction.c
diff --git a/src/grp-system/libcore/transaction.h b/src/grp-system/libcore/src/transaction.h
index 355b7bb6e6..e4066a0963 100644
--- a/src/grp-system/libcore/transaction.h
+++ b/src/grp-system/libcore/src/transaction.h
@@ -19,14 +19,13 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
+#include "core/job.h"
+#include "core/manager.h"
+#include "core/unit.h"
#include "systemd-basic/hashmap.h"
typedef struct Transaction Transaction;
-#include "job.h"
-#include "manager.h"
-#include "unit.h"
-
struct Transaction {
/* Jobs to be added */
Hashmap *jobs; /* Unit object => Job object list 1:1 */
diff --git a/src/grp-system/libcore/unit-printf.c b/src/grp-system/libcore/src/unit-printf.c
index 4aded4662e..2f73214295 100644
--- a/src/grp-system/libcore/unit-printf.c
+++ b/src/grp-system/libcore/src/unit-printf.c
@@ -17,6 +17,7 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
+#include "core/unit.h"
#include "systemd-basic/alloc-util.h"
#include "systemd-basic/cgroup-util.h"
#include "systemd-basic/formats-util.h"
@@ -28,7 +29,6 @@
#include "systemd-shared/specifier.h"
#include "unit-printf.h"
-#include "unit.h"
static int specifier_prefix_and_instance(char specifier, void *data, void *userdata, char **ret) {
Unit *u = userdata;
diff --git a/src/grp-system/libcore/unit-printf.h b/src/grp-system/libcore/src/unit-printf.h
index 4fc8531228..7ef76e5bb9 100644
--- a/src/grp-system/libcore/unit-printf.h
+++ b/src/grp-system/libcore/src/unit-printf.h
@@ -19,7 +19,7 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
-#include "unit.h"
+#include "core/unit.h"
int unit_name_printf(Unit *u, const char* text, char **ret);
int unit_full_printf(Unit *u, const char *text, char **ret);
diff --git a/src/grp-system/libcore/unit.c b/src/grp-system/libcore/src/unit.c
index 3d176e6104..a36e589b73 100644
--- a/src/grp-system/libcore/unit.c
+++ b/src/grp-system/libcore/src/unit.c
@@ -26,6 +26,9 @@
#include <systemd/sd-id128.h>
#include <systemd/sd-messages.h>
+#include "core/execute.h"
+#include "core/load-fragment.h"
+#include "core/unit.h"
#include "sd-bus/bus-common-errors.h"
#include "sd-bus/bus-util.h"
#include "systemd-basic/alloc-util.h"
@@ -55,10 +58,7 @@
#include "dbus-unit.h"
#include "dbus.h"
-#include "execute.h"
#include "load-dropin.h"
-#include "load-fragment.h"
-#include "unit.h"
const UnitVTable * const unit_vtable[_UNIT_TYPE_MAX] = {
[UNIT_SERVICE] = &service_vtable,