diff options
Diffstat (limited to 'src')
943 files changed, 5499 insertions, 5298 deletions
diff --git a/src/Makefile b/src/Makefile index b84e6076a0..5da6a48833 100644 --- a/src/Makefile +++ b/src/Makefile @@ -23,5 +23,70 @@ include $(dir $(lastword $(MAKEFILE_LIST)))/../config.mk include $(topsrcdir)/build-aux/Makefile.head.mk +at.subdirs += busctl +at.subdirs += grp-boot +at.subdirs += grp-coredump +#at.subdirs += grp-hostname +#at.subdirs += grp-import +#at.subdirs += grp-journal +#at.subdirs += grp-journal-remote +#at.subdirs += grp-locale +#at.subdirs += grp-login +#at.subdirs += grp-machine +#at.subdirs += grp-network +at.subdirs += grp-resolve +#at.subdirs += grp-system +at.subdirs += grp-timedate +at.subdirs += grp-udev +at.subdirs += kernel-install +at.subdirs += libbasic +at.subdirs += libcore +at.subdirs += libfirewall +at.subdirs += libshared +at.subdirs += libsystemd +at.subdirs += libsystemd-network +at.subdirs += libudev +at.subdirs += nss-myhostname +at.subdirs += systemd-activate +at.subdirs += systemd-ac-power +at.subdirs += systemd-analyze +at.subdirs += systemd-ask-password +at.subdirs += systemd-cgls +at.subdirs += systemd-cgroups-agent +at.subdirs += systemd-cgtop +at.subdirs += systemd-cryptsetup +at.subdirs += systemd-dbus1-generator +at.subdirs += systemd-debug-generator +at.subdirs += systemd-delta +at.subdirs += systemd-escape +at.subdirs += systemd-firstboot +at.subdirs += systemd-fsck +at.subdirs += systemd-fstab-generator +at.subdirs += systemd-getty-generator +at.subdirs += systemd-gpt-auto-generator +at.subdirs += systemd-hibernate-resume +at.subdirs += systemd-hwdb +at.subdirs += systemd-initctl +at.subdirs += systemd-machine-id-setup +at.subdirs += systemd-modules-load +at.subdirs += systemd-notify +at.subdirs += systemd-nspawn +at.subdirs += systemd-path +at.subdirs += systemd-rc-local-generator +at.subdirs += systemd-remount-fs +at.subdirs += systemd-reply-password +at.subdirs += systemd-run +at.subdirs += systemd-shutdown +at.subdirs += systemd-socket-proxyd +at.subdirs += systemd-stdio-bridge +at.subdirs += systemd-sysctl +at.subdirs += systemd-sysusers +at.subdirs += systemd-system-update-generator +at.subdirs += systemd-sysv-generator +at.subdirs += systemd-timesyncd +at.subdirs += systemd-tmpfiles +at.subdirs += systemd-tty-ask-password-agent +at.subdirs += systemd-update-done +at.subdirs += systemd-update-utmp include $(topsrcdir)/build-aux/Makefile.tail.mk diff --git a/src/busctl/busctl-introspect.c b/src/busctl/busctl-introspect.c index 3c49ad5c57..0fa4f05a71 100644 --- a/src/busctl/busctl-introspect.c +++ b/src/busctl/busctl-introspect.c @@ -19,11 +19,11 @@ #include <systemd/sd-bus.h> -#include "alloc-util.h" +#include "basic/alloc-util.h" #include "busctl-introspect.h" -#include "string-util.h" -#include "util.h" -#include "xml.h" +#include "basic/string-util.h" +#include "basic/util.h" +#include "basic/xml.h" #define NODE_DEPTH_MAX 16 diff --git a/src/busctl/busctl.c b/src/busctl/busctl.c index 0281409edf..cd8254f5d7 100644 --- a/src/busctl/busctl.c +++ b/src/busctl/busctl.c @@ -21,25 +21,25 @@ #include <systemd/sd-bus.h> -#include "alloc-util.h" -#include "bus-dump.h" -#include "bus-internal.h" -#include "bus-signature.h" -#include "bus-type.h" -#include "bus-util.h" +#include "basic/alloc-util.h" +#include "sd-bus/bus-dump.h" +#include "sd-bus/bus-internal.h" +#include "sd-bus/bus-signature.h" +#include "sd-bus/bus-type.h" +#include "shared/bus-util.h" #include "busctl-introspect.h" -#include "escape.h" -#include "fd-util.h" -#include "locale-util.h" -#include "log.h" -#include "pager.h" -#include "parse-util.h" -#include "path-util.h" -#include "set.h" -#include "strv.h" -#include "terminal-util.h" -#include "user-util.h" -#include "util.h" +#include "basic/escape.h" +#include "basic/fd-util.h" +#include "basic/locale-util.h" +#include "basic/log.h" +#include "shared/pager.h" +#include "basic/parse-util.h" +#include "basic/path-util.h" +#include "basic/set.h" +#include "basic/strv.h" +#include "basic/terminal-util.h" +#include "basic/user-util.h" +#include "basic/util.h" static bool arg_no_pager = false; static bool arg_legend = true; diff --git a/src/grp-boot/bootctl/Makefile b/src/grp-boot/bootctl/Makefile index 84253d2387..a983e32a9f 100644 --- a/src/grp-boot/bootctl/Makefile +++ b/src/grp-boot/bootctl/Makefile @@ -51,4 +51,5 @@ dist_zshcompletion_data += \ shell-completion/zsh/_bootctl endif # HAVE_BLKID endif # ENABLE_EFI + include $(topsrcdir)/build-aux/Makefile.tail.mk diff --git a/src/grp-boot/bootctl/bootctl.c b/src/grp-boot/bootctl/bootctl.c index 4a356d25d1..487ad429e0 100644 --- a/src/grp-boot/bootctl/bootctl.c +++ b/src/grp-boot/bootctl/bootctl.c @@ -35,16 +35,16 @@ #include <sys/statfs.h> #include <unistd.h> -#include "alloc-util.h" -#include "blkid-util.h" -#include "dirent-util.h" -#include "efivars.h" -#include "fd-util.h" -#include "fileio.h" -#include "locale-util.h" -#include "rm-rf.h" -#include "string-util.h" -#include "util.h" +#include "basic/alloc-util.h" +#include "basic/blkid-util.h" +#include "basic/dirent-util.h" +#include "shared/efivars.h" +#include "basic/fd-util.h" +#include "basic/fileio.h" +#include "basic/locale-util.h" +#include "basic/rm-rf.h" +#include "basic/string-util.h" +#include "basic/util.h" static int verify_esp(const char *p, uint32_t *part, uint64_t *pstart, uint64_t *psize, sd_id128_t *uuid) { struct statfs sfs; diff --git a/src/grp-boot/systemd-boot/Makefile b/src/grp-boot/systemd-boot/Makefile index 5b53fdc7e4..2a56560c2c 100644 --- a/src/grp-boot/systemd-boot/Makefile +++ b/src/grp-boot/systemd-boot/Makefile @@ -25,6 +25,7 @@ include $(topsrcdir)/build-aux/Makefile.head.mk ifneq ($(ENABLE_EFI),) ifneq ($(HAVE_GNUEFI),) +# ------------------------------------------------------------------------------ efi_cppflags = \ $(EFI_CPPFLAGS) \ -I$(top_builddir) -include config.h \ @@ -81,9 +82,18 @@ EFI_FORMAT = -O binary else EFI_FORMAT = --target=efi-app-$(EFI_ARCH) endif # ARCH_AARCH64 -endif # HAVE_GNUEFI -endif # ENABLE_EFI +$(outdir)/%.o: $(srcdir)/%.c + $(AM_V_EFI_CC)$(EFI_CC) $(efi_cppflags) $(efi_cflags) -c $< -o $@ + +$(outdir)/%.so: + @if test $(words $^) = 0; then echo 'Cannot link EFI library with no dependencies: $@' >&2; exit 1; fi + $(AM_V_EFI_CCLD)$(LD) $(efi_ldflags) $^ -o $@ -lefi -lgnuefi $(shell $(CC) -print-libgcc-file-name) + $(AM_V_at)! { nm -D -u $@ | grep ' U '; } + +# These next 2 are the same rule +$(outdir)/%$(EFI_MACHINE_TYPE_NAME).efi : $(outdir)/%.so; $(AM_V_GEN)$(OBJCOPY) -j .text -j .sdata -j .data -j .dynamic -j .dynsym -j .rel -j .rela -j .reloc $(EFI_FORMAT) $< $@ +$(outdir)/%$(EFI_MACHINE_TYPE_NAME).efi.stub: $(outdir)/%.so; $(AM_V_GEN)$(OBJCOPY) -j .text -j .sdata -j .data -j .dynamic -j .dynsym -j .rel -j .rela -j .reloc $(EFI_FORMAT) $< $@ # ------------------------------------------------------------------------------ systemd_boot_headers = \ src/boot/efi/util.h \ @@ -102,33 +112,10 @@ systemd_boot_sources = \ src/boot/efi/measure.c \ src/boot/efi/boot.c -EXTRA_DIST += $(systemd_boot_sources) $(systemd_boot_headers) - -systemd_boot_objects = $(addprefix $(top_builddir)/,$(systemd_boot_sources:.c=.o)) -systemd_boot_solib = $(top_builddir)/src/boot/efi/systemd_boot.so systemd_boot = systemd-boot$(EFI_MACHINE_TYPE_NAME).efi - -ifneq ($(ENABLE_EFI),) -ifneq ($(HAVE_GNUEFI),) -bootlib_DATA = $(systemd_boot) - -$(outdir)/%.o: $(top_srcdir)/src/boot/efi/%.c $(addprefix $(top_srcdir)/,$(systemd_boot_headers)) - @$(MKDIR_P) $(top_builddir)/src/boot/efi/ - $(AM_V_CC)$(EFI_CC) $(efi_cppflags) $(efi_cflags) -c $< -o $@ - -$(systemd_boot_solib): $(systemd_boot_objects) - $(AM_V_CCLD)$(LD) $(efi_ldflags) $(systemd_boot_objects) \ - -o $@ -lefi -lgnuefi $(shell $(CC) -print-libgcc-file-name); \ - nm -D -u $@ | grep ' U ' && exit 1 || : - -$(systemd_boot): $(systemd_boot_solib) - $(AM_V_GEN)$(OBJCOPY) -j .text -j .sdata -j .data -j .dynamic \ - -j .dynsym -j .rel -j .rela -j .reloc $(EFI_FORMAT) $< $@ -endif # HAVE_GNUEFI -endif # ENABLE_EFI - -CLEANFILES += $(systemd_boot_objects) $(systemd_boot_solib) $(systemd_boot) - +std.out_files += $(systemd_boot) +std.sys_files += $(bootlibdir)/$(systemd_boot) +$(outdir)/systemd-boot.so: $(addprefix $(outdir)/,$(notdir $(systemd_boot_sources:.c=.o))) # ------------------------------------------------------------------------------ stub_headers = \ src/boot/efi/util.h \ @@ -149,46 +136,19 @@ stub_sources = \ src/boot/efi/measure.c \ src/boot/efi/stub.c -EXTRA_DIST += \ - $(stub_sources) \ - $(stub_headers) \ - test/splash.bmp - -stub_objects = $(addprefix $(top_builddir)/,$(stub_sources:.c=.o)) -stub_solib = $(top_builddir)/src/boot/efi/stub.so stub = linux$(EFI_MACHINE_TYPE_NAME).efi.stub - -ifneq ($(ENABLE_EFI),) -ifneq ($(HAVE_GNUEFI),) -bootlib_DATA += $(stub) - -$(outdir)/%.o: $(top_srcdir)/src/boot/efi/%.c $(addprefix $(top_srcdir)/,$(stub_headers)) - @$(MKDIR_P) $(top_builddir)/src/boot/efi/ - $(AM_V_CC)$(EFI_CC) $(efi_cppflags) $(efi_cflags) -c $< -o $@ - -$(stub_solib): $(stub_objects) - $(AM_V_CCLD)$(LD) $(efi_ldflags) $(stub_objects) \ - -o $@ -lefi -lgnuefi $(shell $(CC) -print-libgcc-file-name); \ - nm -D -u $@ | grep ' U ' && exit 1 || : - -$(stub): $(stub_solib) - $(AM_V_GEN)$(OBJCOPY) -j .text -j .sdata -j .data -j .dynamic \ - -j .dynsym -j .rel -j .rela -j .reloc $(EFI_FORMAT) $< $@ -endif # HAVE_GNUEFI -endif # ENABLE_EFI - -CLEANFILES += $(stub_objects) $(stub_solib) $(stub) - - +std.out_files += $(stub) +std.sys_files += $(bootlibdir)/$(stub) +$(outdir)/linux.so: $(addprefix $(outdir)/,$(notdir $(stub_sources:.c=.o))) # ------------------------------------------------------------------------------ -CLEANFILES += test-efi-disk.img - -test-efi-disk.img: $(systemd_boot) $(stub) test/test-efi-create-disk.sh - $(AM_V_GEN)test/test-efi-create-disk.sh +$(outdir)/test-efi-disk.img: $(outdir)/$(systemd_boot) $(outdir)/$(stub) $(srcdir)/test-efi-create-disk.sh + $(AM_V_GEN)$(@D)/test-efi-create-disk.sh -test-efi: test-efi-disk.img +test-efi: $(outdir)/test-efi-disk.img $(QEMU) -machine accel=kvm -m 1024 -bios $(QEMU_BIOS) -snapshot test-efi-disk.img -EXTRA_DIST += test/test-efi-create-disk.sh - +std.clean_files += test-efi-disk.img +# ------------------------------------------------------------------------------ +endif # HAVE_GNUEFI +endif # ENABLE_EFI include $(topsrcdir)/build-aux/Makefile.tail.mk diff --git a/src/grp-coredump/coredumpctl/coredumpctl.c b/src/grp-coredump/coredumpctl/coredumpctl.c index dc95da3613..146a03032c 100644 --- a/src/grp-coredump/coredumpctl/coredumpctl.c +++ b/src/grp-coredump/coredumpctl/coredumpctl.c @@ -26,24 +26,24 @@ #include <systemd/sd-journal.h> -#include "alloc-util.h" -#include "compress.h" -#include "fd-util.h" -#include "fileio.h" -#include "journal-internal.h" -#include "log.h" -#include "macro.h" -#include "pager.h" -#include "parse-util.h" -#include "path-util.h" -#include "process-util.h" -#include "set.h" -#include "sigbus.h" -#include "signal-util.h" -#include "string-util.h" -#include "terminal-util.h" -#include "user-util.h" -#include "util.h" +#include "basic/alloc-util.h" +#include "sd-journal/compress.h" +#include "basic/fd-util.h" +#include "basic/fileio.h" +#include "sd-journal/journal-internal.h" +#include "basic/log.h" +#include "basic/macro.h" +#include "shared/pager.h" +#include "basic/parse-util.h" +#include "basic/path-util.h" +#include "basic/process-util.h" +#include "basic/set.h" +#include "basic/sigbus.h" +#include "basic/signal-util.h" +#include "basic/string-util.h" +#include "basic/terminal-util.h" +#include "basic/user-util.h" +#include "basic/util.h" static enum { ACTION_NONE, diff --git a/src/grp-coredump/systemd-coredump/Makefile b/src/grp-coredump/systemd-coredump/Makefile index bc71db120e..f36ccaf6cc 100644 --- a/src/grp-coredump/systemd-coredump/Makefile +++ b/src/grp-coredump/systemd-coredump/Makefile @@ -78,4 +78,7 @@ EXTRA_DIST += \ sysctl.d/50-coredump.conf.in \ units/systemd-coredump@.service.in +systemd.CPPFLAGS += -I$(topsrcdir)/src/grp-journal/libjournal-core +systemd.CPPFLAGS += -DPKGSYSCONFDIR=\"$(pkgsysconfdir)\" + include $(topsrcdir)/build-aux/Makefile.tail.mk diff --git a/src/grp-coredump/systemd-coredump/coredump-vacuum.c b/src/grp-coredump/systemd-coredump/coredump-vacuum.c index f02b6dbd87..77c543ca9c 100644 --- a/src/grp-coredump/systemd-coredump/coredump-vacuum.c +++ b/src/grp-coredump/systemd-coredump/coredump-vacuum.c @@ -19,16 +19,16 @@ #include <sys/statvfs.h> -#include "alloc-util.h" +#include "basic/alloc-util.h" #include "coredump-vacuum.h" -#include "dirent-util.h" -#include "fd-util.h" -#include "hashmap.h" -#include "macro.h" -#include "string-util.h" -#include "time-util.h" -#include "user-util.h" -#include "util.h" +#include "basic/dirent-util.h" +#include "basic/fd-util.h" +#include "basic/hashmap.h" +#include "basic/macro.h" +#include "basic/string-util.h" +#include "basic/time-util.h" +#include "basic/user-util.h" +#include "basic/util.h" #define DEFAULT_MAX_USE_LOWER (uint64_t) (1ULL*1024ULL*1024ULL) /* 1 MiB */ #define DEFAULT_MAX_USE_UPPER (uint64_t) (4ULL*1024ULL*1024ULL*1024ULL) /* 4 GiB */ diff --git a/src/grp-coredump/systemd-coredump/coredump.c b/src/grp-coredump/systemd-coredump/coredump.c index bf0e0a038b..8f291e6bd8 100644 --- a/src/grp-coredump/systemd-coredump/coredump.c +++ b/src/grp-coredump/systemd-coredump/coredump.c @@ -32,35 +32,35 @@ #include <systemd/sd-login.h> #include <systemd/sd-daemon.h> -#include "acl-util.h" -#include "alloc-util.h" -#include "capability-util.h" -#include "cgroup-util.h" -#include "compress.h" -#include "conf-parser.h" -#include "copy.h" +#include "shared/acl-util.h" +#include "basic/alloc-util.h" +#include "basic/capability-util.h" +#include "basic/cgroup-util.h" +#include "sd-journal/compress.h" +#include "shared/conf-parser.h" +#include "basic/copy.h" #include "coredump-vacuum.h" -#include "dirent-util.h" -#include "escape.h" -#include "fd-util.h" -#include "fileio.h" -#include "fs-util.h" -#include "io-util.h" +#include "basic/dirent-util.h" +#include "basic/escape.h" +#include "basic/fd-util.h" +#include "basic/fileio.h" +#include "basic/fs-util.h" +#include "basic/io-util.h" #include "journald-native.h" -#include "log.h" -#include "macro.h" -#include "missing.h" -#include "mkdir.h" -#include "parse-util.h" -#include "process-util.h" -#include "socket-util.h" -#include "special.h" +#include "basic/log.h" +#include "basic/macro.h" +#include "basic/missing.h" +#include "basic/mkdir.h" +#include "basic/parse-util.h" +#include "basic/process-util.h" +#include "basic/socket-util.h" +#include "basic/special.h" #include "stacktrace.h" -#include "string-table.h" -#include "string-util.h" -#include "strv.h" -#include "user-util.h" -#include "util.h" +#include "basic/string-table.h" +#include "basic/string-util.h" +#include "basic/strv.h" +#include "basic/user-util.h" +#include "basic/util.h" /* The maximum size up to which we process coredumps */ #define PROCESS_SIZE_MAX ((uint64_t) (2LLU*1024LLU*1024LLU*1024LLU)) diff --git a/src/grp-coredump/systemd-coredump/stacktrace.c b/src/grp-coredump/systemd-coredump/stacktrace.c index cc4dad9465..f2309b5cc4 100644 --- a/src/grp-coredump/systemd-coredump/stacktrace.c +++ b/src/grp-coredump/systemd-coredump/stacktrace.c @@ -20,13 +20,13 @@ #include <dwarf.h> #include <elfutils/libdwfl.h> -#include "alloc-util.h" -#include "fd-util.h" -#include "formats-util.h" -#include "macro.h" +#include "basic/alloc-util.h" +#include "basic/fd-util.h" +#include "basic/formats-util.h" +#include "basic/macro.h" #include "stacktrace.h" -#include "string-util.h" -#include "util.h" +#include "basic/string-util.h" +#include "basic/util.h" #define FRAMES_MAX 64 #define THREADS_MAX 64 diff --git a/src/grp-helperunits/systemd-backlight/backlight.c b/src/grp-helperunits/systemd-backlight/backlight.c index 45be135a23..c7931ac584 100644 --- a/src/grp-helperunits/systemd-backlight/backlight.c +++ b/src/grp-helperunits/systemd-backlight/backlight.c @@ -19,16 +19,16 @@ #include "libudev.h" -#include "alloc-util.h" -#include "def.h" -#include "escape.h" -#include "fileio.h" -#include "mkdir.h" -#include "parse-util.h" -#include "proc-cmdline.h" -#include "string-util.h" -#include "udev-util.h" -#include "util.h" +#include "basic/alloc-util.h" +#include "basic/def.h" +#include "basic/escape.h" +#include "basic/fileio.h" +#include "basic/mkdir.h" +#include "basic/parse-util.h" +#include "basic/proc-cmdline.h" +#include "basic/string-util.h" +#include "shared/udev-util.h" +#include "basic/util.h" static struct udev_device *find_pci_or_platform_parent(struct udev_device *device) { struct udev_device *parent; diff --git a/src/grp-helperunits/systemd-binfmt/binfmt.c b/src/grp-helperunits/systemd-binfmt/binfmt.c index eeef04fb1c..39bbdb5335 100644 --- a/src/grp-helperunits/systemd-binfmt/binfmt.c +++ b/src/grp-helperunits/systemd-binfmt/binfmt.c @@ -25,15 +25,15 @@ #include <stdlib.h> #include <string.h> -#include "alloc-util.h" -#include "conf-files.h" -#include "def.h" -#include "fd-util.h" -#include "fileio.h" -#include "log.h" -#include "string-util.h" -#include "strv.h" -#include "util.h" +#include "basic/alloc-util.h" +#include "basic/conf-files.h" +#include "basic/def.h" +#include "basic/fd-util.h" +#include "basic/fileio.h" +#include "basic/log.h" +#include "basic/string-util.h" +#include "basic/strv.h" +#include "basic/util.h" static const char conf_file_dirs[] = CONF_PATHS_NULSTR("binfmt.d"); diff --git a/src/grp-helperunits/systemd-detect-virt/detect-virt.c b/src/grp-helperunits/systemd-detect-virt/detect-virt.c index 5d51589a31..06cdab5297 100644 --- a/src/grp-helperunits/systemd-detect-virt/detect-virt.c +++ b/src/grp-helperunits/systemd-detect-virt/detect-virt.c @@ -22,8 +22,8 @@ #include <stdbool.h> #include <stdlib.h> -#include "util.h" -#include "virt.h" +#include "basic/util.h" +#include "basic/virt.h" static bool arg_quiet = false; static enum { diff --git a/src/grp-helperunits/systemd-quotacheck/Makefile b/src/grp-helperunits/systemd-quotacheck/Makefile index 4220946f39..979ae07c9e 100644 --- a/src/grp-helperunits/systemd-quotacheck/Makefile +++ b/src/grp-helperunits/systemd-quotacheck/Makefile @@ -43,4 +43,6 @@ EXTRA_DIST += \ nodist_systemunit_DATA += \ units/quotaon.service +systemd.CPPFLAGS += -DQUOTACHECK=\"$(QUOTACHECK)\" + include $(topsrcdir)/build-aux/Makefile.tail.mk diff --git a/src/grp-helperunits/systemd-quotacheck/quotacheck.c b/src/grp-helperunits/systemd-quotacheck/quotacheck.c index 6d8c05f046..3c2292b0c4 100644 --- a/src/grp-helperunits/systemd-quotacheck/quotacheck.c +++ b/src/grp-helperunits/systemd-quotacheck/quotacheck.c @@ -23,11 +23,11 @@ #include <sys/prctl.h> #include <unistd.h> -#include "proc-cmdline.h" -#include "process-util.h" -#include "signal-util.h" -#include "string-util.h" -#include "util.h" +#include "basic/proc-cmdline.h" +#include "basic/process-util.h" +#include "basic/signal-util.h" +#include "basic/string-util.h" +#include "basic/util.h" static bool arg_skip = false; static bool arg_force = false; diff --git a/src/grp-helperunits/systemd-random-seed/Makefile b/src/grp-helperunits/systemd-random-seed/Makefile index 56d1af7431..65ae60828b 100644 --- a/src/grp-helperunits/systemd-random-seed/Makefile +++ b/src/grp-helperunits/systemd-random-seed/Makefile @@ -44,4 +44,7 @@ endif # ENABLE_RANDOMSEED EXTRA_DIST += \ units/systemd-random-seed.service.in +systemd.CPPFLAGS += -DRANDOM_SEED_DIR=\"$(localstatedir)/lib/systemd/\" +systemd.CPPFLAGS += -DRANDOM_SEED=\"$(localstatedir)/lib/systemd/random-seed\" + include $(topsrcdir)/build-aux/Makefile.tail.mk diff --git a/src/grp-helperunits/systemd-random-seed/random-seed.c b/src/grp-helperunits/systemd-random-seed/random-seed.c index 6748bb9dd3..7fea6069f3 100644 --- a/src/grp-helperunits/systemd-random-seed/random-seed.c +++ b/src/grp-helperunits/systemd-random-seed/random-seed.c @@ -23,13 +23,13 @@ #include <sys/stat.h> #include <unistd.h> -#include "alloc-util.h" -#include "fd-util.h" -#include "io-util.h" -#include "log.h" -#include "mkdir.h" -#include "string-util.h" -#include "util.h" +#include "basic/alloc-util.h" +#include "basic/fd-util.h" +#include "basic/io-util.h" +#include "basic/log.h" +#include "basic/mkdir.h" +#include "basic/string-util.h" +#include "basic/util.h" #define POOL_SIZE_MIN 512 diff --git a/src/grp-helperunits/systemd-rfkill/rfkill.c b/src/grp-helperunits/systemd-rfkill/rfkill.c index f0b0ad9275..d3dd2ef18d 100644 --- a/src/grp-helperunits/systemd-rfkill/rfkill.c +++ b/src/grp-helperunits/systemd-rfkill/rfkill.c @@ -23,18 +23,18 @@ #include "libudev.h" #include <systemd/sd-daemon.h> -#include "alloc-util.h" -#include "escape.h" -#include "fd-util.h" -#include "fileio.h" -#include "io-util.h" -#include "mkdir.h" -#include "parse-util.h" -#include "proc-cmdline.h" -#include "string-table.h" -#include "string-util.h" -#include "udev-util.h" -#include "util.h" +#include "basic/alloc-util.h" +#include "basic/escape.h" +#include "basic/fd-util.h" +#include "basic/fileio.h" +#include "basic/io-util.h" +#include "basic/mkdir.h" +#include "basic/parse-util.h" +#include "basic/proc-cmdline.h" +#include "basic/string-table.h" +#include "basic/string-util.h" +#include "shared/udev-util.h" +#include "basic/util.h" #define EXIT_USEC (5 * USEC_PER_SEC) diff --git a/src/grp-helperunits/systemd-sleep/Makefile b/src/grp-helperunits/systemd-sleep/Makefile index 3c9106638f..9ac849f817 100644 --- a/src/grp-helperunits/systemd-sleep/Makefile +++ b/src/grp-helperunits/systemd-sleep/Makefile @@ -30,4 +30,6 @@ systemd_sleep_SOURCES = \ systemd_sleep_LDADD = \ libshared.la +systemd.CPPFLAGS += -DSYSTEM_SLEEP_PATH=\"$(systemsleepdir)\" + include $(topsrcdir)/build-aux/Makefile.tail.mk diff --git a/src/grp-helperunits/systemd-sleep/sleep.c b/src/grp-helperunits/systemd-sleep/sleep.c index 7f8a95728d..100066d4c1 100644 --- a/src/grp-helperunits/systemd-sleep/sleep.c +++ b/src/grp-helperunits/systemd-sleep/sleep.c @@ -24,14 +24,14 @@ #include <systemd/sd-messages.h> -#include "def.h" -#include "fd-util.h" -#include "fileio.h" -#include "log.h" -#include "sleep-config.h" -#include "string-util.h" -#include "strv.h" -#include "util.h" +#include "basic/def.h" +#include "basic/fd-util.h" +#include "basic/fileio.h" +#include "basic/log.h" +#include "shared/sleep-config.h" +#include "basic/string-util.h" +#include "basic/strv.h" +#include "basic/util.h" static char* arg_verb = NULL; diff --git a/src/grp-helperunits/systemd-user-sessions/user-sessions.c b/src/grp-helperunits/systemd-user-sessions/user-sessions.c index 9b29b5ba1d..4cec29c39e 100644 --- a/src/grp-helperunits/systemd-user-sessions/user-sessions.c +++ b/src/grp-helperunits/systemd-user-sessions/user-sessions.c @@ -20,12 +20,12 @@ #include <errno.h> #include <unistd.h> -#include "fileio.h" -#include "fileio-label.h" -#include "log.h" -#include "selinux-util.h" -#include "string-util.h" -#include "util.h" +#include "basic/fileio.h" +#include "basic/fileio-label.h" +#include "basic/log.h" +#include "basic/selinux-util.h" +#include "basic/string-util.h" +#include "basic/util.h" int main(int argc, char*argv[]) { diff --git a/src/grp-helperunits/systemd-vconsole-setup/vconsole-setup.c b/src/grp-helperunits/systemd-vconsole-setup/vconsole-setup.c index 1118118450..dd05231982 100644 --- a/src/grp-helperunits/systemd-vconsole-setup/vconsole-setup.c +++ b/src/grp-helperunits/systemd-vconsole-setup/vconsole-setup.c @@ -29,19 +29,19 @@ #include <sys/ioctl.h> #include <unistd.h> -#include "alloc-util.h" -#include "fd-util.h" -#include "fileio.h" -#include "io-util.h" -#include "locale-util.h" -#include "log.h" -#include "process-util.h" -#include "signal-util.h" -#include "stdio-util.h" -#include "string-util.h" -#include "terminal-util.h" -#include "util.h" -#include "virt.h" +#include "basic/alloc-util.h" +#include "basic/fd-util.h" +#include "basic/fileio.h" +#include "basic/io-util.h" +#include "basic/locale-util.h" +#include "basic/log.h" +#include "basic/process-util.h" +#include "basic/signal-util.h" +#include "basic/stdio-util.h" +#include "basic/string-util.h" +#include "basic/terminal-util.h" +#include "basic/util.h" +#include "basic/virt.h" static bool is_vconsole(int fd) { unsigned char data[1]; diff --git a/src/grp-hostname/hostnamectl.c b/src/grp-hostname/hostnamectl.c index aabc3b30c0..30f0f06d89 100644 --- a/src/grp-hostname/hostnamectl.c +++ b/src/grp-hostname/hostnamectl.c @@ -26,13 +26,13 @@ #include <systemd/sd-bus.h> #include <systemd/sd-id128.h> -#include "alloc-util.h" -#include "architecture.h" +#include "basic/alloc-util.h" +#include "basic/architecture.h" #include "bus-error.h" -#include "bus-util.h" -#include "hostname-util.h" -#include "spawn-polkit-agent.h" -#include "util.h" +#include "shared/bus-util.h" +#include "basic/hostname-util.h" +#include "shared/spawn-polkit-agent.h" +#include "basic/util.h" static bool arg_ask_password = true; static BusTransport arg_transport = BUS_TRANSPORT_LOCAL; diff --git a/src/grp-hostname/hostnamed.c b/src/grp-hostname/hostnamed.c index d11756e615..61d660a9f6 100644 --- a/src/grp-hostname/hostnamed.c +++ b/src/grp-hostname/hostnamed.c @@ -22,19 +22,19 @@ #include <sys/utsname.h> #include <unistd.h> -#include "alloc-util.h" -#include "bus-util.h" -#include "def.h" -#include "env-util.h" -#include "fileio-label.h" -#include "hostname-util.h" -#include "parse-util.h" -#include "path-util.h" -#include "selinux-util.h" -#include "strv.h" -#include "user-util.h" -#include "util.h" -#include "virt.h" +#include "basic/alloc-util.h" +#include "shared/bus-util.h" +#include "basic/def.h" +#include "basic/env-util.h" +#include "basic/fileio-label.h" +#include "basic/hostname-util.h" +#include "basic/parse-util.h" +#include "basic/path-util.h" +#include "basic/selinux-util.h" +#include "basic/strv.h" +#include "basic/user-util.h" +#include "basic/util.h" +#include "basic/virt.h" #define VALID_DEPLOYMENT_CHARS (DIGITS LETTERS "-.:") diff --git a/src/grp-import/curl-util.c b/src/grp-import/curl-util.c index 6990c47f48..d6570a3656 100644 --- a/src/grp-import/curl-util.c +++ b/src/grp-import/curl-util.c @@ -17,10 +17,10 @@ along with systemd; If not, see <http://www.gnu.org/licenses/>. ***/ -#include "alloc-util.h" +#include "basic/alloc-util.h" #include "curl-util.h" -#include "fd-util.h" -#include "string-util.h" +#include "basic/fd-util.h" +#include "basic/string-util.h" static void curl_glue_check_finished(CurlGlue *g) { CURLMsg *msg; diff --git a/src/grp-import/curl-util.h b/src/grp-import/curl-util.h index 2e71bd3b5d..296b35d09c 100644 --- a/src/grp-import/curl-util.h +++ b/src/grp-import/curl-util.h @@ -24,7 +24,7 @@ #include <systemd/sd-event.h> -#include "hashmap.h" +#include "basic/hashmap.h" typedef struct CurlGlue CurlGlue; diff --git a/src/grp-import/qcow2-util.c b/src/grp-import/qcow2-util.c index ee2121cc36..fa272088d3 100644 --- a/src/grp-import/qcow2-util.c +++ b/src/grp-import/qcow2-util.c @@ -19,11 +19,11 @@ #include <zlib.h> -#include "alloc-util.h" -#include "btrfs-util.h" +#include "basic/alloc-util.h" +#include "basic/btrfs-util.h" #include "qcow2-util.h" -#include "sparse-endian.h" -#include "util.h" +#include "basic/sparse-endian.h" +#include "basic/util.h" #define QCOW2_MAGIC 0x514649fb diff --git a/src/grp-import/systemd-export/export-raw.c b/src/grp-import/systemd-export/export-raw.c index 658f835132..1e3f6e034e 100644 --- a/src/grp-import/systemd-export/export-raw.c +++ b/src/grp-import/systemd-export/export-raw.c @@ -27,16 +27,16 @@ #include <systemd/sd-daemon.h> -#include "alloc-util.h" -#include "btrfs-util.h" -#include "copy.h" +#include "basic/alloc-util.h" +#include "basic/btrfs-util.h" +#include "basic/copy.h" #include "export-raw.h" -#include "fd-util.h" -#include "fileio.h" +#include "basic/fd-util.h" +#include "basic/fileio.h" #include "import-common.h" -#include "ratelimit.h" -#include "string-util.h" -#include "util.h" +#include "basic/ratelimit.h" +#include "basic/string-util.h" +#include "basic/util.h" #define COPY_BUFFER_SIZE (16*1024) diff --git a/src/grp-import/systemd-export/export-raw.h b/src/grp-import/systemd-export/export-raw.h index c7ac134603..13d7809b9d 100644 --- a/src/grp-import/systemd-export/export-raw.h +++ b/src/grp-import/systemd-export/export-raw.h @@ -22,7 +22,7 @@ #include <systemd/sd-event.h> #include "import-compress.h" -#include "macro.h" +#include "basic/macro.h" typedef struct RawExport RawExport; diff --git a/src/grp-import/systemd-export/export-tar.c b/src/grp-import/systemd-export/export-tar.c index 9c511984c1..9a8d48dc2e 100644 --- a/src/grp-import/systemd-export/export-tar.c +++ b/src/grp-import/systemd-export/export-tar.c @@ -19,16 +19,16 @@ #include <systemd/sd-daemon.h> -#include "alloc-util.h" -#include "btrfs-util.h" +#include "basic/alloc-util.h" +#include "basic/btrfs-util.h" #include "export-tar.h" -#include "fd-util.h" -#include "fileio.h" +#include "basic/fd-util.h" +#include "basic/fileio.h" #include "import-common.h" -#include "process-util.h" -#include "ratelimit.h" -#include "string-util.h" -#include "util.h" +#include "basic/process-util.h" +#include "basic/ratelimit.h" +#include "basic/string-util.h" +#include "basic/util.h" #define COPY_BUFFER_SIZE (16*1024) diff --git a/src/grp-import/systemd-export/export-tar.h b/src/grp-import/systemd-export/export-tar.h index 50206cabb3..0a59033d5b 100644 --- a/src/grp-import/systemd-export/export-tar.h +++ b/src/grp-import/systemd-export/export-tar.h @@ -22,7 +22,7 @@ #include <systemd/sd-event.h> #include "import-compress.h" -#include "macro.h" +#include "basic/macro.h" typedef struct TarExport TarExport; diff --git a/src/grp-import/systemd-export/export.c b/src/grp-import/systemd-export/export.c index 0a5efe5476..a64b79bba0 100644 --- a/src/grp-import/systemd-export/export.c +++ b/src/grp-import/systemd-export/export.c @@ -21,17 +21,17 @@ #include <systemd/sd-event.h> -#include "alloc-util.h" +#include "basic/alloc-util.h" #include "export-raw.h" #include "export-tar.h" -#include "fd-util.h" -#include "fs-util.h" -#include "hostname-util.h" -#include "import-util.h" -#include "machine-image.h" -#include "signal-util.h" -#include "string-util.h" -#include "verbs.h" +#include "basic/fd-util.h" +#include "basic/fs-util.h" +#include "basic/hostname-util.h" +#include "shared/import-util.h" +#include "shared/machine-image.h" +#include "basic/signal-util.h" +#include "basic/string-util.h" +#include "basic/verbs.h" static ImportCompressType arg_compress = IMPORT_COMPRESS_UNKNOWN; diff --git a/src/grp-import/systemd-import/import-common.c b/src/grp-import/systemd-import/import-common.c index 287a3382a1..c2baef83f8 100644 --- a/src/grp-import/systemd-import/import-common.c +++ b/src/grp-import/systemd-import/import-common.c @@ -22,12 +22,12 @@ #include <sys/stat.h> #include <unistd.h> -#include "btrfs-util.h" -#include "capability-util.h" -#include "fd-util.h" +#include "basic/btrfs-util.h" +#include "basic/capability-util.h" +#include "basic/fd-util.h" #include "import-common.h" -#include "signal-util.h" -#include "util.h" +#include "basic/signal-util.h" +#include "basic/util.h" int import_make_read_only_fd(int fd) { int r; diff --git a/src/grp-import/systemd-import/import-compress.c b/src/grp-import/systemd-import/import-compress.c index f1766bbe3b..05643cfbaf 100644 --- a/src/grp-import/systemd-import/import-compress.c +++ b/src/grp-import/systemd-import/import-compress.c @@ -18,8 +18,8 @@ ***/ #include "import-compress.h" -#include "string-table.h" -#include "util.h" +#include "basic/string-table.h" +#include "basic/util.h" void import_compress_free(ImportCompress *c) { assert(c); diff --git a/src/grp-import/systemd-import/import-compress.h b/src/grp-import/systemd-import/import-compress.h index 6b59d0724b..130afb4cd0 100644 --- a/src/grp-import/systemd-import/import-compress.h +++ b/src/grp-import/systemd-import/import-compress.h @@ -24,7 +24,7 @@ #include <sys/types.h> #include <zlib.h> -#include "macro.h" +#include "basic/macro.h" typedef enum ImportCompressType { IMPORT_COMPRESS_UNKNOWN, diff --git a/src/grp-import/systemd-import/import-raw.c b/src/grp-import/systemd-import/import-raw.c index ce37392707..0bbae2aa8a 100644 --- a/src/grp-import/systemd-import/import-raw.c +++ b/src/grp-import/systemd-import/import-raw.c @@ -22,26 +22,26 @@ #include <systemd/sd-daemon.h> #include <systemd/sd-event.h> -#include "alloc-util.h" -#include "btrfs-util.h" -#include "chattr-util.h" -#include "copy.h" -#include "fd-util.h" -#include "fileio.h" -#include "fs-util.h" -#include "hostname-util.h" +#include "basic/alloc-util.h" +#include "basic/btrfs-util.h" +#include "basic/chattr-util.h" +#include "basic/copy.h" +#include "basic/fd-util.h" +#include "basic/fileio.h" +#include "basic/fs-util.h" +#include "basic/hostname-util.h" #include "import-common.h" #include "import-compress.h" #include "import-raw.h" -#include "io-util.h" -#include "machine-pool.h" -#include "mkdir.h" -#include "path-util.h" +#include "basic/io-util.h" +#include "shared/machine-pool.h" +#include "basic/mkdir.h" +#include "basic/path-util.h" #include "qcow2-util.h" -#include "ratelimit.h" -#include "rm-rf.h" -#include "string-util.h" -#include "util.h" +#include "basic/ratelimit.h" +#include "basic/rm-rf.h" +#include "basic/string-util.h" +#include "basic/util.h" struct RawImport { sd_event *event; diff --git a/src/grp-import/systemd-import/import-raw.h b/src/grp-import/systemd-import/import-raw.h index f0a315c088..a3bc532d37 100644 --- a/src/grp-import/systemd-import/import-raw.h +++ b/src/grp-import/systemd-import/import-raw.h @@ -21,8 +21,8 @@ #include <systemd/sd-event.h> -#include "import-util.h" -#include "macro.h" +#include "shared/import-util.h" +#include "basic/macro.h" typedef struct RawImport RawImport; diff --git a/src/grp-import/systemd-import/import-tar.c b/src/grp-import/systemd-import/import-tar.c index 016d05e77d..8848beb11b 100644 --- a/src/grp-import/systemd-import/import-tar.c +++ b/src/grp-import/systemd-import/import-tar.c @@ -22,26 +22,26 @@ #include <systemd/sd-daemon.h> #include <systemd/sd-event.h> -#include "alloc-util.h" -#include "btrfs-util.h" -#include "copy.h" -#include "fd-util.h" -#include "fileio.h" -#include "fs-util.h" -#include "hostname-util.h" +#include "basic/alloc-util.h" +#include "basic/btrfs-util.h" +#include "basic/copy.h" +#include "basic/fd-util.h" +#include "basic/fileio.h" +#include "basic/fs-util.h" +#include "basic/hostname-util.h" #include "import-common.h" #include "import-compress.h" #include "import-tar.h" -#include "io-util.h" -#include "machine-pool.h" -#include "mkdir.h" -#include "path-util.h" -#include "process-util.h" +#include "basic/io-util.h" +#include "shared/machine-pool.h" +#include "basic/mkdir.h" +#include "basic/path-util.h" +#include "basic/process-util.h" #include "qcow2-util.h" -#include "ratelimit.h" -#include "rm-rf.h" -#include "string-util.h" -#include "util.h" +#include "basic/ratelimit.h" +#include "basic/rm-rf.h" +#include "basic/string-util.h" +#include "basic/util.h" struct TarImport { sd_event *event; diff --git a/src/grp-import/systemd-import/import-tar.h b/src/grp-import/systemd-import/import-tar.h index b66b00ddfd..90ab082f1a 100644 --- a/src/grp-import/systemd-import/import-tar.h +++ b/src/grp-import/systemd-import/import-tar.h @@ -21,8 +21,8 @@ #include <systemd/sd-event.h> -#include "import-util.h" -#include "macro.h" +#include "shared/import-util.h" +#include "basic/macro.h" typedef struct TarImport TarImport; diff --git a/src/grp-import/systemd-import/import.c b/src/grp-import/systemd-import/import.c index 338847dbc2..6c76c639c3 100644 --- a/src/grp-import/systemd-import/import.c +++ b/src/grp-import/systemd-import/import.c @@ -21,17 +21,17 @@ #include <systemd/sd-event.h> -#include "alloc-util.h" -#include "fd-util.h" -#include "fs-util.h" -#include "hostname-util.h" +#include "basic/alloc-util.h" +#include "basic/fd-util.h" +#include "basic/fs-util.h" +#include "basic/hostname-util.h" #include "import-raw.h" #include "import-tar.h" -#include "import-util.h" -#include "machine-image.h" -#include "signal-util.h" -#include "string-util.h" -#include "verbs.h" +#include "shared/import-util.h" +#include "shared/machine-image.h" +#include "basic/signal-util.h" +#include "basic/string-util.h" +#include "basic/verbs.h" static bool arg_force = false; static bool arg_read_only = false; diff --git a/src/grp-import/systemd-importd/importd.c b/src/grp-import/systemd-importd/importd.c index e30dfdf805..f9fe1038cd 100644 --- a/src/grp-import/systemd-importd/importd.c +++ b/src/grp-import/systemd-importd/importd.c @@ -21,27 +21,27 @@ #include <systemd/sd-bus.h> -#include "alloc-util.h" +#include "basic/alloc-util.h" #include "bus-common-errors.h" -#include "bus-util.h" -#include "def.h" -#include "fd-util.h" -#include "hostname-util.h" -#include "import-util.h" -#include "machine-pool.h" -#include "missing.h" -#include "mkdir.h" -#include "parse-util.h" -#include "path-util.h" -#include "process-util.h" -#include "signal-util.h" -#include "socket-util.h" -#include "string-table.h" -#include "strv.h" -#include "syslog-util.h" -#include "user-util.h" -#include "util.h" -#include "web-util.h" +#include "shared/bus-util.h" +#include "basic/def.h" +#include "basic/fd-util.h" +#include "basic/hostname-util.h" +#include "shared/import-util.h" +#include "shared/machine-pool.h" +#include "basic/missing.h" +#include "basic/mkdir.h" +#include "basic/parse-util.h" +#include "basic/path-util.h" +#include "basic/process-util.h" +#include "basic/signal-util.h" +#include "basic/socket-util.h" +#include "basic/string-table.h" +#include "basic/strv.h" +#include "basic/syslog-util.h" +#include "basic/user-util.h" +#include "basic/util.h" +#include "basic/web-util.h" typedef struct Transfer Transfer; typedef struct Manager Manager; diff --git a/src/grp-import/systemd-pull/pull-common.c b/src/grp-import/systemd-pull/pull-common.c index dc4e4667a9..fb167fd93c 100644 --- a/src/grp-import/systemd-pull/pull-common.c +++ b/src/grp-import/systemd-pull/pull-common.c @@ -19,25 +19,25 @@ #include <sys/prctl.h> -#include "alloc-util.h" -#include "btrfs-util.h" -#include "capability-util.h" -#include "copy.h" -#include "dirent-util.h" -#include "escape.h" -#include "fd-util.h" -#include "io-util.h" -#include "path-util.h" -#include "process-util.h" +#include "basic/alloc-util.h" +#include "basic/btrfs-util.h" +#include "basic/capability-util.h" +#include "basic/copy.h" +#include "basic/dirent-util.h" +#include "basic/escape.h" +#include "basic/fd-util.h" +#include "basic/io-util.h" +#include "basic/path-util.h" +#include "basic/process-util.h" #include "pull-common.h" #include "pull-job.h" -#include "rm-rf.h" -#include "signal-util.h" -#include "siphash24.h" -#include "string-util.h" -#include "strv.h" -#include "util.h" -#include "web-util.h" +#include "basic/rm-rf.h" +#include "basic/signal-util.h" +#include "basic/siphash24.h" +#include "basic/string-util.h" +#include "basic/strv.h" +#include "basic/util.h" +#include "basic/web-util.h" #define FILENAME_ESCAPE "/.#\"\'" #define HASH_URL_THRESHOLD_LENGTH (_POSIX_PATH_MAX - 16) diff --git a/src/grp-import/systemd-pull/pull-common.h b/src/grp-import/systemd-pull/pull-common.h index 929a131c88..d9cfb6b3c1 100644 --- a/src/grp-import/systemd-pull/pull-common.h +++ b/src/grp-import/systemd-pull/pull-common.h @@ -21,7 +21,7 @@ #include <stdbool.h> -#include "import-util.h" +#include "shared/import-util.h" #include "pull-job.h" int pull_make_local_copy(const char *final, const char *root, const char *local, bool force_local); diff --git a/src/grp-import/systemd-pull/pull-job.c b/src/grp-import/systemd-pull/pull-job.c index 6bcf35ef4e..fce08f65d9 100644 --- a/src/grp-import/systemd-pull/pull-job.c +++ b/src/grp-import/systemd-pull/pull-job.c @@ -19,16 +19,16 @@ #include <sys/xattr.h> -#include "alloc-util.h" -#include "fd-util.h" -#include "hexdecoct.h" -#include "io-util.h" -#include "machine-pool.h" -#include "parse-util.h" +#include "basic/alloc-util.h" +#include "basic/fd-util.h" +#include "basic/hexdecoct.h" +#include "basic/io-util.h" +#include "shared/machine-pool.h" +#include "basic/parse-util.h" #include "pull-job.h" -#include "string-util.h" -#include "strv.h" -#include "xattr-util.h" +#include "basic/string-util.h" +#include "basic/strv.h" +#include "basic/xattr-util.h" PullJob* pull_job_unref(PullJob *j) { if (!j) diff --git a/src/grp-import/systemd-pull/pull-job.h b/src/grp-import/systemd-pull/pull-job.h index 3a152a50e3..80d7370ff1 100644 --- a/src/grp-import/systemd-pull/pull-job.h +++ b/src/grp-import/systemd-pull/pull-job.h @@ -23,7 +23,7 @@ #include "curl-util.h" #include "import-compress.h" -#include "macro.h" +#include "basic/macro.h" typedef struct PullJob PullJob; diff --git a/src/grp-import/systemd-pull/pull-raw.c b/src/grp-import/systemd-pull/pull-raw.c index 19155cc53a..a9777a5838 100644 --- a/src/grp-import/systemd-pull/pull-raw.c +++ b/src/grp-import/systemd-pull/pull-raw.c @@ -23,30 +23,30 @@ #include <systemd/sd-daemon.h> -#include "alloc-util.h" -#include "btrfs-util.h" -#include "chattr-util.h" -#include "copy.h" +#include "basic/alloc-util.h" +#include "basic/btrfs-util.h" +#include "basic/chattr-util.h" +#include "basic/copy.h" #include "curl-util.h" -#include "fd-util.h" -#include "fileio.h" -#include "fs-util.h" -#include "hostname-util.h" +#include "basic/fd-util.h" +#include "basic/fileio.h" +#include "basic/fs-util.h" +#include "basic/hostname-util.h" #include "import-common.h" -#include "import-util.h" -#include "macro.h" -#include "mkdir.h" -#include "path-util.h" +#include "shared/import-util.h" +#include "basic/macro.h" +#include "basic/mkdir.h" +#include "basic/path-util.h" #include "pull-common.h" #include "pull-job.h" #include "pull-raw.h" #include "qcow2-util.h" -#include "rm-rf.h" -#include "string-util.h" -#include "strv.h" -#include "utf8.h" -#include "util.h" -#include "web-util.h" +#include "basic/rm-rf.h" +#include "basic/string-util.h" +#include "basic/strv.h" +#include "basic/utf8.h" +#include "basic/util.h" +#include "basic/web-util.h" typedef enum RawProgress { RAW_DOWNLOADING, diff --git a/src/grp-import/systemd-pull/pull-raw.h b/src/grp-import/systemd-pull/pull-raw.h index 6bafa6dafd..84cd146647 100644 --- a/src/grp-import/systemd-pull/pull-raw.h +++ b/src/grp-import/systemd-pull/pull-raw.h @@ -21,8 +21,8 @@ #include <systemd/sd-event.h> -#include "import-util.h" -#include "macro.h" +#include "shared/import-util.h" +#include "basic/macro.h" typedef struct RawPull RawPull; diff --git a/src/grp-import/systemd-pull/pull-tar.c b/src/grp-import/systemd-pull/pull-tar.c index e0205c3841..576bda5a3d 100644 --- a/src/grp-import/systemd-pull/pull-tar.c +++ b/src/grp-import/systemd-pull/pull-tar.c @@ -22,29 +22,29 @@ #include <systemd/sd-daemon.h> -#include "alloc-util.h" -#include "btrfs-util.h" -#include "copy.h" +#include "basic/alloc-util.h" +#include "basic/btrfs-util.h" +#include "basic/copy.h" #include "curl-util.h" -#include "fd-util.h" -#include "fileio.h" -#include "fs-util.h" -#include "hostname-util.h" +#include "basic/fd-util.h" +#include "basic/fileio.h" +#include "basic/fs-util.h" +#include "basic/hostname-util.h" #include "import-common.h" -#include "import-util.h" -#include "macro.h" -#include "mkdir.h" -#include "path-util.h" -#include "process-util.h" +#include "shared/import-util.h" +#include "basic/macro.h" +#include "basic/mkdir.h" +#include "basic/path-util.h" +#include "basic/process-util.h" #include "pull-common.h" #include "pull-job.h" #include "pull-tar.h" -#include "rm-rf.h" -#include "string-util.h" -#include "strv.h" -#include "utf8.h" -#include "util.h" -#include "web-util.h" +#include "basic/rm-rf.h" +#include "basic/string-util.h" +#include "basic/strv.h" +#include "basic/utf8.h" +#include "basic/util.h" +#include "basic/web-util.h" typedef enum TarProgress { TAR_DOWNLOADING, diff --git a/src/grp-import/systemd-pull/pull-tar.h b/src/grp-import/systemd-pull/pull-tar.h index 9ff5bd5953..addd1f861c 100644 --- a/src/grp-import/systemd-pull/pull-tar.h +++ b/src/grp-import/systemd-pull/pull-tar.h @@ -21,8 +21,8 @@ #include <systemd/sd-event.h> -#include "import-util.h" -#include "macro.h" +#include "shared/import-util.h" +#include "basic/macro.h" typedef struct TarPull TarPull; diff --git a/src/grp-import/systemd-pull/pull.c b/src/grp-import/systemd-pull/pull.c index 74df24f993..fa2af2fc02 100644 --- a/src/grp-import/systemd-pull/pull.c +++ b/src/grp-import/systemd-pull/pull.c @@ -21,17 +21,17 @@ #include <systemd/sd-event.h> -#include "alloc-util.h" -#include "hostname-util.h" -#include "import-util.h" -#include "machine-image.h" -#include "parse-util.h" +#include "basic/alloc-util.h" +#include "basic/hostname-util.h" +#include "shared/import-util.h" +#include "shared/machine-image.h" +#include "basic/parse-util.h" #include "pull-raw.h" #include "pull-tar.h" -#include "signal-util.h" -#include "string-util.h" -#include "verbs.h" -#include "web-util.h" +#include "basic/signal-util.h" +#include "basic/string-util.h" +#include "basic/verbs.h" +#include "basic/web-util.h" static bool arg_force = false; static const char *arg_image_root = "/var/lib/machines"; diff --git a/src/grp-import/test-qcow2.c b/src/grp-import/test-qcow2.c index b820253d71..0a256d7f41 100644 --- a/src/grp-import/test-qcow2.c +++ b/src/grp-import/test-qcow2.c @@ -17,10 +17,10 @@ along with systemd; If not, see <http://www.gnu.org/licenses/>. ***/ -#include "fd-util.h" -#include "log.h" +#include "basic/fd-util.h" +#include "basic/log.h" #include "qcow2-util.h" -#include "util.h" +#include "basic/util.h" int main(int argc, char *argv[]) { _cleanup_close_ int sfd = -1, dfd = -1; diff --git a/src/grp-journal-remote/microhttpd-util.c b/src/grp-journal-remote/microhttpd-util.c index c65c43186f..99d6f32a2a 100644 --- a/src/grp-journal-remote/microhttpd-util.c +++ b/src/grp-journal-remote/microhttpd-util.c @@ -27,13 +27,13 @@ #include <gnutls/x509.h> #endif -#include "alloc-util.h" -#include "log.h" -#include "macro.h" +#include "basic/alloc-util.h" +#include "basic/log.h" +#include "basic/macro.h" #include "microhttpd-util.h" -#include "string-util.h" -#include "strv.h" -#include "util.h" +#include "basic/string-util.h" +#include "basic/strv.h" +#include "basic/util.h" void microhttpd_logger(void *arg, const char *fmt, va_list ap) { char *f; diff --git a/src/grp-journal-remote/microhttpd-util.h b/src/grp-journal-remote/microhttpd-util.h index ea160f212b..178e78f892 100644 --- a/src/grp-journal-remote/microhttpd-util.h +++ b/src/grp-journal-remote/microhttpd-util.h @@ -22,7 +22,7 @@ #include <microhttpd.h> #include <stdarg.h> -#include "macro.h" +#include "basic/macro.h" /* Compatiblity with libmicrohttpd < 0.9.38 */ #ifndef MHD_HTTP_NOT_ACCEPTABLE diff --git a/src/grp-journal-remote/systemd-journal-gatewayd/journal-gatewayd.c b/src/grp-journal-remote/systemd-journal-gatewayd/journal-gatewayd.c index 1cfb5e2c9c..2e21f9ecb7 100644 --- a/src/grp-journal-remote/systemd-journal-gatewayd/journal-gatewayd.c +++ b/src/grp-journal-remote/systemd-journal-gatewayd/journal-gatewayd.c @@ -31,17 +31,17 @@ #include <systemd/sd-daemon.h> #include <systemd/sd-journal.h> -#include "alloc-util.h" -#include "bus-util.h" -#include "fd-util.h" -#include "fileio.h" -#include "hostname-util.h" -#include "log.h" -#include "logs-show.h" +#include "basic/alloc-util.h" +#include "shared/bus-util.h" +#include "basic/fd-util.h" +#include "basic/fileio.h" +#include "basic/hostname-util.h" +#include "basic/log.h" +#include "shared/logs-show.h" #include "microhttpd-util.h" -#include "parse-util.h" -#include "sigbus.h" -#include "util.h" +#include "basic/parse-util.h" +#include "basic/sigbus.h" +#include "basic/util.h" #define JOURNAL_WAIT_TIMEOUT (10*USEC_PER_SEC) diff --git a/src/grp-journal-remote/systemd-journal-remote/journal-remote-parse.c b/src/grp-journal-remote/systemd-journal-remote/journal-remote-parse.c index 9ba9ee3fc0..ec5358fb97 100644 --- a/src/grp-journal-remote/systemd-journal-remote/journal-remote-parse.c +++ b/src/grp-journal-remote/systemd-journal-remote/journal-remote-parse.c @@ -17,12 +17,12 @@ along with systemd; If not, see <http://www.gnu.org/licenses/>. ***/ -#include "alloc-util.h" -#include "fd-util.h" +#include "basic/alloc-util.h" +#include "basic/fd-util.h" #include "journal-remote-parse.h" #include "journald-native.h" -#include "parse-util.h" -#include "string-util.h" +#include "basic/parse-util.h" +#include "basic/string-util.h" #define LINE_CHUNK 8*1024u diff --git a/src/grp-journal-remote/systemd-journal-remote/journal-remote-write.c b/src/grp-journal-remote/systemd-journal-remote/journal-remote-write.c index 7bba52566e..82292fd240 100644 --- a/src/grp-journal-remote/systemd-journal-remote/journal-remote-write.c +++ b/src/grp-journal-remote/systemd-journal-remote/journal-remote-write.c @@ -17,7 +17,7 @@ along with systemd; If not, see <http://www.gnu.org/licenses/>. ***/ -#include "alloc-util.h" +#include "basic/alloc-util.h" #include "journal-remote.h" int iovw_put(struct iovec_wrapper *iovw, void* data, size_t len) { diff --git a/src/grp-journal-remote/systemd-journal-remote/journal-remote.c b/src/grp-journal-remote/systemd-journal-remote/journal-remote.c index 9b4d12d336..6ea7adabb0 100644 --- a/src/grp-journal-remote/systemd-journal-remote/journal-remote.c +++ b/src/grp-journal-remote/systemd-journal-remote/journal-remote.c @@ -33,25 +33,25 @@ #include <systemd/sd-daemon.h> -#include "alloc-util.h" -#include "conf-parser.h" -#include "def.h" -#include "escape.h" -#include "fd-util.h" -#include "fileio.h" +#include "basic/alloc-util.h" +#include "shared/conf-parser.h" +#include "basic/def.h" +#include "basic/escape.h" +#include "basic/fd-util.h" +#include "basic/fileio.h" #include "journal-file.h" #include "journal-remote-write.h" #include "journal-remote.h" #include "journald-native.h" -#include "macro.h" -#include "parse-util.h" -#include "signal-util.h" -#include "socket-util.h" -#include "stat-util.h" -#include "stdio-util.h" -#include "string-table.h" -#include "string-util.h" -#include "strv.h" +#include "basic/macro.h" +#include "basic/parse-util.h" +#include "basic/signal-util.h" +#include "basic/socket-util.h" +#include "basic/stat-util.h" +#include "basic/stdio-util.h" +#include "basic/string-table.h" +#include "basic/string-util.h" +#include "basic/strv.h" #define REMOTE_JOURNAL_PATH "/var/log/journal/remote" diff --git a/src/grp-journal-remote/systemd-journal-remote/journal-remote.h b/src/grp-journal-remote/systemd-journal-remote/journal-remote.h index 58487e498a..2e8d5999b0 100644 --- a/src/grp-journal-remote/systemd-journal-remote/journal-remote.h +++ b/src/grp-journal-remote/systemd-journal-remote/journal-remote.h @@ -21,7 +21,7 @@ #include <systemd/sd-event.h> -#include "hashmap.h" +#include "basic/hashmap.h" #include "journal-remote-parse.h" #include "journal-remote-write.h" #include "microhttpd-util.h" diff --git a/src/grp-journal-remote/systemd-journal-upload/journal-upload-journal.c b/src/grp-journal-remote/systemd-journal-upload/journal-upload-journal.c index aef095c8c9..eddfc384fa 100644 --- a/src/grp-journal-remote/systemd-journal-upload/journal-upload-journal.c +++ b/src/grp-journal-remote/systemd-journal-upload/journal-upload-journal.c @@ -20,11 +20,11 @@ #include <curl/curl.h> #include <stdbool.h> -#include "alloc-util.h" +#include "basic/alloc-util.h" #include "journal-upload.h" -#include "log.h" -#include "utf8.h" -#include "util.h" +#include "basic/log.h" +#include "basic/utf8.h" +#include "basic/util.h" #include <systemd/sd-daemon.h> /** diff --git a/src/grp-journal-remote/systemd-journal-upload/journal-upload.c b/src/grp-journal-remote/systemd-journal-upload/journal-upload.c index e622f6c1e1..643f44cd86 100644 --- a/src/grp-journal-remote/systemd-journal-upload/journal-upload.c +++ b/src/grp-journal-remote/systemd-journal-upload/journal-upload.c @@ -25,21 +25,21 @@ #include <systemd/sd-daemon.h> -#include "alloc-util.h" -#include "conf-parser.h" -#include "def.h" -#include "fd-util.h" -#include "fileio.h" -#include "formats-util.h" -#include "glob-util.h" +#include "basic/alloc-util.h" +#include "shared/conf-parser.h" +#include "basic/def.h" +#include "basic/fd-util.h" +#include "basic/fileio.h" +#include "basic/formats-util.h" +#include "basic/glob-util.h" #include "journal-upload.h" -#include "log.h" -#include "mkdir.h" -#include "parse-util.h" -#include "sigbus.h" -#include "signal-util.h" -#include "string-util.h" -#include "util.h" +#include "basic/log.h" +#include "basic/mkdir.h" +#include "basic/parse-util.h" +#include "basic/sigbus.h" +#include "basic/signal-util.h" +#include "basic/string-util.h" +#include "basic/util.h" #define PRIV_KEY_FILE CERTIFICATE_ROOT "/private/journal-upload.pem" #define CERT_FILE CERTIFICATE_ROOT "/certs/journal-upload.pem" diff --git a/src/grp-journal-remote/systemd-journal-upload/journal-upload.h b/src/grp-journal-remote/systemd-journal-upload/journal-upload.h index 4a521bf78f..0b0336c84b 100644 --- a/src/grp-journal-remote/systemd-journal-upload/journal-upload.h +++ b/src/grp-journal-remote/systemd-journal-upload/journal-upload.h @@ -4,7 +4,7 @@ #include <systemd/sd-event.h> #include <systemd/sd-journal.h> -#include "time-util.h" +#include "basic/time-util.h" typedef enum { ENTRY_CURSOR = 0, /* Nothing actually written yet. */ diff --git a/src/grp-journal/journalctl/journalctl.c b/src/grp-journal/journalctl/journalctl.c index 3602bd0556..c673fbf78a 100644 --- a/src/grp-journal/journalctl/journalctl.c +++ b/src/grp-journal/journalctl/journalctl.c @@ -36,41 +36,41 @@ #include <systemd/sd-bus.h> #include <systemd/sd-journal.h> -#include "acl-util.h" -#include "alloc-util.h" +#include "shared/acl-util.h" +#include "basic/alloc-util.h" #include "bus-error.h" -#include "bus-util.h" +#include "shared/bus-util.h" #include "catalog.h" -#include "chattr-util.h" -#include "fd-util.h" -#include "fileio.h" -#include "fs-util.h" +#include "basic/chattr-util.h" +#include "basic/fd-util.h" +#include "basic/fileio.h" +#include "basic/fs-util.h" #include "fsprg.h" -#include "glob-util.h" -#include "hostname-util.h" -#include "io-util.h" +#include "basic/glob-util.h" +#include "basic/hostname-util.h" +#include "basic/io-util.h" #include "journal-def.h" #include "journal-internal.h" #include "journal-qrcode.h" #include "journal-vacuum.h" #include "journal-verify.h" -#include "locale-util.h" -#include "log.h" -#include "logs-show.h" -#include "mkdir.h" -#include "pager.h" -#include "parse-util.h" -#include "path-util.h" -#include "rlimit-util.h" -#include "set.h" -#include "sigbus.h" -#include "strv.h" -#include "syslog-util.h" -#include "terminal-util.h" +#include "basic/locale-util.h" +#include "basic/log.h" +#include "shared/logs-show.h" +#include "basic/mkdir.h" +#include "shared/pager.h" +#include "basic/parse-util.h" +#include "basic/path-util.h" +#include "basic/rlimit-util.h" +#include "basic/set.h" +#include "basic/sigbus.h" +#include "basic/strv.h" +#include "basic/syslog-util.h" +#include "basic/terminal-util.h" #include "udev.h" -#include "udev-util.h" -#include "unit-name.h" -#include "user-util.h" +#include "shared/udev-util.h" +#include "basic/unit-name.h" +#include "basic/user-util.h" #define DEFAULT_FSS_INTERVAL_USEC (15*USEC_PER_MINUTE) diff --git a/src/grp-journal/libjournal-core/cat.c b/src/grp-journal/libjournal-core/cat.c index 93ab6e7f96..8ab4febd53 100644 --- a/src/grp-journal/libjournal-core/cat.c +++ b/src/grp-journal/libjournal-core/cat.c @@ -26,11 +26,11 @@ #include <systemd/sd-journal.h> -#include "fd-util.h" -#include "parse-util.h" -#include "string-util.h" -#include "syslog-util.h" -#include "util.h" +#include "basic/fd-util.h" +#include "basic/parse-util.h" +#include "basic/string-util.h" +#include "basic/syslog-util.h" +#include "basic/util.h" static const char *arg_identifier = NULL; static int arg_priority = LOG_INFO; diff --git a/src/grp-journal/libjournal-core/journald-audit.c b/src/grp-journal/libjournal-core/journald-audit.c index a433c91c54..7abd2f819e 100644 --- a/src/grp-journal/libjournal-core/journald-audit.c +++ b/src/grp-journal/libjournal-core/journald-audit.c @@ -17,14 +17,14 @@ along with systemd; If not, see <http://www.gnu.org/licenses/>. ***/ -#include "alloc-util.h" +#include "basic/alloc-util.h" #include "audit-type.h" -#include "fd-util.h" -#include "hexdecoct.h" -#include "io-util.h" +#include "basic/fd-util.h" +#include "basic/hexdecoct.h" +#include "basic/io-util.h" #include "journald-audit.h" -#include "missing.h" -#include "string-util.h" +#include "basic/missing.h" +#include "basic/string-util.h" typedef struct MapField { const char *audit_field; diff --git a/src/grp-journal/libjournal-core/journald-audit.h b/src/grp-journal/libjournal-core/journald-audit.h index 8c7457778c..75a4ceba3a 100644 --- a/src/grp-journal/libjournal-core/journald-audit.h +++ b/src/grp-journal/libjournal-core/journald-audit.h @@ -20,7 +20,7 @@ ***/ #include "journald-server.h" -#include "socket-util.h" +#include "basic/socket-util.h" void server_process_audit_message(Server *s, const void *buffer, size_t buffer_size, const struct ucred *ucred, const union sockaddr_union *sa, socklen_t salen); diff --git a/src/grp-journal/libjournal-core/journald-console.c b/src/grp-journal/libjournal-core/journald-console.c index fcc9f25814..8d8b3045c1 100644 --- a/src/grp-journal/libjournal-core/journald-console.c +++ b/src/grp-journal/libjournal-core/journald-console.c @@ -21,17 +21,17 @@ #include <sys/socket.h> #include <time.h> -#include "alloc-util.h" -#include "fd-util.h" -#include "fileio.h" -#include "formats-util.h" -#include "io-util.h" +#include "basic/alloc-util.h" +#include "basic/fd-util.h" +#include "basic/fileio.h" +#include "basic/formats-util.h" +#include "basic/io-util.h" #include "journald-console.h" #include "journald-server.h" -#include "parse-util.h" -#include "process-util.h" -#include "stdio-util.h" -#include "terminal-util.h" +#include "basic/parse-util.h" +#include "basic/process-util.h" +#include "basic/stdio-util.h" +#include "basic/terminal-util.h" static bool prefix_timestamp(void) { diff --git a/src/grp-journal/libjournal-core/journald-gperf.gperf b/src/grp-journal/libjournal-core/journald-gperf.gperf index 7fecd7a964..f64cd871fe 100644 --- a/src/grp-journal/libjournal-core/journald-gperf.gperf +++ b/src/grp-journal/libjournal-core/journald-gperf.gperf @@ -1,7 +1,7 @@ %{ #include <stddef.h> #include <sys/socket.h> -#include "conf-parser.h" +#include "shared/conf-parser.h" #include "journald-server.h" %} struct ConfigPerfItem; diff --git a/src/grp-journal/libjournal-core/journald-kmsg.c b/src/grp-journal/libjournal-core/journald-kmsg.c index 3712636de2..cac6845590 100644 --- a/src/grp-journal/libjournal-core/journald-kmsg.c +++ b/src/grp-journal/libjournal-core/journald-kmsg.c @@ -26,17 +26,17 @@ #include "libudev.h" #include <systemd/sd-messages.h> -#include "escape.h" -#include "fd-util.h" -#include "formats-util.h" -#include "io-util.h" +#include "basic/escape.h" +#include "basic/fd-util.h" +#include "basic/formats-util.h" +#include "basic/io-util.h" #include "journald-kmsg.h" #include "journald-server.h" #include "journald-syslog.h" -#include "parse-util.h" -#include "process-util.h" -#include "stdio-util.h" -#include "string-util.h" +#include "basic/parse-util.h" +#include "basic/process-util.h" +#include "basic/stdio-util.h" +#include "basic/string-util.h" void server_forward_kmsg( Server *s, diff --git a/src/grp-journal/libjournal-core/journald-native.c b/src/grp-journal/libjournal-core/journald-native.c index 0a1ce205c2..3389d84d9e 100644 --- a/src/grp-journal/libjournal-core/journald-native.c +++ b/src/grp-journal/libjournal-core/journald-native.c @@ -23,22 +23,22 @@ #include <sys/statvfs.h> #include <unistd.h> -#include "alloc-util.h" -#include "fd-util.h" -#include "fs-util.h" -#include "io-util.h" +#include "basic/alloc-util.h" +#include "basic/fd-util.h" +#include "basic/fs-util.h" +#include "basic/io-util.h" #include "journald-console.h" #include "journald-kmsg.h" #include "journald-native.h" #include "journald-server.h" #include "journald-syslog.h" #include "journald-wall.h" -#include "memfd-util.h" -#include "parse-util.h" -#include "path-util.h" -#include "selinux-util.h" -#include "socket-util.h" -#include "string-util.h" +#include "basic/memfd-util.h" +#include "basic/parse-util.h" +#include "basic/path-util.h" +#include "basic/selinux-util.h" +#include "basic/socket-util.h" +#include "basic/string-util.h" bool valid_user_field(const char *p, size_t l, bool allow_protected) { const char *a; diff --git a/src/grp-journal/libjournal-core/journald-rate-limit.c b/src/grp-journal/libjournal-core/journald-rate-limit.c index fce799a6ce..60725c4884 100644 --- a/src/grp-journal/libjournal-core/journald-rate-limit.c +++ b/src/grp-journal/libjournal-core/journald-rate-limit.c @@ -20,13 +20,13 @@ #include <errno.h> #include <string.h> -#include "alloc-util.h" -#include "hashmap.h" +#include "basic/alloc-util.h" +#include "basic/hashmap.h" #include "journald-rate-limit.h" -#include "list.h" -#include "random-util.h" -#include "string-util.h" -#include "util.h" +#include "basic/list.h" +#include "basic/random-util.h" +#include "basic/string-util.h" +#include "basic/util.h" #define POOLS_MAX 5 #define BUCKETS_MAX 127 diff --git a/src/grp-journal/libjournal-core/journald-rate-limit.h b/src/grp-journal/libjournal-core/journald-rate-limit.h index bb0abb7ee9..533dd0f013 100644 --- a/src/grp-journal/libjournal-core/journald-rate-limit.h +++ b/src/grp-journal/libjournal-core/journald-rate-limit.h @@ -19,7 +19,7 @@ along with systemd; If not, see <http://www.gnu.org/licenses/>. ***/ -#include "util.h" +#include "basic/util.h" typedef struct JournalRateLimit JournalRateLimit; diff --git a/src/grp-journal/libjournal-core/journald-server.c b/src/grp-journal/libjournal-core/journald-server.c index cc29443e66..24b873abeb 100644 --- a/src/grp-journal/libjournal-core/journald-server.c +++ b/src/grp-journal/libjournal-core/journald-server.c @@ -31,20 +31,20 @@ #include <systemd/sd-journal.h> #include <systemd/sd-messages.h> -#include "acl-util.h" -#include "alloc-util.h" -#include "audit-util.h" -#include "cgroup-util.h" -#include "conf-parser.h" -#include "dirent-util.h" -#include "extract-word.h" -#include "fd-util.h" -#include "fileio.h" -#include "formats-util.h" -#include "fs-util.h" -#include "hashmap.h" -#include "hostname-util.h" -#include "io-util.h" +#include "shared/acl-util.h" +#include "basic/alloc-util.h" +#include "basic/audit-util.h" +#include "basic/cgroup-util.h" +#include "shared/conf-parser.h" +#include "basic/dirent-util.h" +#include "basic/extract-word.h" +#include "basic/fd-util.h" +#include "basic/fileio.h" +#include "basic/formats-util.h" +#include "basic/fs-util.h" +#include "basic/hashmap.h" +#include "basic/hostname-util.h" +#include "basic/io-util.h" #include "journal-authenticate.h" #include "journal-file.h" #include "journal-internal.h" @@ -56,20 +56,20 @@ #include "journald-server.h" #include "journald-stream.h" #include "journald-syslog.h" -#include "missing.h" -#include "mkdir.h" -#include "parse-util.h" -#include "proc-cmdline.h" -#include "process-util.h" -#include "rm-rf.h" -#include "selinux-util.h" -#include "signal-util.h" -#include "socket-util.h" -#include "stdio-util.h" -#include "string-table.h" -#include "string-util.h" -#include "user-util.h" -#include "log.h" +#include "basic/missing.h" +#include "basic/mkdir.h" +#include "basic/parse-util.h" +#include "basic/proc-cmdline.h" +#include "basic/process-util.h" +#include "basic/rm-rf.h" +#include "basic/selinux-util.h" +#include "basic/signal-util.h" +#include "basic/socket-util.h" +#include "basic/stdio-util.h" +#include "basic/string-table.h" +#include "basic/string-util.h" +#include "basic/user-util.h" +#include "basic/log.h" #define USER_JOURNALS_MAX 1024 diff --git a/src/grp-journal/libjournal-core/journald-server.h b/src/grp-journal/libjournal-core/journald-server.h index bebb056aa7..897ee09ca2 100644 --- a/src/grp-journal/libjournal-core/journald-server.h +++ b/src/grp-journal/libjournal-core/journald-server.h @@ -26,11 +26,11 @@ typedef struct Server Server; -#include "hashmap.h" -#include "journal-file.h" +#include "basic/hashmap.h" +#include "sd-journal/journal-file.h" #include "journald-rate-limit.h" #include "journald-stream.h" -#include "list.h" +#include "basic/list.h" typedef enum Storage { STORAGE_AUTO, diff --git a/src/grp-journal/libjournal-core/journald-stream.c b/src/grp-journal/libjournal-core/journald-stream.c index 99d856301c..4b0062bc9a 100644 --- a/src/grp-journal/libjournal-core/journald-stream.c +++ b/src/grp-journal/libjournal-core/journald-stream.c @@ -27,25 +27,25 @@ #include <systemd/sd-daemon.h> #include <systemd/sd-event.h> -#include "alloc-util.h" -#include "dirent-util.h" -#include "escape.h" -#include "fd-util.h" -#include "fileio.h" -#include "io-util.h" +#include "basic/alloc-util.h" +#include "basic/dirent-util.h" +#include "basic/escape.h" +#include "basic/fd-util.h" +#include "basic/fileio.h" +#include "basic/io-util.h" #include "journald-console.h" #include "journald-kmsg.h" #include "journald-server.h" #include "journald-stream.h" #include "journald-syslog.h" #include "journald-wall.h" -#include "mkdir.h" -#include "parse-util.h" -#include "selinux-util.h" -#include "socket-util.h" -#include "stdio-util.h" -#include "string-util.h" -#include "syslog-util.h" +#include "basic/mkdir.h" +#include "basic/parse-util.h" +#include "basic/selinux-util.h" +#include "basic/socket-util.h" +#include "basic/stdio-util.h" +#include "basic/string-util.h" +#include "basic/syslog-util.h" #define STDOUT_STREAMS_MAX 4096 diff --git a/src/grp-journal/libjournal-core/journald-stream.h b/src/grp-journal/libjournal-core/journald-stream.h index db4c67fae3..fed48c2104 100644 --- a/src/grp-journal/libjournal-core/journald-stream.h +++ b/src/grp-journal/libjournal-core/journald-stream.h @@ -21,7 +21,7 @@ typedef struct StdoutStream StdoutStream; -#include "fdset.h" +#include "basic/fdset.h" #include "journald-server.h" int server_open_stdout_socket(Server *s); diff --git a/src/grp-journal/libjournal-core/journald-syslog.c b/src/grp-journal/libjournal-core/journald-syslog.c index 86fe81d179..5f632eb07b 100644 --- a/src/grp-journal/libjournal-core/journald-syslog.c +++ b/src/grp-journal/libjournal-core/journald-syslog.c @@ -23,21 +23,21 @@ #include <systemd/sd-messages.h> -#include "alloc-util.h" -#include "fd-util.h" -#include "formats-util.h" -#include "io-util.h" +#include "basic/alloc-util.h" +#include "basic/fd-util.h" +#include "basic/formats-util.h" +#include "basic/io-util.h" #include "journald-console.h" #include "journald-kmsg.h" #include "journald-server.h" #include "journald-syslog.h" #include "journald-wall.h" -#include "process-util.h" -#include "selinux-util.h" -#include "socket-util.h" -#include "stdio-util.h" -#include "string-util.h" -#include "syslog-util.h" +#include "basic/process-util.h" +#include "basic/selinux-util.h" +#include "basic/socket-util.h" +#include "basic/stdio-util.h" +#include "basic/string-util.h" +#include "basic/syslog-util.h" /* Warn once every 30s if we missed syslog message */ #define WARN_FORWARD_SYSLOG_MISSED_USEC (30 * USEC_PER_SEC) diff --git a/src/grp-journal/libjournal-core/journald-wall.c b/src/grp-journal/libjournal-core/journald-wall.c index 4d91fafffe..fa3458fd4a 100644 --- a/src/grp-journal/libjournal-core/journald-wall.c +++ b/src/grp-journal/libjournal-core/journald-wall.c @@ -17,13 +17,13 @@ along with systemd; If not, see <http://www.gnu.org/licenses/>. ***/ -#include "alloc-util.h" -#include "formats-util.h" +#include "basic/alloc-util.h" +#include "basic/formats-util.h" #include "journald-server.h" #include "journald-wall.h" -#include "process-util.h" -#include "string-util.h" -#include "utmp-wtmp.h" +#include "basic/process-util.h" +#include "basic/string-util.h" +#include "shared/utmp-wtmp.h" void server_forward_wall( Server *s, diff --git a/src/grp-journal/libjournal-core/test-catalog.c b/src/grp-journal/libjournal-core/test-catalog.c index f939fcdc2a..3a26909136 100644 --- a/src/grp-journal/libjournal-core/test-catalog.c +++ b/src/grp-journal/libjournal-core/test-catalog.c @@ -25,14 +25,14 @@ #include <systemd/sd-messages.h> -#include "alloc-util.h" +#include "basic/alloc-util.h" #include "catalog.h" -#include "fd-util.h" -#include "fileio.h" -#include "log.h" -#include "macro.h" -#include "string-util.h" -#include "util.h" +#include "basic/fd-util.h" +#include "basic/fileio.h" +#include "basic/log.h" +#include "basic/macro.h" +#include "basic/string-util.h" +#include "basic/util.h" static const char *catalog_dirs[] = { CATALOG_DIR, diff --git a/src/grp-journal/libjournal-core/test-compress-benchmark.c b/src/grp-journal/libjournal-core/test-compress-benchmark.c index 6f6d71435d..99d7c7d103 100644 --- a/src/grp-journal/libjournal-core/test-compress-benchmark.c +++ b/src/grp-journal/libjournal-core/test-compress-benchmark.c @@ -17,13 +17,13 @@ along with systemd; If not, see <http://www.gnu.org/licenses/>. ***/ -#include "alloc-util.h" +#include "basic/alloc-util.h" #include "compress.h" -#include "macro.h" -#include "parse-util.h" -#include "random-util.h" -#include "string-util.h" -#include "util.h" +#include "basic/macro.h" +#include "basic/parse-util.h" +#include "basic/random-util.h" +#include "basic/string-util.h" +#include "basic/util.h" typedef int (compress_t)(const void *src, uint64_t src_size, void *dst, size_t dst_alloc_size, size_t *dst_size); diff --git a/src/grp-journal/libjournal-core/test-compress.c b/src/grp-journal/libjournal-core/test-compress.c index 68c9a4d76c..8cd098cabc 100644 --- a/src/grp-journal/libjournal-core/test-compress.c +++ b/src/grp-journal/libjournal-core/test-compress.c @@ -21,13 +21,13 @@ #include <lz4.h> #endif -#include "alloc-util.h" +#include "basic/alloc-util.h" #include "compress.h" -#include "fd-util.h" -#include "fileio.h" -#include "macro.h" -#include "random-util.h" -#include "util.h" +#include "basic/fd-util.h" +#include "basic/fileio.h" +#include "basic/macro.h" +#include "basic/random-util.h" +#include "basic/util.h" #ifdef HAVE_XZ # define XZ_OK 0 diff --git a/src/grp-journal/libjournal-core/test-journal-enum.c b/src/grp-journal/libjournal-core/test-journal-enum.c index 54df59f477..b960c5d8cd 100644 --- a/src/grp-journal/libjournal-core/test-journal-enum.c +++ b/src/grp-journal/libjournal-core/test-journal-enum.c @@ -22,8 +22,8 @@ #include <systemd/sd-journal.h> #include "journal-internal.h" -#include "log.h" -#include "macro.h" +#include "basic/log.h" +#include "basic/macro.h" int main(int argc, char *argv[]) { unsigned n = 0; diff --git a/src/grp-journal/libjournal-core/test-journal-flush.c b/src/grp-journal/libjournal-core/test-journal-flush.c index 7e9814f8fa..6364a395b8 100644 --- a/src/grp-journal/libjournal-core/test-journal-flush.c +++ b/src/grp-journal/libjournal-core/test-journal-flush.c @@ -21,11 +21,11 @@ #include <systemd/sd-journal.h> -#include "alloc-util.h" +#include "basic/alloc-util.h" #include "journal-file.h" #include "journal-internal.h" -#include "macro.h" -#include "string-util.h" +#include "basic/macro.h" +#include "basic/string-util.h" int main(int argc, char *argv[]) { _cleanup_free_ char *fn = NULL; diff --git a/src/grp-journal/libjournal-core/test-journal-init.c b/src/grp-journal/libjournal-core/test-journal-init.c index e6713034dd..c5f1d345e9 100644 --- a/src/grp-journal/libjournal-core/test-journal-init.c +++ b/src/grp-journal/libjournal-core/test-journal-init.c @@ -19,10 +19,10 @@ #include <systemd/sd-journal.h> -#include "log.h" -#include "parse-util.h" -#include "rm-rf.h" -#include "util.h" +#include "basic/log.h" +#include "basic/parse-util.h" +#include "basic/rm-rf.h" +#include "basic/util.h" int main(int argc, char *argv[]) { sd_journal *j; diff --git a/src/grp-journal/libjournal-core/test-journal-interleaving.c b/src/grp-journal/libjournal-core/test-journal-interleaving.c index d09ef011a6..753c92cdbc 100644 --- a/src/grp-journal/libjournal-core/test-journal-interleaving.c +++ b/src/grp-journal/libjournal-core/test-journal-interleaving.c @@ -23,13 +23,13 @@ #include <systemd/sd-journal.h> -#include "alloc-util.h" +#include "basic/alloc-util.h" #include "journal-file.h" #include "journal-vacuum.h" -#include "log.h" -#include "parse-util.h" -#include "rm-rf.h" -#include "util.h" +#include "basic/log.h" +#include "basic/parse-util.h" +#include "basic/rm-rf.h" +#include "basic/util.h" /* This program tests skipping around in a multi-file journal. */ diff --git a/src/grp-journal/libjournal-core/test-journal-match.c b/src/grp-journal/libjournal-core/test-journal-match.c index 5ee2adb827..42043b229f 100644 --- a/src/grp-journal/libjournal-core/test-journal-match.c +++ b/src/grp-journal/libjournal-core/test-journal-match.c @@ -21,11 +21,11 @@ #include <systemd/sd-journal.h> -#include "alloc-util.h" +#include "basic/alloc-util.h" #include "journal-internal.h" -#include "log.h" -#include "string-util.h" -#include "util.h" +#include "basic/log.h" +#include "basic/string-util.h" +#include "basic/util.h" int main(int argc, char *argv[]) { _cleanup_(sd_journal_closep) sd_journal*j = NULL; diff --git a/src/grp-journal/libjournal-core/test-journal-send.c b/src/grp-journal/libjournal-core/test-journal-send.c index 169082f9a4..192e12c887 100644 --- a/src/grp-journal/libjournal-core/test-journal-send.c +++ b/src/grp-journal/libjournal-core/test-journal-send.c @@ -23,7 +23,7 @@ #include <systemd/sd-journal.h> -#include "macro.h" +#include "basic/macro.h" int main(int argc, char *argv[]) { char huge[4096*1024]; diff --git a/src/grp-journal/libjournal-core/test-journal-stream.c b/src/grp-journal/libjournal-core/test-journal-stream.c index 0a1da47861..e5a4a02087 100644 --- a/src/grp-journal/libjournal-core/test-journal-stream.c +++ b/src/grp-journal/libjournal-core/test-journal-stream.c @@ -22,14 +22,14 @@ #include <systemd/sd-journal.h> -#include "alloc-util.h" +#include "basic/alloc-util.h" #include "journal-file.h" #include "journal-internal.h" -#include "log.h" -#include "macro.h" -#include "parse-util.h" -#include "rm-rf.h" -#include "util.h" +#include "basic/log.h" +#include "basic/macro.h" +#include "basic/parse-util.h" +#include "basic/rm-rf.h" +#include "basic/util.h" #define N_ENTRIES 200 diff --git a/src/grp-journal/libjournal-core/test-journal-syslog.c b/src/grp-journal/libjournal-core/test-journal-syslog.c index 4ff7f3ec2e..91bc0ec99e 100644 --- a/src/grp-journal/libjournal-core/test-journal-syslog.c +++ b/src/grp-journal/libjournal-core/test-journal-syslog.c @@ -17,10 +17,10 @@ along with systemd; If not, see <http://www.gnu.org/licenses/>. ***/ -#include "alloc-util.h" +#include "basic/alloc-util.h" #include "journald-syslog.h" -#include "macro.h" -#include "string-util.h" +#include "basic/macro.h" +#include "basic/string-util.h" static void test_syslog_parse_identifier(const char* str, const char *ident, const char*pid, int ret) { diff --git a/src/grp-journal/libjournal-core/test-journal-verify.c b/src/grp-journal/libjournal-core/test-journal-verify.c index 3d2312fc55..7a253c2b85 100644 --- a/src/grp-journal/libjournal-core/test-journal-verify.c +++ b/src/grp-journal/libjournal-core/test-journal-verify.c @@ -21,13 +21,13 @@ #include <stdio.h> #include <unistd.h> -#include "fd-util.h" +#include "basic/fd-util.h" #include "journal-file.h" #include "journal-verify.h" -#include "log.h" -#include "rm-rf.h" -#include "terminal-util.h" -#include "util.h" +#include "basic/log.h" +#include "basic/rm-rf.h" +#include "basic/terminal-util.h" +#include "basic/util.h" #define N_ENTRIES 6000 #define RANDOM_RANGE 77 diff --git a/src/grp-journal/libjournal-core/test-journal.c b/src/grp-journal/libjournal-core/test-journal.c index 2543d64b5b..a8ee802220 100644 --- a/src/grp-journal/libjournal-core/test-journal.c +++ b/src/grp-journal/libjournal-core/test-journal.c @@ -23,8 +23,8 @@ #include "journal-authenticate.h" #include "journal-file.h" #include "journal-vacuum.h" -#include "log.h" -#include "rm-rf.h" +#include "basic/log.h" +#include "basic/rm-rf.h" static bool arg_keep = false; diff --git a/src/grp-journal/libjournal-core/test-mmap-cache.c b/src/grp-journal/libjournal-core/test-mmap-cache.c index 009aabf55e..7b7c67cca4 100644 --- a/src/grp-journal/libjournal-core/test-mmap-cache.c +++ b/src/grp-journal/libjournal-core/test-mmap-cache.c @@ -22,11 +22,11 @@ #include <sys/mman.h> #include <unistd.h> -#include "fd-util.h" -#include "fileio.h" -#include "macro.h" +#include "basic/fd-util.h" +#include "basic/fileio.h" +#include "basic/macro.h" #include "mmap-cache.h" -#include "util.h" +#include "basic/util.h" int main(int argc, char *argv[]) { int x, y, z, r; diff --git a/src/grp-journal/systemd-journald/journald.c b/src/grp-journal/systemd-journald/journald.c index 1afe44fa8e..9b4a5d3735 100644 --- a/src/grp-journal/systemd-journald/journald.c +++ b/src/grp-journal/systemd-journald/journald.c @@ -22,12 +22,12 @@ #include <systemd/sd-daemon.h> #include <systemd/sd-messages.h> -#include "formats-util.h" +#include "basic/formats-util.h" #include "journal-authenticate.h" #include "journald-kmsg.h" #include "journald-server.h" #include "journald-syslog.h" -#include "sigbus.h" +#include "basic/sigbus.h" int main(int argc, char *argv[]) { Server server; diff --git a/src/grp-locale/localectl.c b/src/grp-locale/localectl.c index c1b0a56346..a159f8ed2e 100644 --- a/src/grp-locale/localectl.c +++ b/src/grp-locale/localectl.c @@ -28,17 +28,17 @@ #include <systemd/sd-bus.h> #include "bus-error.h" -#include "bus-util.h" -#include "def.h" -#include "fd-util.h" -#include "fileio.h" -#include "locale-util.h" -#include "pager.h" -#include "set.h" -#include "spawn-polkit-agent.h" -#include "strv.h" -#include "util.h" -#include "virt.h" +#include "shared/bus-util.h" +#include "basic/def.h" +#include "basic/fd-util.h" +#include "basic/fileio.h" +#include "basic/locale-util.h" +#include "shared/pager.h" +#include "basic/set.h" +#include "shared/spawn-polkit-agent.h" +#include "basic/strv.h" +#include "basic/util.h" +#include "basic/virt.h" static bool arg_no_pager = false; static bool arg_ask_password = true; diff --git a/src/grp-locale/localed.c b/src/grp-locale/localed.c index 7b4cbadfd0..513413e2b5 100644 --- a/src/grp-locale/localed.c +++ b/src/grp-locale/localed.c @@ -29,22 +29,22 @@ #include <systemd/sd-bus.h> -#include "alloc-util.h" +#include "basic/alloc-util.h" #include "bus-error.h" #include "bus-message.h" -#include "bus-util.h" -#include "def.h" -#include "env-util.h" -#include "fd-util.h" -#include "fileio-label.h" -#include "fileio.h" -#include "locale-util.h" -#include "mkdir.h" -#include "path-util.h" -#include "selinux-util.h" -#include "strv.h" -#include "user-util.h" -#include "util.h" +#include "shared/bus-util.h" +#include "basic/def.h" +#include "basic/env-util.h" +#include "basic/fd-util.h" +#include "basic/fileio-label.h" +#include "basic/fileio.h" +#include "basic/locale-util.h" +#include "basic/mkdir.h" +#include "basic/path-util.h" +#include "basic/selinux-util.h" +#include "basic/strv.h" +#include "basic/user-util.h" +#include "basic/util.h" enum { /* We don't list LC_ALL here on purpose. People should be diff --git a/src/grp-login/liblogind-core/logind-acl.c b/src/grp-login/liblogind-core/logind-acl.c index 0cef88a82d..9f6199e6eb 100644 --- a/src/grp-login/liblogind-core/logind-acl.c +++ b/src/grp-login/liblogind-core/logind-acl.c @@ -20,17 +20,17 @@ #include <errno.h> #include <string.h> -#include "acl-util.h" -#include "alloc-util.h" -#include "dirent-util.h" -#include "escape.h" -#include "fd-util.h" -#include "formats-util.h" +#include "shared/acl-util.h" +#include "basic/alloc-util.h" +#include "basic/dirent-util.h" +#include "basic/escape.h" +#include "basic/fd-util.h" +#include "basic/formats-util.h" #include "logind-acl.h" -#include "set.h" -#include "string-util.h" -#include "udev-util.h" -#include "util.h" +#include "basic/set.h" +#include "basic/string-util.h" +#include "shared/udev-util.h" +#include "basic/util.h" static int flush_acl(acl_t acl) { acl_entry_t i; diff --git a/src/grp-login/liblogind-core/logind-action.c b/src/grp-login/liblogind-core/logind-action.c index 9a8089f97c..6976377c0a 100644 --- a/src/grp-login/liblogind-core/logind-action.c +++ b/src/grp-login/liblogind-core/logind-action.c @@ -19,18 +19,18 @@ #include <unistd.h> -#include "alloc-util.h" +#include "basic/alloc-util.h" #include "bus-error.h" -#include "bus-util.h" -#include "conf-parser.h" -#include "formats-util.h" +#include "shared/bus-util.h" +#include "shared/conf-parser.h" +#include "basic/formats-util.h" #include "logind-action.h" -#include "process-util.h" -#include "sleep-config.h" -#include "special.h" -#include "string-table.h" -#include "terminal-util.h" -#include "user-util.h" +#include "basic/process-util.h" +#include "shared/sleep-config.h" +#include "basic/special.h" +#include "basic/string-table.h" +#include "basic/terminal-util.h" +#include "basic/user-util.h" int manager_handle_action( Manager *m, diff --git a/src/grp-login/liblogind-core/logind-button.c b/src/grp-login/liblogind-core/logind-button.c index acf7504a2e..d791578cd7 100644 --- a/src/grp-login/liblogind-core/logind-button.c +++ b/src/grp-login/liblogind-core/logind-button.c @@ -26,11 +26,11 @@ #include <systemd/sd-messages.h> -#include "alloc-util.h" -#include "fd-util.h" +#include "basic/alloc-util.h" +#include "basic/fd-util.h" #include "logind-button.h" -#include "string-util.h" -#include "util.h" +#include "basic/string-util.h" +#include "basic/util.h" Button* button_new(Manager *m, const char *name) { Button *b; diff --git a/src/grp-login/liblogind-core/logind-core.c b/src/grp-login/liblogind-core/logind-core.c index cbf8d757fe..e47677ffda 100644 --- a/src/grp-login/liblogind-core/logind-core.c +++ b/src/grp-login/liblogind-core/logind-core.c @@ -23,16 +23,16 @@ #include <sys/types.h> #include <linux/vt.h> -#include "alloc-util.h" +#include "basic/alloc-util.h" #include "bus-error.h" -#include "bus-util.h" -#include "cgroup-util.h" -#include "fd-util.h" +#include "shared/bus-util.h" +#include "basic/cgroup-util.h" +#include "basic/fd-util.h" #include "logind.h" -#include "strv.h" -#include "terminal-util.h" -#include "udev-util.h" -#include "user-util.h" +#include "basic/strv.h" +#include "basic/terminal-util.h" +#include "shared/udev-util.h" +#include "basic/user-util.h" int manager_add_device(Manager *m, const char *sysfs, bool master, Device **_device) { Device *d; diff --git a/src/grp-login/liblogind-core/logind-dbus.c b/src/grp-login/liblogind-core/logind-dbus.c index 90dcd94710..bc705e1754 100644 --- a/src/grp-login/liblogind-core/logind-dbus.c +++ b/src/grp-login/liblogind-core/logind-dbus.c @@ -24,31 +24,31 @@ #include <systemd/sd-messages.h> -#include "alloc-util.h" -#include "audit-util.h" +#include "basic/alloc-util.h" +#include "basic/audit-util.h" #include "bus-common-errors.h" #include "bus-error.h" -#include "bus-util.h" -#include "dirent-util.h" -#include "efivars.h" -#include "escape.h" -#include "fd-util.h" -#include "fileio-label.h" -#include "formats-util.h" -#include "fs-util.h" +#include "shared/bus-util.h" +#include "basic/dirent-util.h" +#include "shared/efivars.h" +#include "basic/escape.h" +#include "basic/fd-util.h" +#include "basic/fileio-label.h" +#include "basic/formats-util.h" +#include "basic/fs-util.h" #include "logind.h" -#include "mkdir.h" -#include "path-util.h" -#include "process-util.h" -#include "selinux-util.h" -#include "sleep-config.h" -#include "special.h" -#include "strv.h" -#include "terminal-util.h" -#include "udev-util.h" -#include "unit-name.h" -#include "user-util.h" -#include "utmp-wtmp.h" +#include "basic/mkdir.h" +#include "basic/path-util.h" +#include "basic/process-util.h" +#include "basic/selinux-util.h" +#include "shared/sleep-config.h" +#include "basic/special.h" +#include "basic/strv.h" +#include "basic/terminal-util.h" +#include "shared/udev-util.h" +#include "basic/unit-name.h" +#include "basic/user-util.h" +#include "shared/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_(sd_bus_creds_unrefp) sd_bus_creds *creds = NULL; diff --git a/src/grp-login/liblogind-core/logind-device.c b/src/grp-login/liblogind-core/logind-device.c index eb5edd1cd5..db6a8d93d1 100644 --- a/src/grp-login/liblogind-core/logind-device.c +++ b/src/grp-login/liblogind-core/logind-device.c @@ -19,9 +19,9 @@ #include <string.h> -#include "alloc-util.h" +#include "basic/alloc-util.h" #include "logind-device.h" -#include "util.h" +#include "basic/util.h" Device* device_new(Manager *m, const char *sysfs, bool master) { Device *d; diff --git a/src/grp-login/liblogind-core/logind-device.h b/src/grp-login/liblogind-core/logind-device.h index 927068e00a..96c012bdd9 100644 --- a/src/grp-login/liblogind-core/logind-device.h +++ b/src/grp-login/liblogind-core/logind-device.h @@ -21,7 +21,7 @@ typedef struct Device Device; -#include "list.h" +#include "basic/list.h" #include "logind-seat.h" #include "logind-session-device.h" diff --git a/src/grp-login/liblogind-core/logind-gperf.gperf b/src/grp-login/liblogind-core/logind-gperf.gperf index 6bd08adc05..6d5c484439 100644 --- a/src/grp-login/liblogind-core/logind-gperf.gperf +++ b/src/grp-login/liblogind-core/logind-gperf.gperf @@ -1,6 +1,6 @@ %{ #include <stddef.h> -#include "conf-parser.h" +#include "shared/conf-parser.h" #include "logind.h" %} struct ConfigPerfItem; diff --git a/src/grp-login/liblogind-core/logind-inhibit.c b/src/grp-login/liblogind-core/logind-inhibit.c index 6c78e0dddc..f95582f9db 100644 --- a/src/grp-login/liblogind-core/logind-inhibit.c +++ b/src/grp-login/liblogind-core/logind-inhibit.c @@ -22,18 +22,18 @@ #include <string.h> #include <unistd.h> -#include "alloc-util.h" -#include "escape.h" -#include "fd-util.h" -#include "fileio.h" -#include "formats-util.h" +#include "basic/alloc-util.h" +#include "basic/escape.h" +#include "basic/fd-util.h" +#include "basic/fileio.h" +#include "basic/formats-util.h" #include "logind-inhibit.h" -#include "mkdir.h" -#include "parse-util.h" -#include "string-table.h" -#include "string-util.h" -#include "user-util.h" -#include "util.h" +#include "basic/mkdir.h" +#include "basic/parse-util.h" +#include "basic/string-table.h" +#include "basic/string-util.h" +#include "basic/user-util.h" +#include "basic/util.h" Inhibitor* inhibitor_new(Manager *m, const char* id) { Inhibitor *i; diff --git a/src/grp-login/liblogind-core/logind-seat-dbus.c b/src/grp-login/liblogind-core/logind-seat-dbus.c index f934a5326a..bd9c4d1c06 100644 --- a/src/grp-login/liblogind-core/logind-seat-dbus.c +++ b/src/grp-login/liblogind-core/logind-seat-dbus.c @@ -20,15 +20,15 @@ #include <errno.h> #include <string.h> -#include "alloc-util.h" +#include "basic/alloc-util.h" #include "bus-common-errors.h" -#include "bus-label.h" -#include "bus-util.h" +#include "basic/bus-label.h" +#include "shared/bus-util.h" #include "logind-seat.h" #include "logind.h" -#include "strv.h" -#include "user-util.h" -#include "util.h" +#include "basic/strv.h" +#include "basic/user-util.h" +#include "basic/util.h" static int property_get_active_session( sd_bus *bus, diff --git a/src/grp-login/liblogind-core/logind-seat.c b/src/grp-login/liblogind-core/logind-seat.c index aec67718a1..da68288dbd 100644 --- a/src/grp-login/liblogind-core/logind-seat.c +++ b/src/grp-login/liblogind-core/logind-seat.c @@ -24,18 +24,18 @@ #include <systemd/sd-messages.h> -#include "alloc-util.h" -#include "fd-util.h" -#include "fileio.h" -#include "formats-util.h" +#include "basic/alloc-util.h" +#include "basic/fd-util.h" +#include "basic/fileio.h" +#include "basic/formats-util.h" #include "logind-acl.h" #include "logind-seat.h" -#include "mkdir.h" -#include "parse-util.h" -#include "stdio-util.h" -#include "string-util.h" -#include "terminal-util.h" -#include "util.h" +#include "basic/mkdir.h" +#include "basic/parse-util.h" +#include "basic/stdio-util.h" +#include "basic/string-util.h" +#include "basic/terminal-util.h" +#include "basic/util.h" Seat *seat_new(Manager *m, const char *id) { Seat *s; diff --git a/src/grp-login/liblogind-core/logind-seat.h b/src/grp-login/liblogind-core/logind-seat.h index 9a4fbc5bc5..9201e0ea1f 100644 --- a/src/grp-login/liblogind-core/logind-seat.h +++ b/src/grp-login/liblogind-core/logind-seat.h @@ -21,7 +21,7 @@ typedef struct Seat Seat; -#include "list.h" +#include "basic/list.h" #include "logind-session.h" struct Seat { diff --git a/src/grp-login/liblogind-core/logind-session-dbus.c b/src/grp-login/liblogind-core/logind-session-dbus.c index 22dea5db1f..483bf0de52 100644 --- a/src/grp-login/liblogind-core/logind-session-dbus.c +++ b/src/grp-login/liblogind-core/logind-session-dbus.c @@ -20,17 +20,17 @@ #include <errno.h> #include <string.h> -#include "alloc-util.h" +#include "basic/alloc-util.h" #include "bus-common-errors.h" -#include "bus-label.h" -#include "bus-util.h" -#include "fd-util.h" +#include "basic/bus-label.h" +#include "shared/bus-util.h" +#include "basic/fd-util.h" #include "logind-session-device.h" #include "logind-session.h" #include "logind.h" -#include "signal-util.h" -#include "strv.h" -#include "util.h" +#include "basic/signal-util.h" +#include "basic/strv.h" +#include "basic/util.h" static int property_get_user( sd_bus *bus, diff --git a/src/grp-login/liblogind-core/logind-session-device.c b/src/grp-login/liblogind-core/logind-session-device.c index 4055a23277..517a2fcb8e 100644 --- a/src/grp-login/liblogind-core/logind-session-device.c +++ b/src/grp-login/liblogind-core/logind-session-device.c @@ -25,12 +25,12 @@ #include "libudev.h" -#include "alloc-util.h" -#include "bus-util.h" -#include "fd-util.h" +#include "basic/alloc-util.h" +#include "shared/bus-util.h" +#include "basic/fd-util.h" #include "logind-session-device.h" -#include "missing.h" -#include "util.h" +#include "basic/missing.h" +#include "basic/util.h" enum SessionDeviceNotifications { SESSION_DEVICE_RESUME, diff --git a/src/grp-login/liblogind-core/logind-session-device.h b/src/grp-login/liblogind-core/logind-session-device.h index 7c8503583f..152bf75d7a 100644 --- a/src/grp-login/liblogind-core/logind-session-device.h +++ b/src/grp-login/liblogind-core/logind-session-device.h @@ -22,7 +22,7 @@ typedef enum DeviceType DeviceType; typedef struct SessionDevice SessionDevice; -#include "list.h" +#include "basic/list.h" #include "logind.h" enum DeviceType { diff --git a/src/grp-login/liblogind-core/logind-session.c b/src/grp-login/liblogind-core/logind-session.c index 11a83106b1..b38e47e7e9 100644 --- a/src/grp-login/liblogind-core/logind-session.c +++ b/src/grp-login/liblogind-core/logind-session.c @@ -28,23 +28,23 @@ #include <systemd/sd-messages.h> -#include "alloc-util.h" -#include "audit-util.h" +#include "basic/alloc-util.h" +#include "basic/audit-util.h" #include "bus-error.h" -#include "bus-util.h" -#include "escape.h" -#include "fd-util.h" -#include "fileio.h" -#include "formats-util.h" -#include "io-util.h" +#include "shared/bus-util.h" +#include "basic/escape.h" +#include "basic/fd-util.h" +#include "basic/fileio.h" +#include "basic/formats-util.h" +#include "basic/io-util.h" #include "logind-session.h" -#include "mkdir.h" -#include "parse-util.h" -#include "path-util.h" -#include "string-table.h" -#include "terminal-util.h" -#include "user-util.h" -#include "util.h" +#include "basic/mkdir.h" +#include "basic/parse-util.h" +#include "basic/path-util.h" +#include "basic/string-table.h" +#include "basic/terminal-util.h" +#include "basic/user-util.h" +#include "basic/util.h" #define RELEASE_USEC (20*USEC_PER_SEC) diff --git a/src/grp-login/liblogind-core/logind-session.h b/src/grp-login/liblogind-core/logind-session.h index ffb7cd2d41..17da11e70c 100644 --- a/src/grp-login/liblogind-core/logind-session.h +++ b/src/grp-login/liblogind-core/logind-session.h @@ -22,8 +22,8 @@ typedef struct Session Session; typedef enum KillWho KillWho; -#include "list.h" -#include "login-util.h" +#include "basic/list.h" +#include "basic/login-util.h" #include "logind-user.h" typedef enum SessionState { diff --git a/src/grp-login/liblogind-core/logind-user-dbus.c b/src/grp-login/liblogind-core/logind-user-dbus.c index af6392e025..b09ecf05b4 100644 --- a/src/grp-login/liblogind-core/logind-user-dbus.c +++ b/src/grp-login/liblogind-core/logind-user-dbus.c @@ -20,14 +20,14 @@ #include <errno.h> #include <string.h> -#include "alloc-util.h" -#include "bus-util.h" -#include "formats-util.h" +#include "basic/alloc-util.h" +#include "shared/bus-util.h" +#include "basic/formats-util.h" #include "logind-user.h" #include "logind.h" -#include "signal-util.h" -#include "strv.h" -#include "user-util.h" +#include "basic/signal-util.h" +#include "basic/strv.h" +#include "basic/user-util.h" static int property_get_display( sd_bus *bus, diff --git a/src/grp-login/liblogind-core/logind-user.c b/src/grp-login/liblogind-core/logind-user.c index a826321bf0..4d7d8b1133 100644 --- a/src/grp-login/liblogind-core/logind-user.c +++ b/src/grp-login/liblogind-core/logind-user.c @@ -22,32 +22,32 @@ #include <sys/mount.h> #include <unistd.h> -#include "alloc-util.h" +#include "basic/alloc-util.h" #include "bus-common-errors.h" #include "bus-error.h" -#include "bus-util.h" -#include "clean-ipc.h" -#include "conf-parser.h" -#include "escape.h" -#include "fd-util.h" -#include "fileio.h" -#include "formats-util.h" -#include "fs-util.h" -#include "hashmap.h" -#include "label.h" +#include "shared/bus-util.h" +#include "shared/clean-ipc.h" +#include "shared/conf-parser.h" +#include "basic/escape.h" +#include "basic/fd-util.h" +#include "basic/fileio.h" +#include "basic/formats-util.h" +#include "basic/fs-util.h" +#include "basic/hashmap.h" +#include "basic/label.h" #include "logind-user.h" -#include "mkdir.h" -#include "mount-util.h" -#include "parse-util.h" -#include "path-util.h" -#include "rm-rf.h" -#include "smack-util.h" -#include "special.h" -#include "stdio-util.h" -#include "string-table.h" -#include "unit-name.h" -#include "user-util.h" -#include "util.h" +#include "basic/mkdir.h" +#include "basic/mount-util.h" +#include "basic/parse-util.h" +#include "basic/path-util.h" +#include "basic/rm-rf.h" +#include "basic/smack-util.h" +#include "basic/special.h" +#include "basic/stdio-util.h" +#include "basic/string-table.h" +#include "basic/unit-name.h" +#include "basic/user-util.h" +#include "basic/util.h" int user_new(User **out, Manager *m, uid_t uid, gid_t gid, const char *name) { _cleanup_(user_freep) User *u = NULL; diff --git a/src/grp-login/liblogind-core/logind-user.h b/src/grp-login/liblogind-core/logind-user.h index 4f0966dc77..227976f036 100644 --- a/src/grp-login/liblogind-core/logind-user.h +++ b/src/grp-login/liblogind-core/logind-user.h @@ -21,7 +21,7 @@ typedef struct User User; -#include "list.h" +#include "basic/list.h" #include "logind.h" typedef enum UserState { diff --git a/src/grp-login/liblogind-core/logind-utmp.c b/src/grp-login/liblogind-core/logind-utmp.c index 47599fd466..04ade6684b 100644 --- a/src/grp-login/liblogind-core/logind-utmp.c +++ b/src/grp-login/liblogind-core/logind-utmp.c @@ -24,18 +24,18 @@ #include <systemd/sd-messages.h> -#include "alloc-util.h" -#include "audit-util.h" +#include "basic/alloc-util.h" +#include "basic/audit-util.h" #include "bus-common-errors.h" #include "bus-error.h" -#include "bus-util.h" -#include "formats-util.h" +#include "shared/bus-util.h" +#include "basic/formats-util.h" #include "logind.h" -#include "special.h" -#include "strv.h" -#include "unit-name.h" -#include "user-util.h" -#include "utmp-wtmp.h" +#include "basic/special.h" +#include "basic/strv.h" +#include "basic/unit-name.h" +#include "basic/user-util.h" +#include "shared/utmp-wtmp.h" _const_ static usec_t when_wall(usec_t n, usec_t elapse) { diff --git a/src/grp-login/loginctl/loginctl.c b/src/grp-login/loginctl/loginctl.c index f3f57b4b13..af747d2344 100644 --- a/src/grp-login/loginctl/loginctl.c +++ b/src/grp-login/loginctl/loginctl.c @@ -25,27 +25,27 @@ #include <systemd/sd-bus.h> -#include "alloc-util.h" +#include "basic/alloc-util.h" #include "bus-error.h" -#include "bus-unit-util.h" -#include "bus-util.h" -#include "cgroup-show.h" -#include "cgroup-util.h" -#include "log.h" -#include "logs-show.h" -#include "macro.h" -#include "pager.h" -#include "parse-util.h" -#include "process-util.h" -#include "signal-util.h" -#include "spawn-polkit-agent.h" -#include "strv.h" +#include "shared/bus-unit-util.h" +#include "shared/bus-util.h" +#include "shared/cgroup-show.h" +#include "basic/cgroup-util.h" +#include "basic/log.h" +#include "shared/logs-show.h" +#include "basic/macro.h" +#include "shared/pager.h" +#include "basic/parse-util.h" +#include "basic/process-util.h" +#include "basic/signal-util.h" +#include "shared/spawn-polkit-agent.h" +#include "basic/strv.h" #include "sysfs-show.h" -#include "terminal-util.h" -#include "unit-name.h" -#include "user-util.h" -#include "util.h" -#include "verbs.h" +#include "basic/terminal-util.h" +#include "basic/unit-name.h" +#include "basic/user-util.h" +#include "basic/util.h" +#include "basic/verbs.h" static char **arg_property = NULL; static bool arg_all = false; diff --git a/src/grp-login/loginctl/sysfs-show.c b/src/grp-login/loginctl/sysfs-show.c index 29785e2f11..c56c919168 100644 --- a/src/grp-login/loginctl/sysfs-show.c +++ b/src/grp-login/loginctl/sysfs-show.c @@ -22,14 +22,14 @@ #include "libudev.h" -#include "alloc-util.h" -#include "locale-util.h" -#include "path-util.h" -#include "string-util.h" +#include "basic/alloc-util.h" +#include "basic/locale-util.h" +#include "basic/path-util.h" +#include "basic/string-util.h" #include "sysfs-show.h" -#include "terminal-util.h" -#include "udev-util.h" -#include "util.h" +#include "basic/terminal-util.h" +#include "shared/udev-util.h" +#include "basic/util.h" static int show_sysfs_one( struct udev *udev, diff --git a/src/grp-login/pam_systemd/pam_systemd.c b/src/grp-login/pam_systemd/pam_systemd.c index 98dc201340..b50fa50697 100644 --- a/src/grp-login/pam_systemd/pam_systemd.c +++ b/src/grp-login/pam_systemd/pam_systemd.c @@ -28,23 +28,23 @@ #include <security/pam_modutil.h> #include <sys/file.h> -#include "alloc-util.h" -#include "audit-util.h" +#include "basic/alloc-util.h" +#include "basic/audit-util.h" #include "bus-common-errors.h" #include "bus-error.h" -#include "bus-util.h" -#include "def.h" -#include "fd-util.h" -#include "fileio.h" -#include "formats-util.h" -#include "hostname-util.h" -#include "login-util.h" -#include "macro.h" -#include "parse-util.h" -#include "socket-util.h" -#include "strv.h" -#include "terminal-util.h" -#include "util.h" +#include "shared/bus-util.h" +#include "basic/def.h" +#include "basic/fd-util.h" +#include "basic/fileio.h" +#include "basic/formats-util.h" +#include "basic/hostname-util.h" +#include "basic/login-util.h" +#include "basic/macro.h" +#include "basic/parse-util.h" +#include "basic/socket-util.h" +#include "basic/strv.h" +#include "basic/terminal-util.h" +#include "basic/util.h" static int parse_argv( pam_handle_t *handle, diff --git a/src/grp-login/systemd-inhibit/inhibit.c b/src/grp-login/systemd-inhibit/inhibit.c index 905e757a32..89f116f1b5 100644 --- a/src/grp-login/systemd-inhibit/inhibit.c +++ b/src/grp-login/systemd-inhibit/inhibit.c @@ -25,16 +25,16 @@ #include <systemd/sd-bus.h> -#include "alloc-util.h" +#include "basic/alloc-util.h" #include "bus-error.h" -#include "bus-util.h" -#include "fd-util.h" -#include "formats-util.h" -#include "process-util.h" -#include "signal-util.h" -#include "strv.h" -#include "user-util.h" -#include "util.h" +#include "shared/bus-util.h" +#include "basic/fd-util.h" +#include "basic/formats-util.h" +#include "basic/process-util.h" +#include "basic/signal-util.h" +#include "basic/strv.h" +#include "basic/user-util.h" +#include "basic/util.h" static const char* arg_what = "idle:sleep:shutdown"; static const char* arg_who = NULL; diff --git a/src/grp-login/systemd-logind/logind.c b/src/grp-login/systemd-logind/logind.c index 925c04a344..8031d04a8f 100644 --- a/src/grp-login/systemd-logind/logind.c +++ b/src/grp-login/systemd-logind/logind.c @@ -25,19 +25,19 @@ #include "libudev.h" #include <systemd/sd-daemon.h> -#include "alloc-util.h" +#include "basic/alloc-util.h" #include "bus-error.h" -#include "bus-util.h" -#include "conf-parser.h" -#include "def.h" -#include "dirent-util.h" -#include "fd-util.h" -#include "formats-util.h" +#include "shared/bus-util.h" +#include "shared/conf-parser.h" +#include "basic/def.h" +#include "basic/dirent-util.h" +#include "basic/fd-util.h" +#include "basic/formats-util.h" #include "logind.h" -#include "selinux-util.h" -#include "signal-util.h" -#include "strv.h" -#include "udev-util.h" +#include "basic/selinux-util.h" +#include "basic/signal-util.h" +#include "basic/strv.h" +#include "shared/udev-util.h" static void manager_free(Manager *m); diff --git a/src/grp-login/systemd-logind/logind.h b/src/grp-login/systemd-logind/logind.h index 9d43c2e7ee..ab6d917678 100644 --- a/src/grp-login/systemd-logind/logind.h +++ b/src/grp-login/systemd-logind/logind.h @@ -25,9 +25,9 @@ #include <systemd/sd-bus.h> #include <systemd/sd-event.h> -#include "hashmap.h" -#include "list.h" -#include "set.h" +#include "basic/hashmap.h" +#include "basic/list.h" +#include "basic/set.h" typedef struct Manager Manager; diff --git a/src/grp-login/test-inhibit.c b/src/grp-login/test-inhibit.c index be7145b4bc..b186b36ce1 100644 --- a/src/grp-login/test-inhibit.c +++ b/src/grp-login/test-inhibit.c @@ -21,10 +21,10 @@ #include <systemd/sd-bus.h> -#include "bus-util.h" -#include "fd-util.h" -#include "macro.h" -#include "util.h" +#include "shared/bus-util.h" +#include "basic/fd-util.h" +#include "basic/macro.h" +#include "basic/util.h" static int inhibit(sd_bus *bus, const char *what) { _cleanup_(sd_bus_message_unrefp) sd_bus_message *reply = NULL; diff --git a/src/grp-login/test-login-shared.c b/src/grp-login/test-login-shared.c index 3d233f017c..5a9329f7ee 100644 --- a/src/grp-login/test-login-shared.c +++ b/src/grp-login/test-login-shared.c @@ -17,8 +17,8 @@ along with systemd; If not, see <http://www.gnu.org/licenses/>. ***/ -#include "login-util.h" -#include "macro.h" +#include "basic/login-util.h" +#include "basic/macro.h" static void test_session_id_valid(void) { assert_se(session_id_valid("c1")); diff --git a/src/grp-login/test-login-tables.c b/src/grp-login/test-login-tables.c index 4fbc893a9a..3f2f4f3054 100644 --- a/src/grp-login/test-login-tables.c +++ b/src/grp-login/test-login-tables.c @@ -19,7 +19,7 @@ #include "logind-action.h" #include "logind-session.h" -#include "test-tables.h" +#include "shared/test-tables.h" int main(int argc, char **argv) { test_table(handle_action, HANDLE_ACTION); diff --git a/src/grp-machine/Makefile b/src/grp-machine/Makefile index 7412341233..59142f78bd 100644 --- a/src/grp-machine/Makefile +++ b/src/grp-machine/Makefile @@ -24,6 +24,7 @@ include $(dir $(lastword $(MAKEFILE_LIST)))/../../config.mk include $(topsrcdir)/build-aux/Makefile.head.mk at.subdirs += machinectl systemd-machined +at.subdirs += libmachine-core at.subdirs += nss-mymachines include $(topsrcdir)/build-aux/Makefile.tail.mk diff --git a/src/grp-machine/libmachine-core/image-dbus.c b/src/grp-machine/libmachine-core/image-dbus.c index 0eed9b81bb..13630fb881 100644 --- a/src/grp-machine/libmachine-core/image-dbus.c +++ b/src/grp-machine/libmachine-core/image-dbus.c @@ -17,16 +17,16 @@ along with systemd; If not, see <http://www.gnu.org/licenses/>. ***/ -#include "alloc-util.h" -#include "bus-label.h" -#include "bus-util.h" -#include "fd-util.h" +#include "basic/alloc-util.h" +#include "basic/bus-label.h" +#include "shared/bus-util.h" +#include "basic/fd-util.h" #include "image-dbus.h" -#include "io-util.h" -#include "machine-image.h" -#include "process-util.h" -#include "strv.h" -#include "user-util.h" +#include "basic/io-util.h" +#include "shared/machine-image.h" +#include "basic/process-util.h" +#include "basic/strv.h" +#include "basic/user-util.h" static BUS_DEFINE_PROPERTY_GET_ENUM(property_get_type, image_type, ImageType); diff --git a/src/grp-machine/libmachine-core/machine-dbus.c b/src/grp-machine/libmachine-core/machine-dbus.c index 7b9aa66d63..4e1b92f486 100644 --- a/src/grp-machine/libmachine-core/machine-dbus.c +++ b/src/grp-machine/libmachine-core/machine-dbus.c @@ -28,28 +28,28 @@ #include <libgen.h> #undef basename -#include "alloc-util.h" +#include "basic/alloc-util.h" #include "bus-common-errors.h" #include "bus-internal.h" -#include "bus-label.h" -#include "bus-util.h" -#include "copy.h" -#include "env-util.h" -#include "fd-util.h" -#include "fileio.h" -#include "formats-util.h" -#include "fs-util.h" -#include "in-addr-util.h" +#include "basic/bus-label.h" +#include "shared/bus-util.h" +#include "basic/copy.h" +#include "basic/env-util.h" +#include "basic/fd-util.h" +#include "basic/fileio.h" +#include "basic/formats-util.h" +#include "basic/fs-util.h" +#include "basic/in-addr-util.h" #include "local-addresses.h" #include "machine-dbus.h" #include "machine.h" -#include "mkdir.h" -#include "path-util.h" -#include "process-util.h" -#include "signal-util.h" -#include "strv.h" -#include "terminal-util.h" -#include "user-util.h" +#include "basic/mkdir.h" +#include "basic/path-util.h" +#include "basic/process-util.h" +#include "basic/signal-util.h" +#include "basic/strv.h" +#include "basic/terminal-util.h" +#include "basic/user-util.h" static int property_get_id( sd_bus *bus, diff --git a/src/grp-machine/libmachine-core/machine.c b/src/grp-machine/libmachine-core/machine.c index 135f47dafc..e238983397 100644 --- a/src/grp-machine/libmachine-core/machine.c +++ b/src/grp-machine/libmachine-core/machine.c @@ -23,25 +23,25 @@ #include <systemd/sd-messages.h> -#include "alloc-util.h" +#include "basic/alloc-util.h" #include "bus-error.h" -#include "bus-util.h" -#include "escape.h" -#include "extract-word.h" -#include "fd-util.h" -#include "fileio.h" -#include "formats-util.h" -#include "hashmap.h" +#include "shared/bus-util.h" +#include "basic/escape.h" +#include "basic/extract-word.h" +#include "basic/fd-util.h" +#include "basic/fileio.h" +#include "basic/formats-util.h" +#include "basic/hashmap.h" #include "machine-dbus.h" #include "machine.h" -#include "mkdir.h" -#include "parse-util.h" -#include "process-util.h" -#include "special.h" -#include "string-table.h" -#include "terminal-util.h" -#include "unit-name.h" -#include "util.h" +#include "basic/mkdir.h" +#include "basic/parse-util.h" +#include "basic/process-util.h" +#include "basic/special.h" +#include "basic/string-table.h" +#include "basic/terminal-util.h" +#include "basic/unit-name.h" +#include "basic/util.h" Machine* machine_new(Manager *manager, MachineClass class, const char *name) { Machine *m; diff --git a/src/grp-machine/libmachine-core/machine.h b/src/grp-machine/libmachine-core/machine.h index e5d75361a9..c61b00b39f 100644 --- a/src/grp-machine/libmachine-core/machine.h +++ b/src/grp-machine/libmachine-core/machine.h @@ -22,7 +22,7 @@ typedef struct Machine Machine; typedef enum KillWho KillWho; -#include "list.h" +#include "basic/list.h" #include "machined.h" #include "operation.h" diff --git a/src/grp-machine/libmachine-core/machined-dbus.c b/src/grp-machine/libmachine-core/machined-dbus.c index 41f138882b..7b6d8f77ac 100644 --- a/src/grp-machine/libmachine-core/machined-dbus.c +++ b/src/grp-machine/libmachine-core/machined-dbus.c @@ -23,26 +23,26 @@ #include <systemd/sd-id128.h> -#include "alloc-util.h" -#include "btrfs-util.h" +#include "basic/alloc-util.h" +#include "basic/btrfs-util.h" #include "bus-common-errors.h" -#include "bus-util.h" -#include "cgroup-util.h" -#include "fd-util.h" -#include "formats-util.h" -#include "hostname-util.h" +#include "shared/bus-util.h" +#include "basic/cgroup-util.h" +#include "basic/fd-util.h" +#include "basic/formats-util.h" +#include "basic/hostname-util.h" #include "image-dbus.h" -#include "io-util.h" +#include "basic/io-util.h" #include "machine-dbus.h" -#include "machine-image.h" -#include "machine-pool.h" +#include "shared/machine-image.h" +#include "shared/machine-pool.h" #include "machined.h" -#include "path-util.h" -#include "process-util.h" -#include "stdio-util.h" -#include "strv.h" -#include "unit-name.h" -#include "user-util.h" +#include "basic/path-util.h" +#include "basic/process-util.h" +#include "basic/stdio-util.h" +#include "basic/strv.h" +#include "basic/unit-name.h" +#include "basic/user-util.h" static int property_get_pool_path( sd_bus *bus, diff --git a/src/grp-machine/libmachine-core/machined.h b/src/grp-machine/libmachine-core/machined.h index 777571ebc0..b16ea3ef15 100644 --- a/src/grp-machine/libmachine-core/machined.h +++ b/src/grp-machine/libmachine-core/machined.h @@ -24,8 +24,8 @@ #include <systemd/sd-bus.h> #include <systemd/sd-event.h> -#include "hashmap.h" -#include "list.h" +#include "basic/hashmap.h" +#include "basic/list.h" typedef struct Manager Manager; diff --git a/src/grp-machine/libmachine-core/operation.c b/src/grp-machine/libmachine-core/operation.c index e6ddc41a55..69f6db2866 100644 --- a/src/grp-machine/libmachine-core/operation.c +++ b/src/grp-machine/libmachine-core/operation.c @@ -17,10 +17,10 @@ along with systemd; If not, see <http://www.gnu.org/licenses/>. ***/ -#include "alloc-util.h" -#include "fd-util.h" +#include "basic/alloc-util.h" +#include "basic/fd-util.h" #include "operation.h" -#include "process-util.h" +#include "basic/process-util.h" static int operation_done(sd_event_source *s, const siginfo_t *si, void *userdata) { _cleanup_(sd_bus_error_free) sd_bus_error error = SD_BUS_ERROR_NULL; diff --git a/src/grp-machine/libmachine-core/operation.h b/src/grp-machine/libmachine-core/operation.h index 9397cd5f6d..0821466a00 100644 --- a/src/grp-machine/libmachine-core/operation.h +++ b/src/grp-machine/libmachine-core/operation.h @@ -24,7 +24,7 @@ #include <systemd/sd-bus.h> #include <systemd/sd-event.h> -#include "list.h" +#include "basic/list.h" typedef struct Operation Operation; diff --git a/src/grp-machine/libmachine-core/test-machine-tables.c b/src/grp-machine/libmachine-core/test-machine-tables.c index f851a4d37d..4f87a7d06b 100644 --- a/src/grp-machine/libmachine-core/test-machine-tables.c +++ b/src/grp-machine/libmachine-core/test-machine-tables.c @@ -18,7 +18,7 @@ ***/ #include "machine.h" -#include "test-tables.h" +#include "shared/test-tables.h" int main(int argc, char **argv) { test_table(machine_class, MACHINE_CLASS); diff --git a/src/grp-machine/machinectl/machinectl.c b/src/grp-machine/machinectl/machinectl.c index 92ffa8b83d..30a0668f75 100644 --- a/src/grp-machine/machinectl/machinectl.c +++ b/src/grp-machine/machinectl/machinectl.c @@ -31,34 +31,34 @@ #include <systemd/sd-bus.h> -#include "alloc-util.h" +#include "basic/alloc-util.h" #include "bus-error.h" -#include "bus-unit-util.h" -#include "bus-util.h" -#include "cgroup-show.h" -#include "cgroup-util.h" -#include "copy.h" -#include "env-util.h" -#include "fd-util.h" -#include "hostname-util.h" -#include "import-util.h" -#include "log.h" -#include "logs-show.h" -#include "macro.h" -#include "mkdir.h" -#include "pager.h" -#include "parse-util.h" -#include "path-util.h" -#include "process-util.h" -#include "ptyfwd.h" -#include "signal-util.h" -#include "spawn-polkit-agent.h" -#include "strv.h" -#include "terminal-util.h" -#include "unit-name.h" -#include "util.h" -#include "verbs.h" -#include "web-util.h" +#include "shared/bus-unit-util.h" +#include "shared/bus-util.h" +#include "shared/cgroup-show.h" +#include "basic/cgroup-util.h" +#include "basic/copy.h" +#include "basic/env-util.h" +#include "basic/fd-util.h" +#include "basic/hostname-util.h" +#include "shared/import-util.h" +#include "basic/log.h" +#include "shared/logs-show.h" +#include "basic/macro.h" +#include "basic/mkdir.h" +#include "shared/pager.h" +#include "basic/parse-util.h" +#include "basic/path-util.h" +#include "basic/process-util.h" +#include "shared/ptyfwd.h" +#include "basic/signal-util.h" +#include "shared/spawn-polkit-agent.h" +#include "basic/strv.h" +#include "basic/terminal-util.h" +#include "basic/unit-name.h" +#include "basic/util.h" +#include "basic/verbs.h" +#include "basic/web-util.h" static char **arg_property = NULL; static bool arg_all = false; diff --git a/src/grp-machine/nss-mymachines/nss-mymachines.c b/src/grp-machine/nss-mymachines/nss-mymachines.c index da09035fe7..bf36fbfb02 100644 --- a/src/grp-machine/nss-mymachines/nss-mymachines.c +++ b/src/grp-machine/nss-mymachines/nss-mymachines.c @@ -23,16 +23,16 @@ #include <systemd/sd-bus.h> #include <systemd/sd-login.h> -#include "alloc-util.h" +#include "basic/alloc-util.h" #include "bus-common-errors.h" -#include "hostname-util.h" -#include "in-addr-util.h" -#include "macro.h" -#include "nss-util.h" -#include "signal-util.h" -#include "string-util.h" -#include "user-util.h" -#include "util.h" +#include "basic/hostname-util.h" +#include "basic/in-addr-util.h" +#include "basic/macro.h" +#include "basic/nss-util.h" +#include "basic/signal-util.h" +#include "basic/string-util.h" +#include "basic/user-util.h" +#include "basic/util.h" NSS_GETHOSTBYNAME_PROTOTYPES(mymachines); NSS_GETPW_PROTOTYPES(mymachines); diff --git a/src/grp-machine/systemd-machined/machined.c b/src/grp-machine/systemd-machined/machined.c index 151f0983ec..ae83e116bb 100644 --- a/src/grp-machine/systemd-machined/machined.c +++ b/src/grp-machine/systemd-machined/machined.c @@ -23,18 +23,18 @@ #include <systemd/sd-daemon.h> -#include "alloc-util.h" +#include "basic/alloc-util.h" #include "bus-error.h" -#include "bus-util.h" -#include "cgroup-util.h" -#include "dirent-util.h" -#include "fd-util.h" -#include "formats-util.h" -#include "hostname-util.h" -#include "label.h" -#include "machine-image.h" +#include "shared/bus-util.h" +#include "basic/cgroup-util.h" +#include "basic/dirent-util.h" +#include "basic/fd-util.h" +#include "basic/formats-util.h" +#include "basic/hostname-util.h" +#include "basic/label.h" +#include "shared/machine-image.h" #include "machined.h" -#include "signal-util.h" +#include "basic/signal-util.h" Manager *manager_new(void) { Manager *m; diff --git a/src/grp-network/libnetworkd-core/networkd-address-pool.c b/src/grp-network/libnetworkd-core/networkd-address-pool.c index ebc6c9eb9e..407ef06a09 100644 --- a/src/grp-network/libnetworkd-core/networkd-address-pool.c +++ b/src/grp-network/libnetworkd-core/networkd-address-pool.c @@ -17,11 +17,11 @@ along with systemd; If not, see <http://www.gnu.org/licenses/>. ***/ -#include "alloc-util.h" +#include "basic/alloc-util.h" #include "networkd-address-pool.h" #include "networkd.h" -#include "set.h" -#include "string-util.h" +#include "basic/set.h" +#include "basic/string-util.h" int address_pool_new( Manager *m, diff --git a/src/grp-network/libnetworkd-core/networkd-address-pool.h b/src/grp-network/libnetworkd-core/networkd-address-pool.h index af30decfe0..d5659a9eeb 100644 --- a/src/grp-network/libnetworkd-core/networkd-address-pool.h +++ b/src/grp-network/libnetworkd-core/networkd-address-pool.h @@ -21,8 +21,8 @@ typedef struct AddressPool AddressPool; -#include "in-addr-util.h" -#include "list.h" +#include "basic/in-addr-util.h" +#include "basic/list.h" typedef struct Manager Manager; diff --git a/src/grp-network/libnetworkd-core/networkd-address.c b/src/grp-network/libnetworkd-core/networkd-address.c index 367c340e08..03b4a3f1b7 100644 --- a/src/grp-network/libnetworkd-core/networkd-address.c +++ b/src/grp-network/libnetworkd-core/networkd-address.c @@ -19,18 +19,18 @@ #include <net/if.h> -#include "alloc-util.h" -#include "conf-parser.h" +#include "basic/alloc-util.h" +#include "shared/conf-parser.h" #include "firewall-util.h" #include "netlink-util.h" #include "networkd-address.h" #include "networkd.h" -#include "parse-util.h" -#include "set.h" -#include "socket-util.h" -#include "string-util.h" -#include "utf8.h" -#include "util.h" +#include "basic/parse-util.h" +#include "basic/set.h" +#include "basic/socket-util.h" +#include "basic/string-util.h" +#include "basic/utf8.h" +#include "basic/util.h" int address_new(Address **ret) { _cleanup_address_free_ Address *address = NULL; diff --git a/src/grp-network/libnetworkd-core/networkd-address.h b/src/grp-network/libnetworkd-core/networkd-address.h index 784ab18b27..1e178a0ca3 100644 --- a/src/grp-network/libnetworkd-core/networkd-address.h +++ b/src/grp-network/libnetworkd-core/networkd-address.h @@ -22,7 +22,7 @@ #include <inttypes.h> #include <stdbool.h> -#include "in-addr-util.h" +#include "basic/in-addr-util.h" typedef struct Address Address; diff --git a/src/grp-network/libnetworkd-core/networkd-conf.c b/src/grp-network/libnetworkd-core/networkd-conf.c index b67a1f6d09..384dae624f 100644 --- a/src/grp-network/libnetworkd-core/networkd-conf.c +++ b/src/grp-network/libnetworkd-core/networkd-conf.c @@ -19,12 +19,12 @@ #include <ctype.h> -#include "conf-parser.h" -#include "def.h" +#include "shared/conf-parser.h" +#include "basic/def.h" #include "dhcp-identifier.h" -#include "hexdecoct.h" +#include "basic/hexdecoct.h" #include "networkd-conf.h" -#include "string-table.h" +#include "basic/string-table.h" int manager_parse_config_file(Manager *m) { assert(m); diff --git a/src/grp-network/libnetworkd-core/networkd-dhcp4.c b/src/grp-network/libnetworkd-core/networkd-dhcp4.c index 2ddcee9db8..438ffd0842 100644 --- a/src/grp-network/libnetworkd-core/networkd-dhcp4.c +++ b/src/grp-network/libnetworkd-core/networkd-dhcp4.c @@ -20,9 +20,9 @@ #include <netinet/ether.h> #include <linux/if.h> -#include "alloc-util.h" +#include "basic/alloc-util.h" #include "dhcp-lease-internal.h" -#include "hostname-util.h" +#include "basic/hostname-util.h" #include "network-internal.h" #include "networkd.h" diff --git a/src/grp-network/libnetworkd-core/networkd-fdb.c b/src/grp-network/libnetworkd-core/networkd-fdb.c index 241f486211..75fccea6b9 100644 --- a/src/grp-network/libnetworkd-core/networkd-fdb.c +++ b/src/grp-network/libnetworkd-core/networkd-fdb.c @@ -20,12 +20,12 @@ #include <net/ethernet.h> #include <net/if.h> -#include "alloc-util.h" -#include "conf-parser.h" +#include "basic/alloc-util.h" +#include "shared/conf-parser.h" #include "netlink-util.h" #include "networkd-fdb.h" #include "networkd.h" -#include "util.h" +#include "basic/util.h" /* create a new FDB entry or get an existing one. */ int fdb_entry_new_static(Network *const network, diff --git a/src/grp-network/libnetworkd-core/networkd-fdb.h b/src/grp-network/libnetworkd-core/networkd-fdb.h index 84410714f5..c04a2b0d37 100644 --- a/src/grp-network/libnetworkd-core/networkd-fdb.h +++ b/src/grp-network/libnetworkd-core/networkd-fdb.h @@ -19,8 +19,8 @@ along with systemd; If not, see <http://www.gnu.org/licenses/>. ***/ -#include "list.h" -#include "macro.h" +#include "basic/list.h" +#include "basic/macro.h" typedef struct Network Network; typedef struct FdbEntry FdbEntry; diff --git a/src/grp-network/libnetworkd-core/networkd-gperf.gperf b/src/grp-network/libnetworkd-core/networkd-gperf.gperf index 3fdfe74955..e1e2a687e6 100644 --- a/src/grp-network/libnetworkd-core/networkd-gperf.gperf +++ b/src/grp-network/libnetworkd-core/networkd-gperf.gperf @@ -1,6 +1,6 @@ %{ #include <stddef.h> -#include "conf-parser.h" +#include "shared/conf-parser.h" #include "networkd-conf.h" %} struct ConfigPerfItem; diff --git a/src/grp-network/libnetworkd-core/networkd-link-bus.c b/src/grp-network/libnetworkd-core/networkd-link-bus.c index 532557ed6c..86fff49be0 100644 --- a/src/grp-network/libnetworkd-core/networkd-link-bus.c +++ b/src/grp-network/libnetworkd-core/networkd-link-bus.c @@ -17,12 +17,12 @@ along with systemd; If not, see <http://www.gnu.org/licenses/>. ***/ -#include "alloc-util.h" -#include "bus-util.h" +#include "basic/alloc-util.h" +#include "shared/bus-util.h" #include "networkd-link.h" #include "networkd.h" -#include "parse-util.h" -#include "strv.h" +#include "basic/parse-util.h" +#include "basic/strv.h" static BUS_DEFINE_PROPERTY_GET_ENUM(property_get_operational_state, link_operstate, LinkOperationalState); static BUS_DEFINE_PROPERTY_GET_ENUM(property_get_administrative_state, link_state, LinkState); diff --git a/src/grp-network/libnetworkd-core/networkd-link.c b/src/grp-network/libnetworkd-core/networkd-link.c index a021fc886f..cb59a8e07c 100644 --- a/src/grp-network/libnetworkd-core/networkd-link.c +++ b/src/grp-network/libnetworkd-core/networkd-link.c @@ -21,22 +21,22 @@ #include <linux/if.h> #include <unistd.h> -#include "alloc-util.h" -#include "bus-util.h" +#include "basic/alloc-util.h" +#include "shared/bus-util.h" #include "dhcp-lease-internal.h" -#include "fd-util.h" -#include "fileio.h" +#include "basic/fd-util.h" +#include "basic/fileio.h" #include "netlink-util.h" #include "network-internal.h" #include "networkd.h" #include "networkd-lldp-tx.h" -#include "set.h" -#include "socket-util.h" -#include "stdio-util.h" -#include "string-table.h" -#include "udev-util.h" -#include "util.h" -#include "virt.h" +#include "basic/set.h" +#include "basic/socket-util.h" +#include "basic/stdio-util.h" +#include "basic/string-table.h" +#include "shared/udev-util.h" +#include "basic/util.h" +#include "basic/virt.h" static bool link_dhcp6_enabled(Link *link) { assert(link); diff --git a/src/grp-network/libnetworkd-core/networkd-link.h b/src/grp-network/libnetworkd-core/networkd-link.h index 90cb9b93f6..ddb8b41f23 100644 --- a/src/grp-network/libnetworkd-core/networkd-link.h +++ b/src/grp-network/libnetworkd-core/networkd-link.h @@ -30,8 +30,8 @@ #include <systemd/sd-ndisc.h> #include <systemd/sd-netlink.h> -#include "list.h" -#include "set.h" +#include "basic/list.h" +#include "basic/set.h" typedef enum LinkState { LINK_STATE_PENDING, diff --git a/src/grp-network/libnetworkd-core/networkd-lldp-tx.c b/src/grp-network/libnetworkd-core/networkd-lldp-tx.c index 3aa768388b..52c056e694 100644 --- a/src/grp-network/libnetworkd-core/networkd-lldp-tx.c +++ b/src/grp-network/libnetworkd-core/networkd-lldp-tx.c @@ -21,17 +21,17 @@ #include <inttypes.h> #include <string.h> -#include "alloc-util.h" -#include "fd-util.h" -#include "fileio.h" -#include "hostname-util.h" +#include "basic/alloc-util.h" +#include "basic/fd-util.h" +#include "basic/fileio.h" +#include "basic/hostname-util.h" #include "networkd-lldp-tx.h" #include "networkd.h" -#include "parse-util.h" -#include "random-util.h" -#include "socket-util.h" -#include "string-util.h" -#include "unaligned.h" +#include "basic/parse-util.h" +#include "basic/random-util.h" +#include "basic/socket-util.h" +#include "basic/string-util.h" +#include "basic/unaligned.h" /* The LLDP spec calls this "txFastInit", see 9.2.5.19 */ #define LLDP_TX_FAST_INIT 4U diff --git a/src/grp-network/libnetworkd-core/networkd-manager-bus.c b/src/grp-network/libnetworkd-core/networkd-manager-bus.c index 0c429b9471..b6cbba5a85 100644 --- a/src/grp-network/libnetworkd-core/networkd-manager-bus.c +++ b/src/grp-network/libnetworkd-core/networkd-manager-bus.c @@ -17,8 +17,8 @@ along with systemd; If not, see <http://www.gnu.org/licenses/>. ***/ -#include "alloc-util.h" -#include "bus-util.h" +#include "basic/alloc-util.h" +#include "shared/bus-util.h" #include "networkd.h" static BUS_DEFINE_PROPERTY_GET_ENUM(property_get_operational_state, link_operstate, LinkOperationalState); diff --git a/src/grp-network/libnetworkd-core/networkd-manager.c b/src/grp-network/libnetworkd-core/networkd-manager.c index 7af7abaa81..6226c24b01 100644 --- a/src/grp-network/libnetworkd-core/networkd-manager.c +++ b/src/grp-network/libnetworkd-core/networkd-manager.c @@ -23,22 +23,22 @@ #include <systemd/sd-daemon.h> #include <systemd/sd-netlink.h> -#include "alloc-util.h" -#include "bus-util.h" -#include "conf-parser.h" -#include "def.h" -#include "dns-domain.h" -#include "fd-util.h" -#include "fileio.h" +#include "basic/alloc-util.h" +#include "shared/bus-util.h" +#include "shared/conf-parser.h" +#include "basic/def.h" +#include "shared/dns-domain.h" +#include "basic/fd-util.h" +#include "basic/fileio.h" #include "libudev-private.h" #include "local-addresses.h" #include "netlink-util.h" #include "networkd.h" -#include "ordered-set.h" -#include "path-util.h" -#include "set.h" -#include "udev-util.h" -#include "virt.h" +#include "basic/ordered-set.h" +#include "basic/path-util.h" +#include "basic/set.h" +#include "shared/udev-util.h" +#include "basic/virt.h" /* use 8 MB for receive socket kernel queue. */ #define RCVBUF_SIZE (8*1024*1024) diff --git a/src/grp-network/libnetworkd-core/networkd-netdev-bond.c b/src/grp-network/libnetworkd-core/networkd-netdev-bond.c index 7005b165d9..fc1d4eb12f 100644 --- a/src/grp-network/libnetworkd-core/networkd-netdev-bond.c +++ b/src/grp-network/libnetworkd-core/networkd-netdev-bond.c @@ -23,13 +23,13 @@ #include <systemd/sd-netlink.h> -#include "alloc-util.h" -#include "conf-parser.h" -#include "extract-word.h" -#include "missing.h" +#include "basic/alloc-util.h" +#include "shared/conf-parser.h" +#include "basic/extract-word.h" +#include "basic/missing.h" #include "networkd-netdev-bond.h" -#include "string-table.h" -#include "string-util.h" +#include "basic/string-table.h" +#include "basic/string-util.h" /* * Number of seconds between instances where the bonding diff --git a/src/grp-network/libnetworkd-core/networkd-netdev-bond.h b/src/grp-network/libnetworkd-core/networkd-netdev-bond.h index b941edb344..0ffb91b12e 100644 --- a/src/grp-network/libnetworkd-core/networkd-netdev-bond.h +++ b/src/grp-network/libnetworkd-core/networkd-netdev-bond.h @@ -19,8 +19,8 @@ along with systemd; If not, see <http://www.gnu.org/licenses/>. ***/ -#include "in-addr-util.h" -#include "list.h" +#include "basic/in-addr-util.h" +#include "basic/list.h" #include "networkd-netdev.h" diff --git a/src/grp-network/libnetworkd-core/networkd-netdev-bridge.c b/src/grp-network/libnetworkd-core/networkd-netdev-bridge.c index 4cfd00413f..bb07ec59a6 100644 --- a/src/grp-network/libnetworkd-core/networkd-netdev-bridge.c +++ b/src/grp-network/libnetworkd-core/networkd-netdev-bridge.c @@ -20,7 +20,7 @@ #include <net/if.h> -#include "missing.h" +#include "basic/missing.h" #include "netlink-util.h" #include "networkd.h" #include "networkd-netdev-bridge.h" diff --git a/src/grp-network/libnetworkd-core/networkd-netdev-gperf.gperf b/src/grp-network/libnetworkd-core/networkd-netdev-gperf.gperf index ba04bb0165..37f6884656 100644 --- a/src/grp-network/libnetworkd-core/networkd-netdev-gperf.gperf +++ b/src/grp-network/libnetworkd-core/networkd-netdev-gperf.gperf @@ -1,6 +1,6 @@ %{ #include <stddef.h> -#include "conf-parser.h" +#include "shared/conf-parser.h" #include "network-internal.h" #include "networkd-netdev-bond.h" #include "networkd-netdev-ipvlan.h" diff --git a/src/grp-network/libnetworkd-core/networkd-netdev-ipvlan.c b/src/grp-network/libnetworkd-core/networkd-netdev-ipvlan.c index af4177e43a..e388fa6567 100644 --- a/src/grp-network/libnetworkd-core/networkd-netdev-ipvlan.c +++ b/src/grp-network/libnetworkd-core/networkd-netdev-ipvlan.c @@ -19,9 +19,9 @@ #include <net/if.h> -#include "conf-parser.h" +#include "shared/conf-parser.h" #include "networkd-netdev-ipvlan.h" -#include "string-table.h" +#include "basic/string-table.h" static const char* const ipvlan_mode_table[_NETDEV_IPVLAN_MODE_MAX] = { [NETDEV_IPVLAN_MODE_L2] = "L2", diff --git a/src/grp-network/libnetworkd-core/networkd-netdev-ipvlan.h b/src/grp-network/libnetworkd-core/networkd-netdev-ipvlan.h index 10d4079844..00ad769756 100644 --- a/src/grp-network/libnetworkd-core/networkd-netdev-ipvlan.h +++ b/src/grp-network/libnetworkd-core/networkd-netdev-ipvlan.h @@ -19,7 +19,7 @@ along with systemd; If not, see <http://www.gnu.org/licenses/>. ***/ -#include "missing.h" +#include "basic/missing.h" #include "networkd-netdev.h" typedef enum IPVlanMode { diff --git a/src/grp-network/libnetworkd-core/networkd-netdev-macvlan.c b/src/grp-network/libnetworkd-core/networkd-netdev-macvlan.c index 48e98aa51b..030ec51b15 100644 --- a/src/grp-network/libnetworkd-core/networkd-netdev-macvlan.c +++ b/src/grp-network/libnetworkd-core/networkd-netdev-macvlan.c @@ -19,9 +19,9 @@ #include <net/if.h> -#include "conf-parser.h" +#include "shared/conf-parser.h" #include "networkd-netdev-macvlan.h" -#include "string-table.h" +#include "basic/string-table.h" static const char* const macvlan_mode_table[_NETDEV_MACVLAN_MODE_MAX] = { [NETDEV_MACVLAN_MODE_PRIVATE] = "private", diff --git a/src/grp-network/libnetworkd-core/networkd-netdev-tunnel.c b/src/grp-network/libnetworkd-core/networkd-netdev-tunnel.c index 26a9a972f1..16bb8a56e8 100644 --- a/src/grp-network/libnetworkd-core/networkd-netdev-tunnel.c +++ b/src/grp-network/libnetworkd-core/networkd-netdev-tunnel.c @@ -25,14 +25,14 @@ #include <systemd/sd-netlink.h> -#include "conf-parser.h" -#include "missing.h" +#include "shared/conf-parser.h" +#include "basic/missing.h" #include "networkd-link.h" #include "networkd-netdev-tunnel.h" -#include "parse-util.h" -#include "string-table.h" -#include "string-util.h" -#include "util.h" +#include "basic/parse-util.h" +#include "basic/string-table.h" +#include "basic/string-util.h" +#include "basic/util.h" #define DEFAULT_TNL_HOP_LIMIT 64 #define IP6_FLOWINFO_FLOWLABEL htonl(0x000FFFFF) diff --git a/src/grp-network/libnetworkd-core/networkd-netdev-tunnel.h b/src/grp-network/libnetworkd-core/networkd-netdev-tunnel.h index 7d31e7b687..6b65431e7e 100644 --- a/src/grp-network/libnetworkd-core/networkd-netdev-tunnel.h +++ b/src/grp-network/libnetworkd-core/networkd-netdev-tunnel.h @@ -19,7 +19,7 @@ along with systemd; If not, see <http://www.gnu.org/licenses/>. ***/ -#include "in-addr-util.h" +#include "basic/in-addr-util.h" #include "networkd-netdev.h" diff --git a/src/grp-network/libnetworkd-core/networkd-netdev-tuntap.c b/src/grp-network/libnetworkd-core/networkd-netdev-tuntap.c index 088a4d8d32..1f0752cd0a 100644 --- a/src/grp-network/libnetworkd-core/networkd-netdev-tuntap.c +++ b/src/grp-network/libnetworkd-core/networkd-netdev-tuntap.c @@ -25,10 +25,10 @@ #include <sys/stat.h> #include <sys/types.h> -#include "alloc-util.h" -#include "fd-util.h" +#include "basic/alloc-util.h" +#include "basic/fd-util.h" #include "networkd-netdev-tuntap.h" -#include "user-util.h" +#include "basic/user-util.h" #define TUN_DEV "/dev/net/tun" diff --git a/src/grp-network/libnetworkd-core/networkd-netdev-vxlan.c b/src/grp-network/libnetworkd-core/networkd-netdev-vxlan.c index 363a6bdde6..1a36e8609f 100644 --- a/src/grp-network/libnetworkd-core/networkd-netdev-vxlan.c +++ b/src/grp-network/libnetworkd-core/networkd-netdev-vxlan.c @@ -21,11 +21,11 @@ #include <systemd/sd-netlink.h> -#include "conf-parser.h" -#include "alloc-util.h" -#include "extract-word.h" -#include "parse-util.h" -#include "missing.h" +#include "shared/conf-parser.h" +#include "basic/alloc-util.h" +#include "basic/extract-word.h" +#include "basic/parse-util.h" +#include "basic/missing.h" #include "networkd-link.h" #include "networkd-netdev-vxlan.h" diff --git a/src/grp-network/libnetworkd-core/networkd-netdev-vxlan.h b/src/grp-network/libnetworkd-core/networkd-netdev-vxlan.h index 4614c66fd1..097e4e2369 100644 --- a/src/grp-network/libnetworkd-core/networkd-netdev-vxlan.h +++ b/src/grp-network/libnetworkd-core/networkd-netdev-vxlan.h @@ -21,7 +21,7 @@ typedef struct VxLan VxLan; -#include "in-addr-util.h" +#include "basic/in-addr-util.h" #include "networkd-netdev.h" #define VXLAN_VID_MAX (1u << 24) - 1 diff --git a/src/grp-network/libnetworkd-core/networkd-netdev.c b/src/grp-network/libnetworkd-core/networkd-netdev.c index 851a36290c..33204753c8 100644 --- a/src/grp-network/libnetworkd-core/networkd-netdev.c +++ b/src/grp-network/libnetworkd-core/networkd-netdev.c @@ -19,19 +19,19 @@ #include <net/if.h> -#include "alloc-util.h" -#include "conf-files.h" -#include "conf-parser.h" -#include "fd-util.h" -#include "list.h" +#include "basic/alloc-util.h" +#include "basic/conf-files.h" +#include "shared/conf-parser.h" +#include "basic/fd-util.h" +#include "basic/list.h" #include "netlink-util.h" #include "network-internal.h" #include "networkd-netdev.h" #include "networkd.h" -#include "siphash24.h" -#include "stat-util.h" -#include "string-table.h" -#include "string-util.h" +#include "basic/siphash24.h" +#include "basic/stat-util.h" +#include "basic/string-table.h" +#include "basic/string-util.h" const NetDevVTable * const netdev_vtable[_NETDEV_KIND_MAX] = { diff --git a/src/grp-network/libnetworkd-core/networkd-netdev.h b/src/grp-network/libnetworkd-core/networkd-netdev.h index ab3f068167..fcfee9e234 100644 --- a/src/grp-network/libnetworkd-core/networkd-netdev.h +++ b/src/grp-network/libnetworkd-core/networkd-netdev.h @@ -21,8 +21,8 @@ #include <systemd/sd-netlink.h> -#include "list.h" -#include "time-util.h" +#include "basic/list.h" +#include "basic/time-util.h" typedef struct netdev_join_callback netdev_join_callback; typedef struct Link Link; diff --git a/src/grp-network/libnetworkd-core/networkd-network-bus.c b/src/grp-network/libnetworkd-core/networkd-network-bus.c index d6b7448a43..f218cf624c 100644 --- a/src/grp-network/libnetworkd-core/networkd-network-bus.c +++ b/src/grp-network/libnetworkd-core/networkd-network-bus.c @@ -17,10 +17,10 @@ along with systemd; If not, see <http://www.gnu.org/licenses/>. ***/ -#include "alloc-util.h" +#include "basic/alloc-util.h" #include "networkd.h" -#include "string-util.h" -#include "strv.h" +#include "basic/string-util.h" +#include "basic/strv.h" static int property_get_ether_addrs( sd_bus *bus, diff --git a/src/grp-network/libnetworkd-core/networkd-network-gperf.gperf b/src/grp-network/libnetworkd-core/networkd-network-gperf.gperf index 03e4e3b39f..9436e11b66 100644 --- a/src/grp-network/libnetworkd-core/networkd-network-gperf.gperf +++ b/src/grp-network/libnetworkd-core/networkd-network-gperf.gperf @@ -1,6 +1,6 @@ %{ #include <stddef.h> -#include "conf-parser.h" +#include "shared/conf-parser.h" #include "networkd.h" #include "networkd-conf.h" #include "network-internal.h" diff --git a/src/grp-network/libnetworkd-core/networkd-network.c b/src/grp-network/libnetworkd-core/networkd-network.c index dd89b3770c..e9132d4618 100644 --- a/src/grp-network/libnetworkd-core/networkd-network.c +++ b/src/grp-network/libnetworkd-core/networkd-network.c @@ -20,21 +20,21 @@ #include <ctype.h> #include <net/if.h> -#include "alloc-util.h" -#include "conf-files.h" -#include "conf-parser.h" -#include "dns-domain.h" -#include "fd-util.h" -#include "hostname-util.h" +#include "basic/alloc-util.h" +#include "basic/conf-files.h" +#include "shared/conf-parser.h" +#include "shared/dns-domain.h" +#include "basic/fd-util.h" +#include "basic/hostname-util.h" #include "network-internal.h" #include "networkd-network.h" #include "networkd.h" -#include "parse-util.h" -#include "set.h" -#include "stat-util.h" -#include "string-table.h" -#include "string-util.h" -#include "util.h" +#include "basic/parse-util.h" +#include "basic/set.h" +#include "basic/stat-util.h" +#include "basic/string-table.h" +#include "basic/string-util.h" +#include "basic/util.h" static int network_load_one(Manager *manager, const char *filename) { _cleanup_network_free_ Network *network = NULL; diff --git a/src/grp-network/libnetworkd-core/networkd-network.h b/src/grp-network/libnetworkd-core/networkd-network.h index 177bc11ec4..33c97416f8 100644 --- a/src/grp-network/libnetworkd-core/networkd-network.h +++ b/src/grp-network/libnetworkd-core/networkd-network.h @@ -22,10 +22,10 @@ #include <systemd/sd-bus.h> #include "udev.h" -#include "condition.h" +#include "shared/condition.h" #include "dhcp-identifier.h" -#include "hashmap.h" -#include "resolve-util.h" +#include "basic/hashmap.h" +#include "shared/resolve-util.h" #include "networkd-address.h" #include "networkd-fdb.h" diff --git a/src/grp-network/libnetworkd-core/networkd-route.c b/src/grp-network/libnetworkd-core/networkd-route.c index f001de772a..ee34a7df01 100644 --- a/src/grp-network/libnetworkd-core/networkd-route.c +++ b/src/grp-network/libnetworkd-core/networkd-route.c @@ -17,16 +17,16 @@ along with systemd; If not, see <http://www.gnu.org/licenses/>. ***/ -#include "alloc-util.h" -#include "conf-parser.h" -#include "in-addr-util.h" +#include "basic/alloc-util.h" +#include "shared/conf-parser.h" +#include "basic/in-addr-util.h" #include "netlink-util.h" #include "networkd-route.h" #include "networkd.h" -#include "parse-util.h" -#include "set.h" -#include "string-util.h" -#include "util.h" +#include "basic/parse-util.h" +#include "basic/set.h" +#include "basic/string-util.h" +#include "basic/util.h" int route_new(Route **ret) { _cleanup_route_free_ Route *route = NULL; diff --git a/src/grp-network/libnetworkd-core/networkd-util.c b/src/grp-network/libnetworkd-core/networkd-util.c index 555a7c68a1..7fb2fb26d2 100644 --- a/src/grp-network/libnetworkd-core/networkd-util.c +++ b/src/grp-network/libnetworkd-core/networkd-util.c @@ -17,12 +17,12 @@ along with systemd; If not, see <http://www.gnu.org/licenses/>. ***/ -#include "conf-parser.h" +#include "shared/conf-parser.h" #include "networkd-util.h" -#include "parse-util.h" -#include "string-table.h" -#include "string-util.h" -#include "util.h" +#include "basic/parse-util.h" +#include "basic/string-table.h" +#include "basic/string-util.h" +#include "basic/util.h" const char *address_family_boolean_to_string(AddressFamilyBoolean b) { if (b == ADDRESS_FAMILY_YES || diff --git a/src/grp-network/libnetworkd-core/networkd-util.h b/src/grp-network/libnetworkd-core/networkd-util.h index d5c385bea4..d023782285 100644 --- a/src/grp-network/libnetworkd-core/networkd-util.h +++ b/src/grp-network/libnetworkd-core/networkd-util.h @@ -19,7 +19,7 @@ along with systemd; If not, see <http://www.gnu.org/licenses/>. ***/ -#include "macro.h" +#include "basic/macro.h" typedef enum AddressFamilyBoolean { /* This is a bitmask, though it usually doesn't feel that way! */ diff --git a/src/grp-network/libnetworkd-core/networkd.h b/src/grp-network/libnetworkd-core/networkd.h index b61e03920e..cabd43b8e1 100644 --- a/src/grp-network/libnetworkd-core/networkd.h +++ b/src/grp-network/libnetworkd-core/networkd.h @@ -27,8 +27,8 @@ #include "udev.h" #include "dhcp-identifier.h" -#include "hashmap.h" -#include "list.h" +#include "basic/hashmap.h" +#include "basic/list.h" #include "networkd-address-pool.h" #include "networkd-link.h" diff --git a/src/grp-network/networkctl/networkctl.c b/src/grp-network/networkctl/networkctl.c index 85635b59bc..efbef4afed 100644 --- a/src/grp-network/networkctl/networkctl.c +++ b/src/grp-network/networkctl/networkctl.c @@ -27,27 +27,27 @@ #include <systemd/sd-netlink.h> #include <systemd/sd-network.h> -#include "alloc-util.h" -#include "arphrd-list.h" +#include "basic/alloc-util.h" +#include "basic/arphrd-list.h" #include "device-util.h" -#include "ether-addr-util.h" -#include "fd-util.h" +#include "basic/ether-addr-util.h" +#include "basic/fd-util.h" #include "hwdb-util.h" #include "local-addresses.h" -#include "locale-util.h" +#include "basic/locale-util.h" #include "netlink-util.h" -#include "pager.h" -#include "parse-util.h" -#include "socket-util.h" -#include "sparse-endian.h" -#include "stdio-util.h" -#include "string-table.h" -#include "string-util.h" -#include "strv.h" -#include "strxcpyx.h" -#include "terminal-util.h" -#include "util.h" -#include "verbs.h" +#include "shared/pager.h" +#include "basic/parse-util.h" +#include "basic/socket-util.h" +#include "basic/sparse-endian.h" +#include "basic/stdio-util.h" +#include "basic/string-table.h" +#include "basic/string-util.h" +#include "basic/strv.h" +#include "basic/strxcpyx.h" +#include "basic/terminal-util.h" +#include "basic/util.h" +#include "basic/verbs.h" static bool arg_no_pager = false; static bool arg_legend = true; diff --git a/src/grp-network/systemd-networkd-wait-online/networkd-wait-online-link.c b/src/grp-network/systemd-networkd-wait-online/networkd-wait-online-link.c index 971545296f..f03de93540 100644 --- a/src/grp-network/systemd-networkd-wait-online/networkd-wait-online-link.c +++ b/src/grp-network/systemd-networkd-wait-online/networkd-wait-online-link.c @@ -20,9 +20,9 @@ #include <systemd/sd-network.h> -#include "alloc-util.h" +#include "basic/alloc-util.h" #include "networkd-wait-online-link.h" -#include "string-util.h" +#include "basic/string-util.h" int link_new(Manager *m, Link **ret, int ifindex, const char *ifname) { _cleanup_(link_freep) Link *l = NULL; diff --git a/src/grp-network/systemd-networkd-wait-online/networkd-wait-online-manager.c b/src/grp-network/systemd-networkd-wait-online/networkd-wait-online-manager.c index 2ff7ddb044..fbf7a96f45 100644 --- a/src/grp-network/systemd-networkd-wait-online/networkd-wait-online-manager.c +++ b/src/grp-network/systemd-networkd-wait-online/networkd-wait-online-manager.c @@ -21,13 +21,13 @@ #include <linux/if.h> #include <fnmatch.h> -#include "alloc-util.h" +#include "basic/alloc-util.h" #include "netlink-util.h" #include "network-internal.h" #include "networkd-wait-online-link.h" #include "networkd-wait-online.h" -#include "time-util.h" -#include "util.h" +#include "basic/time-util.h" +#include "basic/util.h" bool manager_ignore_link(Manager *m, Link *link) { char **ignore; diff --git a/src/grp-network/systemd-networkd-wait-online/networkd-wait-online.c b/src/grp-network/systemd-networkd-wait-online/networkd-wait-online.c index a08272463e..ac3109ee78 100644 --- a/src/grp-network/systemd-networkd-wait-online/networkd-wait-online.c +++ b/src/grp-network/systemd-networkd-wait-online/networkd-wait-online.c @@ -23,8 +23,8 @@ #include <systemd/sd-daemon.h> #include "networkd-wait-online.h" -#include "signal-util.h" -#include "strv.h" +#include "basic/signal-util.h" +#include "basic/strv.h" static bool arg_quiet = false; static usec_t arg_timeout = 120 * USEC_PER_SEC; diff --git a/src/grp-network/systemd-networkd-wait-online/networkd-wait-online.h b/src/grp-network/systemd-networkd-wait-online/networkd-wait-online.h index 7ac7f4018a..46d01d2bf3 100644 --- a/src/grp-network/systemd-networkd-wait-online/networkd-wait-online.h +++ b/src/grp-network/systemd-networkd-wait-online/networkd-wait-online.h @@ -23,7 +23,7 @@ #include <systemd/sd-netlink.h> #include <systemd/sd-network.h> -#include "hashmap.h" +#include "basic/hashmap.h" typedef struct Manager Manager; diff --git a/src/grp-network/systemd-networkd/networkd.c b/src/grp-network/systemd-networkd/networkd.c index 9f5c75ac3d..641a1e2f08 100644 --- a/src/grp-network/systemd-networkd/networkd.c +++ b/src/grp-network/systemd-networkd/networkd.c @@ -19,11 +19,11 @@ #include <systemd/sd-daemon.h> -#include "capability-util.h" +#include "basic/capability-util.h" #include "networkd.h" #include "networkd-conf.h" -#include "signal-util.h" -#include "user-util.h" +#include "basic/signal-util.h" +#include "basic/user-util.h" int main(int argc, char *argv[]) { _cleanup_manager_free_ Manager *m = NULL; diff --git a/src/grp-network/test-network-tables.c b/src/grp-network/test-network-tables.c index adbe09a5e1..1b7eee8a03 100644 --- a/src/grp-network/test-network-tables.c +++ b/src/grp-network/test-network-tables.c @@ -5,7 +5,7 @@ #include "networkd-netdev-bond.h" #include "networkd-netdev-macvlan.h" #include "networkd.h" -#include "test-tables.h" +#include "shared/test-tables.h" int main(int argc, char **argv) { test_table(bond_mode, NETDEV_BOND_MODE); diff --git a/src/grp-network/test-network.c b/src/grp-network/test-network.c index 855646173f..7e94cff59e 100644 --- a/src/grp-network/test-network.c +++ b/src/grp-network/test-network.c @@ -17,7 +17,7 @@ along with systemd; If not, see <http://www.gnu.org/licenses/>. ***/ -#include "alloc-util.h" +#include "basic/alloc-util.h" #include "dhcp-lease-internal.h" #include "network-internal.h" #include "networkd.h" diff --git a/src/grp-network/test-networkd-conf.c b/src/grp-network/test-networkd-conf.c index 0e1a18457d..91863d8a9e 100644 --- a/src/grp-network/test-networkd-conf.c +++ b/src/grp-network/test-networkd-conf.c @@ -17,11 +17,11 @@ along with systemd; If not, see <http://www.gnu.org/licenses/>. ***/ -#include "hexdecoct.h" -#include "log.h" -#include "macro.h" -#include "string-util.h" -#include "ether-addr-util.h" +#include "basic/hexdecoct.h" +#include "basic/log.h" +#include "basic/macro.h" +#include "basic/string-util.h" +#include "basic/ether-addr-util.h" #include "networkd-conf.h" #include "networkd-network.h" diff --git a/src/grp-resolve/nss-resolve/nss-resolve.c b/src/grp-resolve/nss-resolve/nss-resolve.c index 4c2101d856..7e10498156 100644 --- a/src/grp-resolve/nss-resolve/nss-resolve.c +++ b/src/grp-resolve/nss-resolve/nss-resolve.c @@ -26,13 +26,13 @@ #include <systemd/sd-bus.h> -#include "bus-common-errors.h" -#include "in-addr-util.h" -#include "macro.h" -#include "nss-util.h" -#include "string-util.h" -#include "util.h" -#include "signal-util.h" +#include "sd-bus/bus-common-errors.h" +#include "basic/in-addr-util.h" +#include "basic/macro.h" +#include "basic/nss-util.h" +#include "basic/string-util.h" +#include "basic/util.h" +#include "basic/signal-util.h" NSS_GETHOSTBYNAME_PROTOTYPES(resolve); NSS_GETHOSTBYADDR_PROTOTYPES(resolve); diff --git a/src/grp-resolve/systemd-resolved/Makefile b/src/grp-resolve/systemd-resolved/Makefile index e18b1b3d90..33b53fedef 100644 --- a/src/grp-resolve/systemd-resolved/Makefile +++ b/src/grp-resolve/systemd-resolved/Makefile @@ -24,16 +24,13 @@ include $(dir $(lastword $(MAKEFILE_LIST)))/../../../config.mk include $(topsrcdir)/build-aux/Makefile.head.mk -$(outdir)/dns_type-list.txt: src/resolve/dns-type.h - $(AM_V_at)$(MKDIR_P) $(dir $@) +$(outdir)/dns_type-list.txt: $(srcdir)/dns-type.h $(AM_V_GEN)$(SED) -n -r 's/.* DNS_TYPE_(\w+).*/\1/p' <$< >$@ -$(outdir)/dns_type-to-name.h: src/resolve/dns_type-list.txt - $(AM_V_at)$(MKDIR_P) $(dir $@) +$(outdir)/dns_type-to-name.h: $(outdir)/dns_type-list.txt $(AM_V_GEN)$(AWK) 'BEGIN{ print "const char *dns_type_to_string(int type) {\n\tswitch(type) {" } {printf " case DNS_TYPE_%s: return ", $$1; sub(/_/, "-"); printf "\"%s\";\n", $$1 } END{ print " default: return NULL;\n\t}\n}\n" }' <$< >$@ -$(outdir)/dns_type-from-name.gperf: src/resolve/dns_type-list.txt - $(AM_V_at)$(MKDIR_P) $(dir $@) +$(outdir)/dns_type-from-name.gperf: $(outdir)/dns_type-list.txt $(AM_V_GEN)$(AWK) 'BEGIN{ print "struct dns_type_name { const char* name; int id; };"; print "%null-strings"; print "%%";} { s=$$1; sub(/_/, "-", s); printf "%s, ", $$s; printf "DNS_TYPE_%s\n", $$1 }' <$< >$@ ifneq ($(ENABLE_RESOLVED),) @@ -224,4 +221,8 @@ EXTRA_DIST += \ units/systemd-resolved.service.m4.in \ src/resolve/resolved.conf.in + +$(outdir)/dns-type.o: $(outdir)/dns_type-from-name.h $(outdir)/dns_type-to-name.h +systemd.CPPFLAGS += -DPKGSYSCONFDIR=\"$(pkgsysconfdir)\" + include $(topsrcdir)/build-aux/Makefile.tail.mk diff --git a/src/grp-resolve/systemd-resolved/dns-type.c b/src/grp-resolve/systemd-resolved/dns-type.c index 78d9d5733f..1aa9424222 100644 --- a/src/grp-resolve/systemd-resolved/dns-type.c +++ b/src/grp-resolve/systemd-resolved/dns-type.c @@ -20,8 +20,8 @@ #include <sys/socket.h> #include "dns-type.h" -#include "parse-util.h" -#include "string-util.h" +#include "basic/parse-util.h" +#include "basic/string-util.h" typedef const struct { uint16_t type; diff --git a/src/grp-resolve/systemd-resolved/dns-type.h b/src/grp-resolve/systemd-resolved/dns-type.h index 7b79d29d7e..a8ee105e16 100644 --- a/src/grp-resolve/systemd-resolved/dns-type.h +++ b/src/grp-resolve/systemd-resolved/dns-type.h @@ -19,7 +19,7 @@ along with systemd; If not, see <http://www.gnu.org/licenses/>. ***/ -#include "macro.h" +#include "basic/macro.h" /* DNS record types, taken from * http://www.iana.org/assignments/dns-parameters/dns-parameters.xhtml. diff --git a/src/grp-resolve/systemd-resolved/gcrypt-util.c b/src/grp-resolve/systemd-resolved/gcrypt-util.c new file mode 120000 index 0000000000..5b2fae92e2 --- /dev/null +++ b/src/grp-resolve/systemd-resolved/gcrypt-util.c @@ -0,0 +1 @@ +../../libshared/src/gcrypt-util.c
\ No newline at end of file diff --git a/src/grp-resolve/systemd-resolved/gcrypt-util.h b/src/grp-resolve/systemd-resolved/gcrypt-util.h new file mode 120000 index 0000000000..e1ad70b84f --- /dev/null +++ b/src/grp-resolve/systemd-resolved/gcrypt-util.h @@ -0,0 +1 @@ +../../libshared/include/shared/gcrypt-util.h
\ No newline at end of file diff --git a/src/grp-resolve/systemd-resolved/resolve-tool.c b/src/grp-resolve/systemd-resolved/resolve-tool.c index fbf7b0e4f6..f140820e0f 100644 --- a/src/grp-resolve/systemd-resolved/resolve-tool.c +++ b/src/grp-resolve/systemd-resolved/resolve-tool.c @@ -22,17 +22,17 @@ #include <systemd/sd-bus.h> -#include "af-list.h" -#include "alloc-util.h" -#include "bus-error.h" -#include "bus-util.h" -#include "escape.h" -#include "in-addr-util.h" -#include "gcrypt-util.h" -#include "parse-util.h" +#include "basic/af-list.h" +#include "basic/alloc-util.h" +#include "sd-bus/bus-error.h" +#include "shared/bus-util.h" +#include "basic/escape.h" +#include "basic/in-addr-util.h" +#include "shared/gcrypt-util.h" +#include "basic/parse-util.h" #include "resolved-def.h" #include "resolved-dns-packet.h" -#include "terminal-util.h" +#include "basic/terminal-util.h" #define DNS_CALL_TIMEOUT_USEC (45*USEC_PER_SEC) diff --git a/src/grp-resolve/systemd-resolved/resolved-bus.c b/src/grp-resolve/systemd-resolved/resolved-bus.c index 33f7c61557..ff0bcdfef4 100644 --- a/src/grp-resolve/systemd-resolved/resolved-bus.c +++ b/src/grp-resolve/systemd-resolved/resolved-bus.c @@ -17,10 +17,10 @@ along with systemd; If not, see <http://www.gnu.org/licenses/>. ***/ -#include "alloc-util.h" -#include "bus-common-errors.h" -#include "bus-util.h" -#include "dns-domain.h" +#include "basic/alloc-util.h" +#include "sd-bus/bus-common-errors.h" +#include "shared/bus-util.h" +#include "shared/dns-domain.h" #include "resolved-bus.h" #include "resolved-def.h" #include "resolved-dns-synthesize.h" diff --git a/src/grp-resolve/systemd-resolved/resolved-conf.c b/src/grp-resolve/systemd-resolved/resolved-conf.c index 990dc03b60..e22f107419 100644 --- a/src/grp-resolve/systemd-resolved/resolved-conf.c +++ b/src/grp-resolve/systemd-resolved/resolved-conf.c @@ -17,13 +17,13 @@ along with systemd; If not, see <http://www.gnu.org/licenses/>. ***/ -#include "alloc-util.h" -#include "conf-parser.h" -#include "def.h" -#include "extract-word.h" -#include "parse-util.h" +#include "basic/alloc-util.h" +#include "shared/conf-parser.h" +#include "basic/def.h" +#include "basic/extract-word.h" +#include "basic/parse-util.h" #include "resolved-conf.h" -#include "string-util.h" +#include "basic/string-util.h" int manager_add_dns_server_by_string(Manager *m, DnsServerType type, const char *word) { union in_addr_union address; diff --git a/src/grp-resolve/systemd-resolved/resolved-dns-answer.c b/src/grp-resolve/systemd-resolved/resolved-dns-answer.c index 0dadf8b1dd..f9f7e91c1a 100644 --- a/src/grp-resolve/systemd-resolved/resolved-dns-answer.c +++ b/src/grp-resolve/systemd-resolved/resolved-dns-answer.c @@ -17,11 +17,11 @@ along with systemd; If not, see <http://www.gnu.org/licenses/>. ***/ -#include "alloc-util.h" -#include "dns-domain.h" +#include "basic/alloc-util.h" +#include "shared/dns-domain.h" #include "resolved-dns-answer.h" #include "resolved-dns-dnssec.h" -#include "string-util.h" +#include "basic/string-util.h" DnsAnswer *dns_answer_new(unsigned n) { DnsAnswer *a; diff --git a/src/grp-resolve/systemd-resolved/resolved-dns-answer.h b/src/grp-resolve/systemd-resolved/resolved-dns-answer.h index 0679c610f5..b08fef39f5 100644 --- a/src/grp-resolve/systemd-resolved/resolved-dns-answer.h +++ b/src/grp-resolve/systemd-resolved/resolved-dns-answer.h @@ -22,7 +22,7 @@ typedef struct DnsAnswer DnsAnswer; typedef struct DnsAnswerItem DnsAnswerItem; -#include "macro.h" +#include "basic/macro.h" #include "resolved-dns-rr.h" /* A simple array of resource records. We keep track of the diff --git a/src/grp-resolve/systemd-resolved/resolved-dns-cache.c b/src/grp-resolve/systemd-resolved/resolved-dns-cache.c index 77c42d7aad..0527c57e1c 100644 --- a/src/grp-resolve/systemd-resolved/resolved-dns-cache.c +++ b/src/grp-resolve/systemd-resolved/resolved-dns-cache.c @@ -19,13 +19,13 @@ #include <net/if.h> -#include "af-list.h" -#include "alloc-util.h" -#include "dns-domain.h" +#include "basic/af-list.h" +#include "basic/alloc-util.h" +#include "shared/dns-domain.h" #include "resolved-dns-answer.h" #include "resolved-dns-cache.h" #include "resolved-dns-packet.h" -#include "string-util.h" +#include "basic/string-util.h" /* Never cache more than 4K entries. RFC 1536, Section 5 suggests to * leave DNS caches unbounded, but that's crazy. */ diff --git a/src/grp-resolve/systemd-resolved/resolved-dns-cache.h b/src/grp-resolve/systemd-resolved/resolved-dns-cache.h index 2293718e86..e7cdd2e27a 100644 --- a/src/grp-resolve/systemd-resolved/resolved-dns-cache.h +++ b/src/grp-resolve/systemd-resolved/resolved-dns-cache.h @@ -19,10 +19,10 @@ along with systemd; If not, see <http://www.gnu.org/licenses/>. ***/ -#include "hashmap.h" -#include "list.h" -#include "prioq.h" -#include "time-util.h" +#include "basic/hashmap.h" +#include "basic/list.h" +#include "basic/prioq.h" +#include "basic/time-util.h" typedef struct DnsCache { Hashmap *by_key; diff --git a/src/grp-resolve/systemd-resolved/resolved-dns-dnssec.c b/src/grp-resolve/systemd-resolved/resolved-dns-dnssec.c index a54aed3a63..39afbada25 100644 --- a/src/grp-resolve/systemd-resolved/resolved-dns-dnssec.c +++ b/src/grp-resolve/systemd-resolved/resolved-dns-dnssec.c @@ -21,13 +21,13 @@ #include <gcrypt.h> #endif -#include "alloc-util.h" -#include "dns-domain.h" -#include "gcrypt-util.h" -#include "hexdecoct.h" +#include "basic/alloc-util.h" +#include "shared/dns-domain.h" +#include "shared/gcrypt-util.h" +#include "basic/hexdecoct.h" #include "resolved-dns-dnssec.h" #include "resolved-dns-packet.h" -#include "string-table.h" +#include "basic/string-table.h" #define VERIFY_RRS_MAX 256 #define MAX_KEY_SIZE (32*1024) diff --git a/src/grp-resolve/systemd-resolved/resolved-dns-dnssec.h b/src/grp-resolve/systemd-resolved/resolved-dns-dnssec.h index 77bd4d71bf..c2ebff767f 100644 --- a/src/grp-resolve/systemd-resolved/resolved-dns-dnssec.h +++ b/src/grp-resolve/systemd-resolved/resolved-dns-dnssec.h @@ -22,7 +22,7 @@ typedef enum DnssecResult DnssecResult; typedef enum DnssecVerdict DnssecVerdict; -#include "dns-domain.h" +#include "shared/dns-domain.h" #include "resolved-dns-answer.h" #include "resolved-dns-rr.h" diff --git a/src/grp-resolve/systemd-resolved/resolved-dns-packet.c b/src/grp-resolve/systemd-resolved/resolved-dns-packet.c index b7907bb511..b379b2bb97 100644 --- a/src/grp-resolve/systemd-resolved/resolved-dns-packet.c +++ b/src/grp-resolve/systemd-resolved/resolved-dns-packet.c @@ -17,14 +17,14 @@ along with systemd; If not, see <http://www.gnu.org/licenses/>. ***/ -#include "alloc-util.h" -#include "dns-domain.h" +#include "basic/alloc-util.h" +#include "shared/dns-domain.h" #include "resolved-dns-packet.h" -#include "string-table.h" -#include "strv.h" -#include "unaligned.h" -#include "utf8.h" -#include "util.h" +#include "basic/string-table.h" +#include "basic/strv.h" +#include "basic/unaligned.h" +#include "basic/utf8.h" +#include "basic/util.h" #define EDNS0_OPT_DO (1<<15) diff --git a/src/grp-resolve/systemd-resolved/resolved-dns-packet.h b/src/grp-resolve/systemd-resolved/resolved-dns-packet.h index 416335d0a2..4b9916d8ba 100644 --- a/src/grp-resolve/systemd-resolved/resolved-dns-packet.h +++ b/src/grp-resolve/systemd-resolved/resolved-dns-packet.h @@ -22,10 +22,10 @@ #include <netinet/ip.h> #include <netinet/udp.h> -#include "hashmap.h" -#include "in-addr-util.h" -#include "macro.h" -#include "sparse-endian.h" +#include "basic/hashmap.h" +#include "basic/in-addr-util.h" +#include "basic/macro.h" +#include "basic/sparse-endian.h" typedef struct DnsPacketHeader DnsPacketHeader; typedef struct DnsPacket DnsPacket; diff --git a/src/grp-resolve/systemd-resolved/resolved-dns-query.c b/src/grp-resolve/systemd-resolved/resolved-dns-query.c index ea04e58d61..0a62571af7 100644 --- a/src/grp-resolve/systemd-resolved/resolved-dns-query.c +++ b/src/grp-resolve/systemd-resolved/resolved-dns-query.c @@ -17,15 +17,15 @@ along with systemd; If not, see <http://www.gnu.org/licenses/>. ***/ -#include "alloc-util.h" -#include "dns-domain.h" +#include "basic/alloc-util.h" +#include "shared/dns-domain.h" #include "dns-type.h" -#include "hostname-util.h" -#include "local-addresses.h" +#include "basic/hostname-util.h" +#include "sd-netlink/local-addresses.h" #include "resolved-dns-query.h" #include "resolved-dns-synthesize.h" #include "resolved-etc-hosts.h" -#include "string-util.h" +#include "basic/string-util.h" /* How long to wait for the query in total */ #define QUERY_TIMEOUT_USEC (30 * USEC_PER_SEC) diff --git a/src/grp-resolve/systemd-resolved/resolved-dns-query.h b/src/grp-resolve/systemd-resolved/resolved-dns-query.h index 7f7c76ff20..788d303165 100644 --- a/src/grp-resolve/systemd-resolved/resolved-dns-query.h +++ b/src/grp-resolve/systemd-resolved/resolved-dns-query.h @@ -22,7 +22,7 @@ #include <systemd/sd-bus.h> -#include "set.h" +#include "basic/set.h" typedef struct DnsQueryCandidate DnsQueryCandidate; typedef struct DnsQuery DnsQuery; diff --git a/src/grp-resolve/systemd-resolved/resolved-dns-question.c b/src/grp-resolve/systemd-resolved/resolved-dns-question.c index c8b502d1cd..cdbbecc488 100644 --- a/src/grp-resolve/systemd-resolved/resolved-dns-question.c +++ b/src/grp-resolve/systemd-resolved/resolved-dns-question.c @@ -17,8 +17,8 @@ along with systemd; If not, see <http://www.gnu.org/licenses/>. ***/ -#include "alloc-util.h" -#include "dns-domain.h" +#include "basic/alloc-util.h" +#include "shared/dns-domain.h" #include "dns-type.h" #include "resolved-dns-question.h" diff --git a/src/grp-resolve/systemd-resolved/resolved-dns-question.h b/src/grp-resolve/systemd-resolved/resolved-dns-question.h index ea41478975..68f9e019b6 100644 --- a/src/grp-resolve/systemd-resolved/resolved-dns-question.h +++ b/src/grp-resolve/systemd-resolved/resolved-dns-question.h @@ -21,7 +21,7 @@ typedef struct DnsQuestion DnsQuestion; -#include "macro.h" +#include "basic/macro.h" #include "resolved-dns-rr.h" /* A simple array of resource keys */ diff --git a/src/grp-resolve/systemd-resolved/resolved-dns-rr.c b/src/grp-resolve/systemd-resolved/resolved-dns-rr.c index 6a29a93a26..e53b2c1831 100644 --- a/src/grp-resolve/systemd-resolved/resolved-dns-rr.c +++ b/src/grp-resolve/systemd-resolved/resolved-dns-rr.c @@ -19,18 +19,18 @@ #include <math.h> -#include "alloc-util.h" -#include "dns-domain.h" +#include "basic/alloc-util.h" +#include "shared/dns-domain.h" #include "dns-type.h" -#include "escape.h" -#include "hexdecoct.h" +#include "basic/escape.h" +#include "basic/hexdecoct.h" #include "resolved-dns-dnssec.h" #include "resolved-dns-packet.h" #include "resolved-dns-rr.h" -#include "string-table.h" -#include "string-util.h" -#include "strv.h" -#include "terminal-util.h" +#include "basic/string-table.h" +#include "basic/string-util.h" +#include "basic/strv.h" +#include "basic/terminal-util.h" DnsResourceKey* dns_resource_key_new(uint16_t class, uint16_t type, const char *name) { DnsResourceKey *k; diff --git a/src/grp-resolve/systemd-resolved/resolved-dns-rr.h b/src/grp-resolve/systemd-resolved/resolved-dns-rr.h index 020a2abd77..b919de63ef 100644 --- a/src/grp-resolve/systemd-resolved/resolved-dns-rr.h +++ b/src/grp-resolve/systemd-resolved/resolved-dns-rr.h @@ -21,12 +21,12 @@ #include <netinet/in.h> -#include "bitmap.h" +#include "basic/bitmap.h" #include "dns-type.h" -#include "hashmap.h" -#include "in-addr-util.h" -#include "list.h" -#include "string-util.h" +#include "basic/hashmap.h" +#include "basic/in-addr-util.h" +#include "basic/list.h" +#include "basic/string-util.h" typedef struct DnsResourceKey DnsResourceKey; typedef struct DnsResourceRecord DnsResourceRecord; diff --git a/src/grp-resolve/systemd-resolved/resolved-dns-scope.c b/src/grp-resolve/systemd-resolved/resolved-dns-scope.c index 66e4585c18..98897ff41c 100644 --- a/src/grp-resolve/systemd-resolved/resolved-dns-scope.c +++ b/src/grp-resolve/systemd-resolved/resolved-dns-scope.c @@ -19,18 +19,18 @@ #include <netinet/tcp.h> -#include "af-list.h" -#include "alloc-util.h" -#include "dns-domain.h" -#include "fd-util.h" -#include "hostname-util.h" -#include "missing.h" -#include "random-util.h" +#include "basic/af-list.h" +#include "basic/alloc-util.h" +#include "shared/dns-domain.h" +#include "basic/fd-util.h" +#include "basic/hostname-util.h" +#include "basic/missing.h" +#include "basic/random-util.h" #include "resolved-dns-scope.h" #include "resolved-llmnr.h" #include "resolved-mdns.h" -#include "socket-util.h" -#include "strv.h" +#include "basic/socket-util.h" +#include "basic/strv.h" #define MULTICAST_RATELIMIT_INTERVAL_USEC (1*USEC_PER_SEC) #define MULTICAST_RATELIMIT_BURST 1000 diff --git a/src/grp-resolve/systemd-resolved/resolved-dns-scope.h b/src/grp-resolve/systemd-resolved/resolved-dns-scope.h index 291e5817d0..7bd40781bd 100644 --- a/src/grp-resolve/systemd-resolved/resolved-dns-scope.h +++ b/src/grp-resolve/systemd-resolved/resolved-dns-scope.h @@ -19,7 +19,7 @@ along with systemd; If not, see <http://www.gnu.org/licenses/>. ***/ -#include "list.h" +#include "basic/list.h" typedef struct DnsScope DnsScope; diff --git a/src/grp-resolve/systemd-resolved/resolved-dns-search-domain.c b/src/grp-resolve/systemd-resolved/resolved-dns-search-domain.c index 732471027b..d3b8bf3b4d 100644 --- a/src/grp-resolve/systemd-resolved/resolved-dns-search-domain.c +++ b/src/grp-resolve/systemd-resolved/resolved-dns-search-domain.c @@ -17,8 +17,8 @@ along with systemd; If not, see <http://www.gnu.org/licenses/>. ***/ -#include "alloc-util.h" -#include "dns-domain.h" +#include "basic/alloc-util.h" +#include "shared/dns-domain.h" #include "resolved-dns-search-domain.h" int dns_search_domain_new( diff --git a/src/grp-resolve/systemd-resolved/resolved-dns-search-domain.h b/src/grp-resolve/systemd-resolved/resolved-dns-search-domain.h index eaacef4edc..f047941db2 100644 --- a/src/grp-resolve/systemd-resolved/resolved-dns-search-domain.h +++ b/src/grp-resolve/systemd-resolved/resolved-dns-search-domain.h @@ -19,7 +19,7 @@ along with systemd; If not, see <http://www.gnu.org/licenses/>. ***/ -#include "macro.h" +#include "basic/macro.h" typedef struct DnsSearchDomain DnsSearchDomain; diff --git a/src/grp-resolve/systemd-resolved/resolved-dns-server.c b/src/grp-resolve/systemd-resolved/resolved-dns-server.c index dedc9beb19..c8c898a866 100644 --- a/src/grp-resolve/systemd-resolved/resolved-dns-server.c +++ b/src/grp-resolve/systemd-resolved/resolved-dns-server.c @@ -19,12 +19,12 @@ #include <systemd/sd-messages.h> -#include "alloc-util.h" +#include "basic/alloc-util.h" #include "resolved-dns-server.h" #include "resolved-resolv-conf.h" -#include "siphash24.h" -#include "string-table.h" -#include "string-util.h" +#include "basic/siphash24.h" +#include "basic/string-table.h" +#include "basic/string-util.h" /* After how much time to repeat classic DNS requests */ #define DNS_TIMEOUT_MIN_USEC (500 * USEC_PER_MSEC) diff --git a/src/grp-resolve/systemd-resolved/resolved-dns-server.h b/src/grp-resolve/systemd-resolved/resolved-dns-server.h index 9f4a69c37a..2855c97faa 100644 --- a/src/grp-resolve/systemd-resolved/resolved-dns-server.h +++ b/src/grp-resolve/systemd-resolved/resolved-dns-server.h @@ -19,7 +19,7 @@ along with systemd; If not, see <http://www.gnu.org/licenses/>. ***/ -#include "in-addr-util.h" +#include "basic/in-addr-util.h" typedef struct DnsServer DnsServer; diff --git a/src/grp-resolve/systemd-resolved/resolved-dns-stream.c b/src/grp-resolve/systemd-resolved/resolved-dns-stream.c index a1040aeff4..4df19e7957 100644 --- a/src/grp-resolve/systemd-resolved/resolved-dns-stream.c +++ b/src/grp-resolve/systemd-resolved/resolved-dns-stream.c @@ -19,10 +19,10 @@ #include <netinet/tcp.h> -#include "alloc-util.h" -#include "fd-util.h" -#include "io-util.h" -#include "missing.h" +#include "basic/alloc-util.h" +#include "basic/fd-util.h" +#include "basic/io-util.h" +#include "basic/missing.h" #include "resolved-dns-stream.h" #define DNS_STREAM_TIMEOUT_USEC (10 * USEC_PER_SEC) diff --git a/src/grp-resolve/systemd-resolved/resolved-dns-stream.h b/src/grp-resolve/systemd-resolved/resolved-dns-stream.h index 5ccc842249..13879bcec6 100644 --- a/src/grp-resolve/systemd-resolved/resolved-dns-stream.h +++ b/src/grp-resolve/systemd-resolved/resolved-dns-stream.h @@ -19,7 +19,7 @@ along with systemd; If not, see <http://www.gnu.org/licenses/>. ***/ -#include "socket-util.h" +#include "basic/socket-util.h" typedef struct DnsStream DnsStream; diff --git a/src/grp-resolve/systemd-resolved/resolved-dns-synthesize.c b/src/grp-resolve/systemd-resolved/resolved-dns-synthesize.c index e3003411f7..9d7c483271 100644 --- a/src/grp-resolve/systemd-resolved/resolved-dns-synthesize.c +++ b/src/grp-resolve/systemd-resolved/resolved-dns-synthesize.c @@ -17,9 +17,9 @@ along with systemd; If not, see <http://www.gnu.org/licenses/>. ***/ -#include "alloc-util.h" -#include "hostname-util.h" -#include "local-addresses.h" +#include "basic/alloc-util.h" +#include "basic/hostname-util.h" +#include "sd-netlink/local-addresses.h" #include "resolved-dns-synthesize.h" int dns_synthesize_ifindex(int ifindex) { diff --git a/src/grp-resolve/systemd-resolved/resolved-dns-transaction.c b/src/grp-resolve/systemd-resolved/resolved-dns-transaction.c index 1b4b2b804b..abaa11d803 100644 --- a/src/grp-resolve/systemd-resolved/resolved-dns-transaction.c +++ b/src/grp-resolve/systemd-resolved/resolved-dns-transaction.c @@ -19,16 +19,16 @@ #include <systemd/sd-messages.h> -#include "af-list.h" -#include "alloc-util.h" -#include "dns-domain.h" -#include "errno-list.h" -#include "fd-util.h" -#include "random-util.h" +#include "basic/af-list.h" +#include "basic/alloc-util.h" +#include "shared/dns-domain.h" +#include "basic/errno-list.h" +#include "basic/fd-util.h" +#include "basic/random-util.h" #include "resolved-dns-cache.h" #include "resolved-dns-transaction.h" #include "resolved-llmnr.h" -#include "string-table.h" +#include "basic/string-table.h" #define TRANSACTIONS_MAX 4096 diff --git a/src/grp-resolve/systemd-resolved/resolved-dns-trust-anchor.c b/src/grp-resolve/systemd-resolved/resolved-dns-trust-anchor.c index 0972792341..f810c82848 100644 --- a/src/grp-resolve/systemd-resolved/resolved-dns-trust-anchor.c +++ b/src/grp-resolve/systemd-resolved/resolved-dns-trust-anchor.c @@ -19,19 +19,19 @@ #include <systemd/sd-messages.h> -#include "alloc-util.h" -#include "conf-files.h" -#include "def.h" -#include "dns-domain.h" -#include "fd-util.h" -#include "fileio.h" -#include "hexdecoct.h" -#include "parse-util.h" +#include "basic/alloc-util.h" +#include "basic/conf-files.h" +#include "basic/def.h" +#include "shared/dns-domain.h" +#include "basic/fd-util.h" +#include "basic/fileio.h" +#include "basic/hexdecoct.h" +#include "basic/parse-util.h" #include "resolved-dns-trust-anchor.h" #include "resolved-dns-dnssec.h" -#include "set.h" -#include "string-util.h" -#include "strv.h" +#include "basic/set.h" +#include "basic/string-util.h" +#include "basic/strv.h" static const char trust_anchor_dirs[] = CONF_PATHS_NULSTR("dnssec-trust-anchors.d"); diff --git a/src/grp-resolve/systemd-resolved/resolved-dns-trust-anchor.h b/src/grp-resolve/systemd-resolved/resolved-dns-trust-anchor.h index 635c75fde5..f252628822 100644 --- a/src/grp-resolve/systemd-resolved/resolved-dns-trust-anchor.h +++ b/src/grp-resolve/systemd-resolved/resolved-dns-trust-anchor.h @@ -21,7 +21,7 @@ typedef struct DnsTrustAnchor DnsTrustAnchor; -#include "hashmap.h" +#include "basic/hashmap.h" #include "resolved-dns-answer.h" #include "resolved-dns-rr.h" diff --git a/src/grp-resolve/systemd-resolved/resolved-dns-zone.c b/src/grp-resolve/systemd-resolved/resolved-dns-zone.c index 850eed8cb8..97048c45d1 100644 --- a/src/grp-resolve/systemd-resolved/resolved-dns-zone.c +++ b/src/grp-resolve/systemd-resolved/resolved-dns-zone.c @@ -17,12 +17,12 @@ along with systemd; If not, see <http://www.gnu.org/licenses/>. ***/ -#include "alloc-util.h" -#include "dns-domain.h" -#include "list.h" +#include "basic/alloc-util.h" +#include "shared/dns-domain.h" +#include "basic/list.h" #include "resolved-dns-packet.h" #include "resolved-dns-zone.h" -#include "string-util.h" +#include "basic/string-util.h" /* Never allow more than 1K entries */ #define ZONE_MAX 1024 diff --git a/src/grp-resolve/systemd-resolved/resolved-dns-zone.h b/src/grp-resolve/systemd-resolved/resolved-dns-zone.h index 408833c359..baddbc78ec 100644 --- a/src/grp-resolve/systemd-resolved/resolved-dns-zone.h +++ b/src/grp-resolve/systemd-resolved/resolved-dns-zone.h @@ -19,7 +19,7 @@ along with systemd; If not, see <http://www.gnu.org/licenses/>. ***/ -#include "hashmap.h" +#include "basic/hashmap.h" typedef struct DnsZone { Hashmap *by_key; diff --git a/src/grp-resolve/systemd-resolved/resolved-etc-hosts.c b/src/grp-resolve/systemd-resolved/resolved-etc-hosts.c index 40d650949d..c5370129a6 100644 --- a/src/grp-resolve/systemd-resolved/resolved-etc-hosts.c +++ b/src/grp-resolve/systemd-resolved/resolved-etc-hosts.c @@ -17,14 +17,14 @@ along with systemd; If not, see <http://www.gnu.org/licenses/>. ***/ -#include "fd-util.h" -#include "fileio.h" -#include "hostname-util.h" +#include "basic/fd-util.h" +#include "basic/fileio.h" +#include "basic/hostname-util.h" #include "resolved-etc-hosts.h" #include "resolved-dns-synthesize.h" -#include "string-util.h" -#include "strv.h" -#include "time-util.h" +#include "basic/string-util.h" +#include "basic/strv.h" +#include "basic/time-util.h" /* Recheck /etc/hosts at most once every 2s */ #define ETC_HOSTS_RECHECK_USEC (2*USEC_PER_SEC) diff --git a/src/grp-resolve/systemd-resolved/resolved-gperf.gperf b/src/grp-resolve/systemd-resolved/resolved-gperf.gperf index 82f26215df..5d1c209c35 100644 --- a/src/grp-resolve/systemd-resolved/resolved-gperf.gperf +++ b/src/grp-resolve/systemd-resolved/resolved-gperf.gperf @@ -1,6 +1,6 @@ %{ #include <stddef.h> -#include "conf-parser.h" +#include "shared/conf-parser.h" #include "resolved-conf.h" %} struct ConfigPerfItem; diff --git a/src/grp-resolve/systemd-resolved/resolved-link-bus.c b/src/grp-resolve/systemd-resolved/resolved-link-bus.c index 7f21891819..3c0c032fac 100644 --- a/src/grp-resolve/systemd-resolved/resolved-link-bus.c +++ b/src/grp-resolve/systemd-resolved/resolved-link-bus.c @@ -17,13 +17,13 @@ along with systemd; If not, see <http://www.gnu.org/licenses/>. ***/ -#include "alloc-util.h" -#include "bus-util.h" -#include "parse-util.h" -#include "resolve-util.h" +#include "basic/alloc-util.h" +#include "shared/bus-util.h" +#include "basic/parse-util.h" +#include "shared/resolve-util.h" #include "resolved-bus.h" #include "resolved-link-bus.h" -#include "strv.h" +#include "basic/strv.h" static BUS_DEFINE_PROPERTY_GET_ENUM(property_get_resolve_support, resolve_support, ResolveSupport); static BUS_DEFINE_PROPERTY_GET_ENUM(property_get_dnssec_mode, dnssec_mode, DnssecMode); diff --git a/src/grp-resolve/systemd-resolved/resolved-link.c b/src/grp-resolve/systemd-resolved/resolved-link.c index 4eef20599a..6172a763dc 100644 --- a/src/grp-resolve/systemd-resolved/resolved-link.c +++ b/src/grp-resolve/systemd-resolved/resolved-link.c @@ -21,12 +21,12 @@ #include <systemd/sd-network.h> -#include "alloc-util.h" -#include "missing.h" -#include "parse-util.h" +#include "basic/alloc-util.h" +#include "basic/missing.h" +#include "basic/parse-util.h" #include "resolved-link.h" -#include "string-util.h" -#include "strv.h" +#include "basic/string-util.h" +#include "basic/strv.h" int link_new(Manager *m, Link **ret, int ifindex) { _cleanup_(link_freep) Link *l = NULL; diff --git a/src/grp-resolve/systemd-resolved/resolved-link.h b/src/grp-resolve/systemd-resolved/resolved-link.h index f534c12824..cc4f4f59d7 100644 --- a/src/grp-resolve/systemd-resolved/resolved-link.h +++ b/src/grp-resolve/systemd-resolved/resolved-link.h @@ -21,9 +21,9 @@ #include <net/if.h> -#include "in-addr-util.h" -#include "ratelimit.h" -#include "resolve-util.h" +#include "basic/in-addr-util.h" +#include "basic/ratelimit.h" +#include "shared/resolve-util.h" typedef struct Link Link; typedef struct LinkAddress LinkAddress; diff --git a/src/grp-resolve/systemd-resolved/resolved-llmnr.c b/src/grp-resolve/systemd-resolved/resolved-llmnr.c index 8b1d71a3eb..4b303b6686 100644 --- a/src/grp-resolve/systemd-resolved/resolved-llmnr.c +++ b/src/grp-resolve/systemd-resolved/resolved-llmnr.c @@ -20,7 +20,7 @@ #include <netinet/in.h> #include <resolv.h> -#include "fd-util.h" +#include "basic/fd-util.h" #include "resolved-llmnr.h" #include "resolved-manager.h" diff --git a/src/grp-resolve/systemd-resolved/resolved-manager.c b/src/grp-resolve/systemd-resolved/resolved-manager.c index 7166b94d71..b2b3daaf5c 100644 --- a/src/grp-resolve/systemd-resolved/resolved-manager.c +++ b/src/grp-resolve/systemd-resolved/resolved-manager.c @@ -21,18 +21,17 @@ #include <poll.h> #include <sys/ioctl.h> -#include "af-list.h" -#include "alloc-util.h" -#include "dns-domain.h" -#include "fd-util.h" -#include "fileio-label.h" -#include "hostname-util.h" -#include "io-util.h" -#include "netlink-util.h" +#include "basic/af-list.h" +#include "basic/alloc-util.h" +#include "shared/dns-domain.h" +#include "basic/fd-util.h" +#include "basic/fileio-label.h" +#include "basic/hostname-util.h" +#include "basic/io-util.h" #include "network-internal.h" -#include "ordered-set.h" -#include "parse-util.h" -#include "random-util.h" +#include "basic/ordered-set.h" +#include "basic/parse-util.h" +#include "basic/random-util.h" #include "resolved-bus.h" #include "resolved-conf.h" #include "resolved-etc-hosts.h" @@ -40,10 +39,10 @@ #include "resolved-manager.h" #include "resolved-mdns.h" #include "resolved-resolv-conf.h" -#include "socket-util.h" -#include "string-table.h" -#include "string-util.h" -#include "utf8.h" +#include "basic/socket-util.h" +#include "basic/string-table.h" +#include "basic/string-util.h" +#include "basic/utf8.h" #define SEND_TIMEOUT_USEC (200 * USEC_PER_MSEC) diff --git a/src/grp-resolve/systemd-resolved/resolved-manager.h b/src/grp-resolve/systemd-resolved/resolved-manager.h index 8bef2d2b28..1860994463 100644 --- a/src/grp-resolve/systemd-resolved/resolved-manager.h +++ b/src/grp-resolve/systemd-resolved/resolved-manager.h @@ -23,10 +23,10 @@ #include <systemd/sd-netlink.h> #include <systemd/sd-network.h> -#include "hashmap.h" -#include "list.h" -#include "ordered-set.h" -#include "resolve-util.h" +#include "basic/hashmap.h" +#include "basic/list.h" +#include "basic/ordered-set.h" +#include "shared/resolve-util.h" typedef struct Manager Manager; diff --git a/src/grp-resolve/systemd-resolved/resolved-mdns.c b/src/grp-resolve/systemd-resolved/resolved-mdns.c index b13b1d0144..4ef3f1b37c 100644 --- a/src/grp-resolve/systemd-resolved/resolved-mdns.c +++ b/src/grp-resolve/systemd-resolved/resolved-mdns.c @@ -21,7 +21,7 @@ #include <netinet/in.h> #include <arpa/inet.h> -#include "fd-util.h" +#include "basic/fd-util.h" #include "resolved-manager.h" #include "resolved-mdns.h" diff --git a/src/grp-resolve/systemd-resolved/resolved-resolv-conf.c b/src/grp-resolve/systemd-resolved/resolved-resolv-conf.c index ff03acc772..70f9173c22 100644 --- a/src/grp-resolve/systemd-resolved/resolved-resolv-conf.c +++ b/src/grp-resolve/systemd-resolved/resolved-resolv-conf.c @@ -19,16 +19,16 @@ #include <resolv.h> -#include "alloc-util.h" -#include "dns-domain.h" -#include "fd-util.h" -#include "fileio-label.h" -#include "fileio.h" -#include "ordered-set.h" +#include "basic/alloc-util.h" +#include "shared/dns-domain.h" +#include "basic/fd-util.h" +#include "basic/fileio-label.h" +#include "basic/fileio.h" +#include "basic/ordered-set.h" #include "resolved-conf.h" #include "resolved-resolv-conf.h" -#include "string-util.h" -#include "strv.h" +#include "basic/string-util.h" +#include "basic/strv.h" int manager_read_resolv_conf(Manager *m) { _cleanup_fclose_ FILE *f = NULL; diff --git a/src/grp-resolve/systemd-resolved/resolved.c b/src/grp-resolve/systemd-resolved/resolved.c index 086a2fcac7..a59543d497 100644 --- a/src/grp-resolve/systemd-resolved/resolved.c +++ b/src/grp-resolve/systemd-resolved/resolved.c @@ -20,14 +20,14 @@ #include <systemd/sd-daemon.h> #include <systemd/sd-event.h> -#include "capability-util.h" -#include "mkdir.h" +#include "basic/capability-util.h" +#include "basic/mkdir.h" #include "resolved-conf.h" #include "resolved-manager.h" #include "resolved-resolv-conf.h" -#include "selinux-util.h" -#include "signal-util.h" -#include "user-util.h" +#include "basic/selinux-util.h" +#include "basic/signal-util.h" +#include "basic/user-util.h" int main(int argc, char *argv[]) { _cleanup_(manager_freep) Manager *m = NULL; diff --git a/src/grp-resolve/systemd-resolved/test-dns-packet.c b/src/grp-resolve/systemd-resolved/test-dns-packet.c index c232a69ce1..8749461e8c 100644 --- a/src/grp-resolve/systemd-resolved/test-dns-packet.c +++ b/src/grp-resolve/systemd-resolved/test-dns-packet.c @@ -20,15 +20,15 @@ #include <net/if.h> #include <glob.h> -#include "alloc-util.h" -#include "fileio.h" -#include "glob-util.h" -#include "log.h" -#include "macro.h" +#include "basic/alloc-util.h" +#include "basic/fileio.h" +#include "basic/glob-util.h" +#include "basic/log.h" +#include "basic/macro.h" #include "resolved-dns-packet.h" #include "resolved-dns-rr.h" -#include "string-util.h" -#include "strv.h" +#include "basic/string-util.h" +#include "basic/strv.h" #define HASH_KEY SD_ID128_MAKE(d3,1e,48,90,4b,fa,4c,fe,af,9d,d5,a1,d7,2e,8a,b1) diff --git a/src/grp-resolve/systemd-resolved/test-dnssec-complex.c b/src/grp-resolve/systemd-resolved/test-dnssec-complex.c index 568400ac77..9662a99409 100644 --- a/src/grp-resolve/systemd-resolved/test-dnssec-complex.c +++ b/src/grp-resolve/systemd-resolved/test-dnssec-complex.c @@ -21,13 +21,13 @@ #include <systemd/sd-bus.h> -#include "af-list.h" -#include "alloc-util.h" +#include "basic/af-list.h" +#include "basic/alloc-util.h" #include "bus-common-errors.h" #include "dns-type.h" -#include "random-util.h" -#include "string-util.h" -#include "time-util.h" +#include "basic/random-util.h" +#include "basic/string-util.h" +#include "basic/time-util.h" #define DNS_CALL_TIMEOUT_USEC (45*USEC_PER_SEC) diff --git a/src/grp-resolve/systemd-resolved/test-dnssec.c b/src/grp-resolve/systemd-resolved/test-dnssec.c index b3018e8239..8e1fbad074 100644 --- a/src/grp-resolve/systemd-resolved/test-dnssec.c +++ b/src/grp-resolve/systemd-resolved/test-dnssec.c @@ -21,11 +21,11 @@ #include <netinet/in.h> #include <sys/socket.h> -#include "alloc-util.h" +#include "basic/alloc-util.h" #include "resolved-dns-dnssec.h" #include "resolved-dns-rr.h" -#include "string-util.h" -#include "hexdecoct.h" +#include "basic/string-util.h" +#include "basic/hexdecoct.h" static void test_dnssec_canonicalize_one(const char *original, const char *canonical, int r) { char canonicalized[DNSSEC_CANONICAL_HOSTNAME_MAX]; diff --git a/src/grp-resolve/systemd-resolved/test-resolve-tables.c b/src/grp-resolve/systemd-resolved/test-resolve-tables.c index 2d615130e1..0307c6485f 100644 --- a/src/grp-resolve/systemd-resolved/test-resolve-tables.c +++ b/src/grp-resolve/systemd-resolved/test-resolve-tables.c @@ -18,7 +18,7 @@ ***/ #include "dns-type.h" -#include "test-tables.h" +#include "shared/test-tables.h" int main(int argc, char **argv) { uint16_t i; diff --git a/src/grp-system/systemctl/systemctl.c b/src/grp-system/systemctl/systemctl.c index c7c00bbbc3..b9b1c8400b 100644 --- a/src/grp-system/systemctl/systemctl.c +++ b/src/grp-system/systemctl/systemctl.c @@ -35,55 +35,55 @@ #include <systemd/sd-daemon.h> #include <systemd/sd-login.h> -#include "alloc-util.h" +#include "basic/alloc-util.h" #include "bus-common-errors.h" #include "bus-error.h" #include "bus-message.h" -#include "bus-unit-util.h" -#include "bus-util.h" -#include "cgroup-show.h" -#include "cgroup-util.h" -#include "copy.h" -#include "dropin.h" -#include "efivars.h" -#include "env-util.h" -#include "exit-status.h" -#include "fd-util.h" -#include "fileio.h" -#include "formats-util.h" -#include "fs-util.h" -#include "glob-util.h" -#include "hostname-util.h" -#include "initreq.h" -#include "install.h" -#include "io-util.h" -#include "list.h" -#include "locale-util.h" -#include "log.h" -#include "logs-show.h" -#include "macro.h" -#include "mkdir.h" -#include "pager.h" -#include "parse-util.h" -#include "path-lookup.h" -#include "path-util.h" -#include "process-util.h" -#include "rlimit-util.h" -#include "set.h" -#include "signal-util.h" -#include "socket-util.h" -#include "spawn-ask-password-agent.h" -#include "spawn-polkit-agent.h" -#include "special.h" -#include "stat-util.h" -#include "strv.h" -#include "terminal-util.h" -#include "unit-name.h" -#include "user-util.h" -#include "util.h" -#include "utmp-wtmp.h" -#include "verbs.h" -#include "virt.h" +#include "shared/bus-unit-util.h" +#include "shared/bus-util.h" +#include "shared/cgroup-show.h" +#include "basic/cgroup-util.h" +#include "basic/copy.h" +#include "shared/dropin.h" +#include "shared/efivars.h" +#include "basic/env-util.h" +#include "basic/exit-status.h" +#include "basic/fd-util.h" +#include "basic/fileio.h" +#include "basic/formats-util.h" +#include "basic/fs-util.h" +#include "basic/glob-util.h" +#include "basic/hostname-util.h" +#include "shared/initreq.h" +#include "shared/install.h" +#include "basic/io-util.h" +#include "basic/list.h" +#include "basic/locale-util.h" +#include "basic/log.h" +#include "shared/logs-show.h" +#include "basic/macro.h" +#include "basic/mkdir.h" +#include "shared/pager.h" +#include "basic/parse-util.h" +#include "shared/path-lookup.h" +#include "basic/path-util.h" +#include "basic/process-util.h" +#include "basic/rlimit-util.h" +#include "basic/set.h" +#include "basic/signal-util.h" +#include "basic/socket-util.h" +#include "shared/spawn-ask-password-agent.h" +#include "shared/spawn-polkit-agent.h" +#include "basic/special.h" +#include "basic/stat-util.h" +#include "basic/strv.h" +#include "basic/terminal-util.h" +#include "basic/unit-name.h" +#include "basic/user-util.h" +#include "basic/util.h" +#include "shared/utmp-wtmp.h" +#include "basic/verbs.h" +#include "basic/virt.h" static char **arg_types = NULL; static char **arg_states = NULL; diff --git a/src/grp-system/systemd/main.c b/src/grp-system/systemd/main.c index 042cce49dd..31206f21dc 100644 --- a/src/grp-system/systemd/main.c +++ b/src/grp-system/systemd/main.c @@ -38,53 +38,53 @@ #include <systemd/sd-bus.h> #include <systemd/sd-daemon.h> -#include "alloc-util.h" -#include "architecture.h" -#include "build.h" +#include "basic/alloc-util.h" +#include "basic/architecture.h" +#include "basic/build.h" #include "bus-error.h" -#include "bus-util.h" -#include "capability-util.h" -#include "clock-util.h" -#include "conf-parser.h" -#include "cpu-set-util.h" +#include "shared/bus-util.h" +#include "basic/capability-util.h" +#include "basic/clock-util.h" +#include "shared/conf-parser.h" +#include "basic/cpu-set-util.h" #include "dbus-manager.h" -#include "def.h" -#include "env-util.h" -#include "fd-util.h" -#include "fdset.h" -#include "fileio.h" -#include "formats-util.h" -#include "fs-util.h" +#include "basic/def.h" +#include "basic/env-util.h" +#include "basic/fd-util.h" +#include "basic/fdset.h" +#include "basic/fileio.h" +#include "basic/formats-util.h" +#include "basic/fs-util.h" #include "hostname-setup.h" #include "ima-setup.h" #include "killall.h" #include "kmod-setup.h" #include "load-fragment.h" -#include "log.h" +#include "basic/log.h" #include "loopback-setup.h" #include "machine-id-setup.h" #include "manager.h" -#include "missing.h" +#include "basic/missing.h" #include "mount-setup.h" -#include "pager.h" -#include "parse-util.h" -#include "proc-cmdline.h" -#include "process-util.h" -#include "rlimit-util.h" +#include "shared/pager.h" +#include "basic/parse-util.h" +#include "basic/proc-cmdline.h" +#include "basic/process-util.h" +#include "basic/rlimit-util.h" #include "selinux-setup.h" -#include "selinux-util.h" -#include "signal-util.h" +#include "basic/selinux-util.h" +#include "basic/signal-util.h" #include "smack-setup.h" -#include "special.h" -#include "stat-util.h" -#include "stdio-util.h" -#include "strv.h" -#include "switch-root.h" -#include "terminal-util.h" -#include "umask-util.h" -#include "user-util.h" -#include "virt.h" -#include "watchdog.h" +#include "basic/special.h" +#include "basic/stat-util.h" +#include "basic/stdio-util.h" +#include "basic/strv.h" +#include "shared/switch-root.h" +#include "basic/terminal-util.h" +#include "basic/umask-util.h" +#include "basic/user-util.h" +#include "basic/virt.h" +#include "shared/watchdog.h" static enum { ACTION_RUN, diff --git a/src/grp-timedate/systemd-timedated/timedated.c b/src/grp-timedate/systemd-timedated/timedated.c index 51a13fcf49..2d3f1d4fd2 100644 --- a/src/grp-timedate/systemd-timedated/timedated.c +++ b/src/grp-timedate/systemd-timedated/timedated.c @@ -25,19 +25,19 @@ #include <systemd/sd-event.h> #include <systemd/sd-messages.h> -#include "alloc-util.h" -#include "bus-common-errors.h" -#include "bus-error.h" -#include "bus-util.h" -#include "clock-util.h" -#include "def.h" -#include "fileio-label.h" -#include "fs-util.h" -#include "path-util.h" -#include "selinux-util.h" -#include "strv.h" -#include "user-util.h" -#include "util.h" +#include "basic/alloc-util.h" +#include "sd-bus/bus-common-errors.h" +#include "sd-bus/bus-error.h" +#include "shared/bus-util.h" +#include "basic/clock-util.h" +#include "basic/def.h" +#include "basic/fileio-label.h" +#include "basic/fs-util.h" +#include "basic/path-util.h" +#include "basic/selinux-util.h" +#include "basic/strv.h" +#include "basic/user-util.h" +#include "basic/util.h" #define NULL_ADJTIME_UTC "0.0 0 0\n0\nUTC\n" #define NULL_ADJTIME_LOCAL "0.0 0 0\n0\nLOCAL\n" diff --git a/src/grp-timedate/timedatectl/Makefile b/src/grp-timedate/timedatectl/Makefile index c1be945443..4394bf892b 100644 --- a/src/grp-timedate/timedatectl/Makefile +++ b/src/grp-timedate/timedatectl/Makefile @@ -39,4 +39,5 @@ dist_bashcompletion_data += \ dist_zshcompletion_data += \ shell-completion/zsh/_timedatectl endif # ENABLE_TIMEDATED + include $(topsrcdir)/build-aux/Makefile.tail.mk diff --git a/src/grp-timedate/timedatectl/timedatectl.c b/src/grp-timedate/timedatectl/timedatectl.c index 1fd542fb49..323d2d7d53 100644 --- a/src/grp-timedate/timedatectl/timedatectl.c +++ b/src/grp-timedate/timedatectl/timedatectl.c @@ -25,14 +25,14 @@ #include <systemd/sd-bus.h> -#include "bus-error.h" -#include "bus-util.h" -#include "pager.h" -#include "parse-util.h" -#include "spawn-polkit-agent.h" -#include "strv.h" -#include "terminal-util.h" -#include "util.h" +#include "sd-bus/bus-error.h" +#include "shared/bus-util.h" +#include "shared/pager.h" +#include "basic/parse-util.h" +#include "shared/spawn-polkit-agent.h" +#include "basic/strv.h" +#include "basic/terminal-util.h" +#include "basic/util.h" static bool arg_no_pager = false; static bool arg_ask_password = true; diff --git a/src/grp-udev/Makefile b/src/grp-udev/Makefile index cc85f0317f..f6c3b1ceb4 100644 --- a/src/grp-udev/Makefile +++ b/src/grp-udev/Makefile @@ -69,4 +69,7 @@ SYSINIT_TARGET_WANTS += \ systemd-udevd.service \ systemd-udev-trigger.service +at.subdirs += systemd-udevd udevadm +at.subdirs += ata_id cdrom_id collect mtd_probe scsi_id v4l_id + include $(topsrcdir)/build-aux/Makefile.tail.mk diff --git a/src/grp-udev/ata_id/ata_id.c b/src/grp-udev/ata_id/ata_id.c index 1e414664ce..962332c0ad 100644 --- a/src/grp-udev/ata_id/ata_id.c +++ b/src/grp-udev/ata_id/ata_id.c @@ -39,10 +39,10 @@ #include "libudev.h" -#include "fd-util.h" +#include "basic/fd-util.h" #include "libudev-private.h" -#include "log.h" -#include "udev-util.h" +#include "basic/log.h" +#include "shared/udev-util.h" #define COMMAND_TIMEOUT_MSEC (30 * 1000) diff --git a/src/grp-udev/cdrom_id/cdrom_id.c b/src/grp-udev/cdrom_id/cdrom_id.c index 72f284f710..1e9c75acfd 100644 --- a/src/grp-udev/cdrom_id/cdrom_id.c +++ b/src/grp-udev/cdrom_id/cdrom_id.c @@ -37,7 +37,7 @@ #include "libudev.h" #include "libudev-private.h" -#include "random-util.h" +#include "basic/random-util.h" /* device info */ static unsigned int cd_cd_rom; diff --git a/src/grp-udev/collect/collect.c b/src/grp-udev/collect/collect.c index 349585b634..0ad6c4ca43 100644 --- a/src/grp-udev/collect/collect.c +++ b/src/grp-udev/collect/collect.c @@ -24,11 +24,11 @@ #include <stddef.h> #include <stdio.h> -#include "alloc-util.h" +#include "basic/alloc-util.h" #include "libudev-private.h" -#include "macro.h" -#include "stdio-util.h" -#include "string-util.h" +#include "basic/macro.h" +#include "basic/stdio-util.h" +#include "basic/string-util.h" #define BUFSIZE 16 #define UDEV_ALARM_TIMEOUT 180 diff --git a/src/grp-udev/libudev-core/Makefile b/src/grp-udev/libudev-core/Makefile index e95d53120a..d47fbe3257 100644 --- a/src/grp-udev/libudev-core/Makefile +++ b/src/grp-udev/libudev-core/Makefile @@ -38,7 +38,7 @@ $(outdir)/keyboard-keys-from-name.h: $(outdir)/keyboard-keys-from-name.gperf gperf_txt_sources += \ src/udev/keyboard-keys-list.txt -libudev_core_la_SOURCES = \ +_libudev_core_la_SOURCES = \ src/udev/udev.h \ src/udev/udev-event.c \ src/udev/udev-watch.c \ @@ -59,7 +59,7 @@ libudev_core_la_SOURCES = \ src/udev/net/ethtool-util.h \ src/udev/net/ethtool-util.c -nodist_libudev_core_la_SOURCES = \ +_nodist_libudev_core_la_SOURCES = \ src/udev/keyboard-keys-from-name.h \ src/udev/net/link-config-gperf.c @@ -98,4 +98,10 @@ libudev_core_la_SOURCES += \ src/systemd/sd-login.h endif # HAVE_ACL +libudev-core.la.SOURCES = $(patsubst src/udev/%,%,$(filter %.c,$(_libudev_core_la_SOURCES) $(_nodist_libudev_core_la_SOURCES))) +libudev-core.la.DEPENDS = $(addprefix $(outdir)/,$(libudev-core.la.SOURCES:.c=.lo)) +at.subdirs += net +$(outdir)/udev-builtin-keyboard.lo: $(outdir)/keyboard-keys-from-name.h +systemd.CPPFLAGS += -DUDEVLIBEXECDIR=\"$(udevlibexecdir)\" + include $(topsrcdir)/build-aux/Makefile.tail.mk diff --git a/src/grp-udev/libudev-core/logind-acl.c b/src/grp-udev/libudev-core/logind-acl.c new file mode 120000 index 0000000000..9dd626440f --- /dev/null +++ b/src/grp-udev/libudev-core/logind-acl.c @@ -0,0 +1 @@ +../../grp-login/liblogind-core/logind-acl.c
\ No newline at end of file diff --git a/src/grp-udev/libudev-core/logind-acl.h b/src/grp-udev/libudev-core/logind-acl.h new file mode 120000 index 0000000000..60f96cbe0a --- /dev/null +++ b/src/grp-udev/libudev-core/logind-acl.h @@ -0,0 +1 @@ +../../grp-login/liblogind-core/logind-acl.h
\ No newline at end of file diff --git a/src/grp-udev/libudev-core/net/Makefile b/src/grp-udev/libudev-core/net/Makefile new file mode 100644 index 0000000000..153afd5089 --- /dev/null +++ b/src/grp-udev/libudev-core/net/Makefile @@ -0,0 +1,30 @@ +# -*- 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 + +systemd.CPPFLAGS += $(libshared.CPPFLAGS) +systemd.CPPFLAGS += $(libsystemd-network.CPPFLAGS) + +include $(topsrcdir)/build-aux/Makefile.tail.mk diff --git a/src/grp-udev/libudev-core/net/ethtool-util.c b/src/grp-udev/libudev-core/net/ethtool-util.c index c00ff79123..09a3517444 100644 --- a/src/grp-udev/libudev-core/net/ethtool-util.c +++ b/src/grp-udev/libudev-core/net/ethtool-util.c @@ -22,12 +22,12 @@ #include <linux/ethtool.h> #include <linux/sockios.h> -#include "conf-parser.h" +#include "shared/conf-parser.h" #include "ethtool-util.h" -#include "log.h" -#include "string-table.h" -#include "strxcpyx.h" -#include "util.h" +#include "basic/log.h" +#include "basic/string-table.h" +#include "basic/strxcpyx.h" +#include "basic/util.h" static const char* const duplex_table[_DUP_MAX] = { [DUP_FULL] = "full", diff --git a/src/grp-udev/libudev-core/net/ethtool-util.h b/src/grp-udev/libudev-core/net/ethtool-util.h index 7716516e76..7d103d9f2f 100644 --- a/src/grp-udev/libudev-core/net/ethtool-util.h +++ b/src/grp-udev/libudev-core/net/ethtool-util.h @@ -19,7 +19,7 @@ along with systemd; If not, see <http://www.gnu.org/licenses/>. ***/ -#include <macro.h> +#include "basic/macro.h" /* we can't use DUPLEX_ prefix, as it * clashes with <linux/ethtool.h> */ diff --git a/src/grp-udev/libudev-core/net/link-config-gperf.gperf b/src/grp-udev/libudev-core/net/link-config-gperf.gperf index b25e4b3344..46fa4ed03d 100644 --- a/src/grp-udev/libudev-core/net/link-config-gperf.gperf +++ b/src/grp-udev/libudev-core/net/link-config-gperf.gperf @@ -1,6 +1,6 @@ %{ #include <stddef.h> -#include "conf-parser.h" +#include "shared/conf-parser.h" #include "network-internal.h" #include "link-config.h" #include "ethtool-util.h" diff --git a/src/grp-udev/libudev-core/net/link-config.c b/src/grp-udev/libudev-core/net/link-config.c index 350cd24e9c..872b9ba209 100644 --- a/src/grp-udev/libudev-core/net/link-config.c +++ b/src/grp-udev/libudev-core/net/link-config.c @@ -21,26 +21,26 @@ #include <systemd/sd-netlink.h> -#include "alloc-util.h" -#include "conf-files.h" -#include "conf-parser.h" +#include "basic/alloc-util.h" +#include "basic/conf-files.h" +#include "shared/conf-parser.h" #include "ethtool-util.h" -#include "fd-util.h" +#include "basic/fd-util.h" #include "libudev-private.h" #include "link-config.h" -#include "log.h" -#include "missing.h" -#include "netlink-util.h" +#include "basic/log.h" +#include "basic/missing.h" +#include "sd-netlink/netlink-util.h" #include "network-internal.h" -#include "parse-util.h" -#include "path-util.h" -#include "proc-cmdline.h" -#include "random-util.h" -#include "stat-util.h" -#include "string-table.h" -#include "string-util.h" -#include "strv.h" -#include "util.h" +#include "basic/parse-util.h" +#include "basic/path-util.h" +#include "basic/proc-cmdline.h" +#include "basic/random-util.h" +#include "basic/stat-util.h" +#include "basic/string-table.h" +#include "basic/string-util.h" +#include "basic/strv.h" +#include "basic/util.h" struct link_config_ctx { LIST_HEAD(link_config, links); diff --git a/src/grp-udev/libudev-core/net/link-config.h b/src/grp-udev/libudev-core/net/link-config.h index 9df5529d05..b520e1ee9e 100644 --- a/src/grp-udev/libudev-core/net/link-config.h +++ b/src/grp-udev/libudev-core/net/link-config.h @@ -21,9 +21,9 @@ #include "libudev.h" -#include "condition.h" +#include "shared/condition.h" #include "ethtool-util.h" -#include "list.h" +#include "basic/list.h" typedef struct link_config_ctx link_config_ctx; typedef struct link_config link_config; diff --git a/src/grp-udev/libudev-core/sd-login.c b/src/grp-udev/libudev-core/sd-login.c new file mode 120000 index 0000000000..913dcedc6a --- /dev/null +++ b/src/grp-udev/libudev-core/sd-login.c @@ -0,0 +1 @@ +../../libsystemd/src/sd-login/sd-login.c
\ No newline at end of file diff --git a/src/grp-udev/libudev-core/udev-builtin-blkid.c b/src/grp-udev/libudev-core/udev-builtin-blkid.c index 62cd93264b..b226626e8d 100644 --- a/src/grp-udev/libudev-core/udev-builtin-blkid.c +++ b/src/grp-udev/libudev-core/udev-builtin-blkid.c @@ -29,11 +29,11 @@ #include <systemd/sd-id128.h> -#include "alloc-util.h" -#include "efivars.h" -#include "fd-util.h" -#include "gpt.h" -#include "string-util.h" +#include "basic/alloc-util.h" +#include "shared/efivars.h" +#include "basic/fd-util.h" +#include "shared/gpt.h" +#include "basic/string-util.h" #include "udev.h" static void print_property(struct udev_device *dev, bool test, const char *name, const char *value) { diff --git a/src/grp-udev/libudev-core/udev-builtin-btrfs.c b/src/grp-udev/libudev-core/udev-builtin-btrfs.c index cfaa463804..333229de55 100644 --- a/src/grp-udev/libudev-core/udev-builtin-btrfs.c +++ b/src/grp-udev/libudev-core/udev-builtin-btrfs.c @@ -25,9 +25,9 @@ #include <linux/btrfs.h> #endif -#include "fd-util.h" -#include "missing.h" -#include "string-util.h" +#include "basic/fd-util.h" +#include "basic/missing.h" +#include "basic/string-util.h" #include "udev.h" static int builtin_btrfs(struct udev_device *dev, int argc, char *argv[], bool test) { diff --git a/src/grp-udev/libudev-core/udev-builtin-hwdb.c b/src/grp-udev/libudev-core/udev-builtin-hwdb.c index b96f39ba20..24f4ba0744 100644 --- a/src/grp-udev/libudev-core/udev-builtin-hwdb.c +++ b/src/grp-udev/libudev-core/udev-builtin-hwdb.c @@ -24,10 +24,10 @@ #include <systemd/sd-hwdb.h> -#include "alloc-util.h" -#include "hwdb-util.h" -#include "string-util.h" -#include "udev-util.h" +#include "basic/alloc-util.h" +#include "sd-hwdb/hwdb-util.h" +#include "basic/string-util.h" +#include "shared/udev-util.h" #include "udev.h" static sd_hwdb *hwdb; diff --git a/src/grp-udev/libudev-core/udev-builtin-input_id.c b/src/grp-udev/libudev-core/udev-builtin-input_id.c index 51a55cdbc4..ba2c819bfa 100644 --- a/src/grp-udev/libudev-core/udev-builtin-input_id.c +++ b/src/grp-udev/libudev-core/udev-builtin-input_id.c @@ -30,11 +30,11 @@ #include <linux/limits.h> #include <linux/input.h> -#include "fd-util.h" -#include "stdio-util.h" -#include "string-util.h" +#include "basic/fd-util.h" +#include "basic/stdio-util.h" +#include "basic/string-util.h" #include "udev.h" -#include "util.h" +#include "basic/util.h" /* we must use this kernel-compatible implementation */ #define BITS_PER_LONG (sizeof(unsigned long) * 8) diff --git a/src/grp-udev/libudev-core/udev-builtin-keyboard.c b/src/grp-udev/libudev-core/udev-builtin-keyboard.c index aa10beafb0..f3ea583134 100644 --- a/src/grp-udev/libudev-core/udev-builtin-keyboard.c +++ b/src/grp-udev/libudev-core/udev-builtin-keyboard.c @@ -23,10 +23,10 @@ #include <sys/ioctl.h> #include <linux/input.h> -#include "fd-util.h" -#include "parse-util.h" -#include "stdio-util.h" -#include "string-util.h" +#include "basic/fd-util.h" +#include "basic/parse-util.h" +#include "basic/stdio-util.h" +#include "basic/string-util.h" #include "udev.h" static const struct key *keyboard_lookup_key(const char *str, unsigned len); diff --git a/src/grp-udev/libudev-core/udev-builtin-kmod.c b/src/grp-udev/libudev-core/udev-builtin-kmod.c index 9665f678fd..15d23c0f0e 100644 --- a/src/grp-udev/libudev-core/udev-builtin-kmod.c +++ b/src/grp-udev/libudev-core/udev-builtin-kmod.c @@ -24,7 +24,7 @@ #include <stdio.h> #include <stdlib.h> -#include "string-util.h" +#include "basic/string-util.h" #include "udev.h" static struct kmod_ctx *ctx = NULL; diff --git a/src/grp-udev/libudev-core/udev-builtin-net_id.c b/src/grp-udev/libudev-core/udev-builtin-net_id.c index a7be2a4eed..3441f844be 100644 --- a/src/grp-udev/libudev-core/udev-builtin-net_id.c +++ b/src/grp-udev/libudev-core/udev-builtin-net_id.c @@ -98,10 +98,10 @@ #include <unistd.h> #include <linux/pci_regs.h> -#include "fd-util.h" -#include "fileio.h" -#include "stdio-util.h" -#include "string-util.h" +#include "basic/fd-util.h" +#include "basic/fileio.h" +#include "basic/stdio-util.h" +#include "basic/string-util.h" #include "udev.h" #define ONBOARD_INDEX_MAX (16*1024-1) diff --git a/src/grp-udev/libudev-core/udev-builtin-net_setup_link.c b/src/grp-udev/libudev-core/udev-builtin-net_setup_link.c index 8e47775135..4a32bac98a 100644 --- a/src/grp-udev/libudev-core/udev-builtin-net_setup_link.c +++ b/src/grp-udev/libudev-core/udev-builtin-net_setup_link.c @@ -17,9 +17,9 @@ along with systemd; If not, see <http://www.gnu.org/licenses/>. ***/ -#include "alloc-util.h" -#include "link-config.h" -#include "log.h" +#include "basic/alloc-util.h" +#include "net/link-config.h" +#include "basic/log.h" #include "udev.h" static link_config_ctx *ctx = NULL; diff --git a/src/grp-udev/libudev-core/udev-builtin-path_id.c b/src/grp-udev/libudev-core/udev-builtin-path_id.c index 6e9adc6e96..4476b90c72 100644 --- a/src/grp-udev/libudev-core/udev-builtin-path_id.c +++ b/src/grp-udev/libudev-core/udev-builtin-path_id.c @@ -30,8 +30,8 @@ #include <string.h> #include <unistd.h> -#include "alloc-util.h" -#include "string-util.h" +#include "basic/alloc-util.h" +#include "basic/string-util.h" #include "udev.h" _printf_(2,3) diff --git a/src/grp-udev/libudev-core/udev-builtin-uaccess.c b/src/grp-udev/libudev-core/udev-builtin-uaccess.c index 2c27116ae9..f15f07ad95 100644 --- a/src/grp-udev/libudev-core/udev-builtin-uaccess.c +++ b/src/grp-udev/libudev-core/udev-builtin-uaccess.c @@ -24,10 +24,10 @@ #include <systemd/sd-login.h> -#include "login-util.h" +#include "basic/login-util.h" #include "logind-acl.h" #include "udev.h" -#include "util.h" +#include "basic/util.h" static int builtin_uaccess(struct udev_device *dev, int argc, char *argv[], bool test) { int r; diff --git a/src/grp-udev/libudev-core/udev-builtin-usb_id.c b/src/grp-udev/libudev-core/udev-builtin-usb_id.c index 587649eff0..fcaf8551d8 100644 --- a/src/grp-udev/libudev-core/udev-builtin-usb_id.c +++ b/src/grp-udev/libudev-core/udev-builtin-usb_id.c @@ -29,9 +29,9 @@ #include <string.h> #include <unistd.h> -#include "alloc-util.h" -#include "fd-util.h" -#include "string-util.h" +#include "basic/alloc-util.h" +#include "basic/fd-util.h" +#include "basic/string-util.h" #include "udev.h" static void set_usb_iftype(char *to, int if_class_num, size_t len) { diff --git a/src/grp-udev/libudev-core/udev-builtin.c b/src/grp-udev/libudev-core/udev-builtin.c index e6b36f124f..13d3cd4ee0 100644 --- a/src/grp-udev/libudev-core/udev-builtin.c +++ b/src/grp-udev/libudev-core/udev-builtin.c @@ -21,7 +21,7 @@ #include <stdio.h> #include <string.h> -#include "string-util.h" +#include "basic/string-util.h" #include "udev.h" static bool initialized; diff --git a/src/grp-udev/libudev-core/udev-ctrl.c b/src/grp-udev/libudev-core/udev-ctrl.c index f68a09d7a8..4336aa58ab 100644 --- a/src/grp-udev/libudev-core/udev-ctrl.c +++ b/src/grp-udev/libudev-core/udev-ctrl.c @@ -18,10 +18,10 @@ #include <sys/un.h> #include <unistd.h> -#include "alloc-util.h" -#include "fd-util.h" -#include "formats-util.h" -#include "socket-util.h" +#include "basic/alloc-util.h" +#include "basic/fd-util.h" +#include "basic/formats-util.h" +#include "basic/socket-util.h" #include "udev.h" /* wire protocol magic must match */ diff --git a/src/grp-udev/libudev-core/udev-event.c b/src/grp-udev/libudev-core/udev-event.c index 8d601c9c2c..6825863c86 100644 --- a/src/grp-udev/libudev-core/udev-event.c +++ b/src/grp-udev/libudev-core/udev-event.c @@ -30,13 +30,13 @@ #include <sys/wait.h> #include <unistd.h> -#include "alloc-util.h" -#include "fd-util.h" -#include "formats-util.h" -#include "netlink-util.h" -#include "process-util.h" -#include "signal-util.h" -#include "string-util.h" +#include "basic/alloc-util.h" +#include "basic/fd-util.h" +#include "basic/formats-util.h" +#include "sd-netlink/netlink-util.h" +#include "basic/process-util.h" +#include "basic/signal-util.h" +#include "basic/string-util.h" #include "udev.h" typedef struct Spawn { diff --git a/src/grp-udev/libudev-core/udev-node.c b/src/grp-udev/libudev-core/udev-node.c index 5d2997fd8f..3a2daa89ad 100644 --- a/src/grp-udev/libudev-core/udev-node.c +++ b/src/grp-udev/libudev-core/udev-node.c @@ -25,12 +25,12 @@ #include <sys/stat.h> #include <unistd.h> -#include "formats-util.h" -#include "fs-util.h" -#include "selinux-util.h" -#include "smack-util.h" -#include "stdio-util.h" -#include "string-util.h" +#include "basic/formats-util.h" +#include "basic/fs-util.h" +#include "basic/selinux-util.h" +#include "basic/smack-util.h" +#include "basic/stdio-util.h" +#include "basic/string-util.h" #include "udev.h" static int node_symlink(struct udev_device *dev, const char *node, const char *slink) { diff --git a/src/grp-udev/libudev-core/udev-rules.c b/src/grp-udev/libudev-core/udev-rules.c index 26fa52cf6c..73fb7677da 100644 --- a/src/grp-udev/libudev-core/udev-rules.c +++ b/src/grp-udev/libudev-core/udev-rules.c @@ -29,22 +29,22 @@ #include <time.h> #include <unistd.h> -#include "alloc-util.h" -#include "conf-files.h" -#include "escape.h" -#include "fd-util.h" -#include "fs-util.h" -#include "glob-util.h" -#include "path-util.h" -#include "stat-util.h" -#include "stdio-util.h" -#include "strbuf.h" -#include "string-util.h" -#include "strv.h" -#include "sysctl-util.h" +#include "basic/alloc-util.h" +#include "basic/conf-files.h" +#include "basic/escape.h" +#include "basic/fd-util.h" +#include "basic/fs-util.h" +#include "basic/glob-util.h" +#include "basic/path-util.h" +#include "basic/stat-util.h" +#include "basic/stdio-util.h" +#include "basic/strbuf.h" +#include "basic/string-util.h" +#include "basic/strv.h" +#include "shared/sysctl-util.h" #include "udev.h" -#include "user-util.h" -#include "util.h" +#include "basic/user-util.h" +#include "basic/util.h" #define PREALLOC_TOKEN 2048 diff --git a/src/grp-udev/libudev-core/udev-watch.c b/src/grp-udev/libudev-core/udev-watch.c index 9ce5e975de..7dcc71556e 100644 --- a/src/grp-udev/libudev-core/udev-watch.c +++ b/src/grp-udev/libudev-core/udev-watch.c @@ -24,7 +24,7 @@ #include <sys/inotify.h> #include <unistd.h> -#include "stdio-util.h" +#include "basic/stdio-util.h" #include "udev.h" static int inotify_fd = -1; diff --git a/src/grp-udev/mtd_probe/Makefile b/src/grp-udev/mtd_probe/Makefile index d7392a8a3b..50703dddda 100644 --- a/src/grp-udev/mtd_probe/Makefile +++ b/src/grp-udev/mtd_probe/Makefile @@ -34,4 +34,6 @@ dist_udevrules_DATA += \ udevlibexec_PROGRAMS += \ mtd_probe +mtd_probe_LDADD += libbasic.la + include $(topsrcdir)/build-aux/Makefile.tail.mk diff --git a/src/grp-udev/mtd_probe/mtd_probe.h b/src/grp-udev/mtd_probe/mtd_probe.h index 68e4954537..83f241ac94 100644 --- a/src/grp-udev/mtd_probe/mtd_probe.h +++ b/src/grp-udev/mtd_probe/mtd_probe.h @@ -21,7 +21,7 @@ #include <mtd/mtd-user.h> -#include "macro.h" +#include "basic/macro.h" /* Full oob structure as written on the flash */ struct sm_oob { diff --git a/src/grp-udev/scsi_id/scsi_id.c b/src/grp-udev/scsi_id/scsi_id.c index 4655691642..48c6cb4074 100644 --- a/src/grp-udev/scsi_id/scsi_id.c +++ b/src/grp-udev/scsi_id/scsi_id.c @@ -31,11 +31,11 @@ #include "libudev.h" -#include "fd-util.h" +#include "basic/fd-util.h" #include "libudev-private.h" #include "scsi_id.h" -#include "string-util.h" -#include "udev-util.h" +#include "basic/string-util.h" +#include "shared/udev-util.h" static const struct option options[] = { { "device", required_argument, NULL, 'd' }, diff --git a/src/grp-udev/scsi_id/scsi_serial.c b/src/grp-udev/scsi_id/scsi_serial.c index e079e28698..a7d76d0ab7 100644 --- a/src/grp-udev/scsi_id/scsi_serial.c +++ b/src/grp-udev/scsi_id/scsi_serial.c @@ -36,10 +36,10 @@ #include "libudev.h" #include "libudev-private.h" -#include "random-util.h" +#include "basic/random-util.h" #include "scsi.h" #include "scsi_id.h" -#include "string-util.h" +#include "basic/string-util.h" /* * A priority based list of id, naa, and binary/ascii for the identifier diff --git a/src/grp-udev/systemd-udevd/udevd.c b/src/grp-udev/systemd-udevd/udevd.c index 89006e6e3a..8033ab4eab 100644 --- a/src/grp-udev/systemd-udevd/udevd.c +++ b/src/grp-udev/systemd-udevd/udevd.c @@ -43,28 +43,27 @@ #include <systemd/sd-daemon.h> #include <systemd/sd-event.h> -#include "alloc-util.h" -#include "cgroup-util.h" -#include "cpu-set-util.h" -#include "dev-setup.h" -#include "fd-util.h" -#include "fileio.h" -#include "formats-util.h" -#include "fs-util.h" -#include "hashmap.h" -#include "io-util.h" -#include "netlink-util.h" -#include "parse-util.h" -#include "proc-cmdline.h" -#include "process-util.h" -#include "selinux-util.h" -#include "signal-util.h" -#include "socket-util.h" -#include "string-util.h" -#include "terminal-util.h" -#include "udev-util.h" +#include "basic/alloc-util.h" +#include "basic/cgroup-util.h" +#include "basic/cpu-set-util.h" +#include "shared/dev-setup.h" +#include "basic/fd-util.h" +#include "basic/fileio.h" +#include "basic/formats-util.h" +#include "basic/fs-util.h" +#include "basic/hashmap.h" +#include "basic/io-util.h" +#include "basic/parse-util.h" +#include "basic/proc-cmdline.h" +#include "basic/process-util.h" +#include "basic/selinux-util.h" +#include "basic/signal-util.h" +#include "basic/socket-util.h" +#include "basic/string-util.h" +#include "basic/terminal-util.h" +#include "shared/udev-util.h" #include "udev.h" -#include "user-util.h" +#include "basic/user-util.h" static bool arg_debug = false; static int arg_daemonize = false; diff --git a/src/grp-udev/udevadm/Makefile b/src/grp-udev/udevadm/Makefile index ba3b466935..ef173b234b 100644 --- a/src/grp-udev/udevadm/Makefile +++ b/src/grp-udev/udevadm/Makefile @@ -42,4 +42,6 @@ udevadm_SOURCES = \ udevadm_LDADD = \ libudev-core.la +systemd.CPPFLAGS += -DUDEVLIBEXECDIR=\"$(udevlibexecdir)\" + include $(topsrcdir)/build-aux/Makefile.tail.mk diff --git a/src/grp-udev/udevadm/udevadm-control.c b/src/grp-udev/udevadm/udevadm-control.c index 989decbe95..8aaef5fa14 100644 --- a/src/grp-udev/udevadm/udevadm-control.c +++ b/src/grp-udev/udevadm/udevadm-control.c @@ -20,7 +20,7 @@ #include <string.h> #include <unistd.h> -#include "udev-util.h" +#include "shared/udev-util.h" #include "udev.h" static void print_help(void) { diff --git a/src/grp-udev/udevadm/udevadm-hwdb.c b/src/grp-udev/udevadm/udevadm-hwdb.c index 948ad0f5a5..264e8027e2 100644 --- a/src/grp-udev/udevadm/udevadm-hwdb.c +++ b/src/grp-udev/udevadm/udevadm-hwdb.c @@ -22,16 +22,16 @@ #include <stdlib.h> #include <string.h> -#include "alloc-util.h" -#include "conf-files.h" -#include "fileio.h" -#include "fs-util.h" -#include "hwdb-internal.h" -#include "hwdb-util.h" -#include "strbuf.h" -#include "string-util.h" +#include "basic/alloc-util.h" +#include "basic/conf-files.h" +#include "basic/fileio.h" +#include "basic/fs-util.h" +#include "sd-hwdb/hwdb-internal.h" +#include "sd-hwdb/hwdb-util.h" +#include "basic/strbuf.h" +#include "basic/string-util.h" #include "udev.h" -#include "util.h" +#include "basic/util.h" /* * Generic udev properties, key/value database based on modalias strings. diff --git a/src/grp-udev/udevadm/udevadm-info.c b/src/grp-udev/udevadm/udevadm-info.c index 7182668f23..9694a991ec 100644 --- a/src/grp-udev/udevadm/udevadm-info.c +++ b/src/grp-udev/udevadm/udevadm-info.c @@ -26,9 +26,9 @@ #include <sys/stat.h> #include <unistd.h> -#include "fd-util.h" -#include "string-util.h" -#include "udev-util.h" +#include "basic/fd-util.h" +#include "basic/string-util.h" +#include "shared/udev-util.h" #include "udev.h" #include "udevadm-util.h" diff --git a/src/grp-udev/udevadm/udevadm-monitor.c b/src/grp-udev/udevadm/udevadm-monitor.c index c0ef073476..01f322f721 100644 --- a/src/grp-udev/udevadm/udevadm-monitor.c +++ b/src/grp-udev/udevadm/udevadm-monitor.c @@ -25,9 +25,9 @@ #include <sys/time.h> #include <time.h> -#include "fd-util.h" -#include "formats-util.h" -#include "udev-util.h" +#include "basic/fd-util.h" +#include "basic/formats-util.h" +#include "shared/udev-util.h" #include "udev.h" static bool udev_exit; diff --git a/src/grp-udev/udevadm/udevadm-settle.c b/src/grp-udev/udevadm/udevadm-settle.c index 6a5dc6e9e4..8b32e58a0c 100644 --- a/src/grp-udev/udevadm/udevadm-settle.c +++ b/src/grp-udev/udevadm/udevadm-settle.c @@ -26,9 +26,9 @@ #include <string.h> #include <unistd.h> -#include "parse-util.h" +#include "basic/parse-util.h" #include "udev.h" -#include "util.h" +#include "basic/util.h" static void help(void) { printf("%s settle OPTIONS\n\n" diff --git a/src/grp-udev/udevadm/udevadm-test-builtin.c b/src/grp-udev/udevadm/udevadm-test-builtin.c index 0b180d03eb..a3a66e05d7 100644 --- a/src/grp-udev/udevadm/udevadm-test-builtin.c +++ b/src/grp-udev/udevadm/udevadm-test-builtin.c @@ -21,7 +21,7 @@ #include <stdio.h> #include <stdlib.h> -#include "string-util.h" +#include "basic/string-util.h" #include "udev.h" static void help(struct udev *udev) { diff --git a/src/grp-udev/udevadm/udevadm-test.c b/src/grp-udev/udevadm/udevadm-test.c index 702dbe5282..ed919ec244 100644 --- a/src/grp-udev/udevadm/udevadm-test.c +++ b/src/grp-udev/udevadm/udevadm-test.c @@ -25,8 +25,8 @@ #include <sys/signalfd.h> #include <unistd.h> -#include "string-util.h" -#include "udev-util.h" +#include "basic/string-util.h" +#include "shared/udev-util.h" #include "udev.h" static void help(void) { diff --git a/src/grp-udev/udevadm/udevadm-trigger.c b/src/grp-udev/udevadm/udevadm-trigger.c index 9d52345d92..89ca90d01b 100644 --- a/src/grp-udev/udevadm/udevadm-trigger.c +++ b/src/grp-udev/udevadm/udevadm-trigger.c @@ -23,11 +23,11 @@ #include <string.h> #include <unistd.h> -#include "string-util.h" -#include "udev-util.h" +#include "basic/string-util.h" +#include "shared/udev-util.h" #include "udev.h" #include "udevadm-util.h" -#include "util.h" +#include "basic/util.h" static int verbose; static int dry_run; diff --git a/src/grp-udev/udevadm/udevadm-util.c b/src/grp-udev/udevadm/udevadm-util.c index 3539c1d6ab..4ae5e6c7ef 100644 --- a/src/grp-udev/udevadm/udevadm-util.c +++ b/src/grp-udev/udevadm/udevadm-util.c @@ -15,7 +15,7 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#include "string-util.h" +#include "basic/string-util.h" #include "udevadm-util.h" struct udev_device *find_device(struct udev *udev, diff --git a/src/grp-udev/udevadm/udevadm.c b/src/grp-udev/udevadm/udevadm.c index a6a873e5de..555d269275 100644 --- a/src/grp-udev/udevadm/udevadm.c +++ b/src/grp-udev/udevadm/udevadm.c @@ -20,8 +20,8 @@ #include <stddef.h> #include <stdio.h> -#include "selinux-util.h" -#include "string-util.h" +#include "basic/selinux-util.h" +#include "basic/string-util.h" #include "udev.h" static int adm_version(struct udev *udev, int argc, char *argv[]) { diff --git a/src/grp-udev/v4l_id/v4l_id.c b/src/grp-udev/v4l_id/v4l_id.c index aec6676a33..4779cf34f3 100644 --- a/src/grp-udev/v4l_id/v4l_id.c +++ b/src/grp-udev/v4l_id/v4l_id.c @@ -26,8 +26,8 @@ #include <unistd.h> #include <linux/videodev2.h> -#include "fd-util.h" -#include "util.h" +#include "basic/fd-util.h" +#include "basic/util.h" int main(int argc, char *argv[]) { static const struct option options[] = { diff --git a/src/libbasic/include/basic/Makefile b/src/libbasic/include/basic/Makefile index 1bfc55a1e2..f371394691 100644 --- a/src/libbasic/include/basic/Makefile +++ b/src/libbasic/include/basic/Makefile @@ -23,7 +23,7 @@ include $(dir $(lastword $(MAKEFILE_LIST)))/../../../../config.mk include $(topsrcdir)/build-aux/Makefile.head.mk -$(outdir)/errno-list.txt: +$(outdir)/errno-list.txt: | $(outdir)/.deps $(AM_V_GEN)$(CPP) $(ALL_CPPFLAGS) -dM -include errno.h - </dev/null | $(AWK) '/^#define[ \t]+E[^ _]+[ \t]+/ { print $$2; }' >$@ $(outdir)/errno-to-name.h: $(outdir)/errno-list.txt @@ -47,8 +47,8 @@ $(outdir)/arphrd-from-name.gperf: $(outdir)/arphrd-list.txt $(AM_V_GEN)$(AWK) 'BEGIN{ print "struct arphrd_name { const char* name; int id; };"; print "%null-strings"; print "%%";} { printf "%s, ARPHRD_%s\n", $$1, $$1 }' <$< >$@ -$(outdir)/cap-list.txt: - $(AM_V_GEN)$(CPP) $(ALL_CPPFLAGS) -dM -include linux/capability.h -include missing.h - </dev/null | $(AWK) '/^#define[ \t]+CAP_[A-Z_]+[ \t]+/ { print $$2; }' | grep -v CAP_LAST_CAP >$@ +$(outdir)/cap-list.txt: $(srcdir)/missing.h + $(AM_V_GEN)$(CPP) $(ALL_CPPFLAGS) -dM -include linux/capability.h -include $< - </dev/null | $(AWK) '/^#define[ \t]+CAP_[A-Z_]+[ \t]+/ { print $$2; }' | grep -v CAP_LAST_CAP >$@ $(outdir)/cap-to-name.h: $(outdir)/cap-list.txt $(AM_V_GEN)$(AWK) 'BEGIN{ print "static const char* const capability_names[] = { "} { printf "[%s] = \"%s\",\n", $$1, tolower($$1) } END{print "};"}' <$< >$@ @@ -59,4 +59,6 @@ $(outdir)/cap-from-name.gperf: $(outdir)/cap-list.txt $(outdir)/cap-from-name.h: $(outdir)/cap-from-name.gperf $(AM_V_GPERF)$(GPERF) -L ANSI-C -t --ignore-case -N lookup_capability -H hash_capability_name -p -C <$< >$@ +systemd.CPPFLAGS += $(libbasic.CPPFLAGS) + include $(topsrcdir)/build-aux/Makefile.tail.mk diff --git a/src/libbasic/include/basic/af-list.h b/src/libbasic/include/basic/af-list.h index 6a4cc03839..da9d373872 100644 --- a/src/libbasic/include/basic/af-list.h +++ b/src/libbasic/include/basic/af-list.h @@ -19,7 +19,7 @@ along with systemd; If not, see <http://www.gnu.org/licenses/>. ***/ -#include "string-util.h" +#include "basic/string-util.h" const char *af_to_name(int id); int af_from_name(const char *name); diff --git a/src/libbasic/include/basic/alloc-util.h b/src/libbasic/include/basic/alloc-util.h index ceeee519b7..e17c027634 100644 --- a/src/libbasic/include/basic/alloc-util.h +++ b/src/libbasic/include/basic/alloc-util.h @@ -24,7 +24,7 @@ #include <stdlib.h> #include <string.h> -#include "macro.h" +#include "basic/macro.h" #define new(t, n) ((t*) malloc_multiply(sizeof(t), (n))) diff --git a/src/libbasic/include/basic/architecture.h b/src/libbasic/include/basic/architecture.h index b3e4d85906..2d4f710f71 100644 --- a/src/libbasic/include/basic/architecture.h +++ b/src/libbasic/include/basic/architecture.h @@ -21,8 +21,8 @@ #include <endian.h> -#include "macro.h" -#include "util.h" +#include "basic/macro.h" +#include "basic/util.h" /* A cleaned up architecture definition. We don't want to get lost in * processor features, models, generations or even ABIs. Hence we diff --git a/src/libbasic/include/basic/barrier.h b/src/libbasic/include/basic/barrier.h index 6347fddc4d..a27a8fc7d6 100644 --- a/src/libbasic/include/basic/barrier.h +++ b/src/libbasic/include/basic/barrier.h @@ -23,7 +23,7 @@ #include <stdint.h> #include <sys/types.h> -#include "macro.h" +#include "basic/macro.h" /* See source file for an API description. */ diff --git a/src/libbasic/include/basic/bitmap.h b/src/libbasic/include/basic/bitmap.h index f5f8f2f018..ee0e13de9e 100644 --- a/src/libbasic/include/basic/bitmap.h +++ b/src/libbasic/include/basic/bitmap.h @@ -21,8 +21,8 @@ #include <stdbool.h> -#include "hashmap.h" -#include "macro.h" +#include "basic/hashmap.h" +#include "basic/macro.h" typedef struct Bitmap Bitmap; diff --git a/src/libbasic/include/basic/blkid-util.h b/src/libbasic/include/basic/blkid-util.h index 7aa75eb091..69a941ede2 100644 --- a/src/libbasic/include/basic/blkid-util.h +++ b/src/libbasic/include/basic/blkid-util.h @@ -23,7 +23,7 @@ #include <blkid/blkid.h> #endif -#include "util.h" +#include "basic/util.h" #ifdef HAVE_BLKID DEFINE_TRIVIAL_CLEANUP_FUNC(blkid_probe, blkid_free_probe); diff --git a/src/libbasic/include/basic/btrfs-ctree.h b/src/libbasic/include/basic/btrfs-ctree.h index 66bdf9736e..f35bfbc7f4 100644 --- a/src/libbasic/include/basic/btrfs-ctree.h +++ b/src/libbasic/include/basic/btrfs-ctree.h @@ -1,7 +1,7 @@ #pragma once -#include "macro.h" -#include "sparse-endian.h" +#include "basic/macro.h" +#include "basic/sparse-endian.h" /* Stolen from btrfs' ctree.h */ diff --git a/src/libbasic/include/basic/btrfs-util.h b/src/libbasic/include/basic/btrfs-util.h index db431f5b74..6221089f3a 100644 --- a/src/libbasic/include/basic/btrfs-util.h +++ b/src/libbasic/include/basic/btrfs-util.h @@ -25,7 +25,7 @@ #include <systemd/sd-id128.h> -#include "time-util.h" +#include "basic/time-util.h" typedef struct BtrfsSubvolInfo { uint64_t subvol_id; diff --git a/src/libbasic/include/basic/calendarspec.h b/src/libbasic/include/basic/calendarspec.h index f6472c1244..8456afe499 100644 --- a/src/libbasic/include/basic/calendarspec.h +++ b/src/libbasic/include/basic/calendarspec.h @@ -24,8 +24,8 @@ #include <stdbool.h> -#include "time-util.h" -#include "util.h" +#include "basic/time-util.h" +#include "basic/util.h" typedef struct CalendarComponent { int value; diff --git a/src/libbasic/include/basic/capability-util.h b/src/libbasic/include/basic/capability-util.h index 35a896e229..2486cd8eb4 100644 --- a/src/libbasic/include/basic/capability-util.h +++ b/src/libbasic/include/basic/capability-util.h @@ -24,8 +24,8 @@ #include <sys/capability.h> #include <sys/types.h> -#include "macro.h" -#include "util.h" +#include "basic/macro.h" +#include "basic/util.h" #define CAP_ALL (uint64_t) -1 diff --git a/src/libbasic/include/basic/cgroup-util.h b/src/libbasic/include/basic/cgroup-util.h index 4bb5291296..f957b181a5 100644 --- a/src/libbasic/include/basic/cgroup-util.h +++ b/src/libbasic/include/basic/cgroup-util.h @@ -25,10 +25,10 @@ #include <stdio.h> #include <sys/types.h> -#include "def.h" -#include "hashmap.h" -#include "macro.h" -#include "set.h" +#include "basic/def.h" +#include "basic/hashmap.h" +#include "basic/macro.h" +#include "basic/set.h" /* An enum of well known cgroup controllers */ typedef enum CGroupController { diff --git a/src/libbasic/include/basic/cpu-set-util.h b/src/libbasic/include/basic/cpu-set-util.h index 6f49d9afb0..17cafff2ae 100644 --- a/src/libbasic/include/basic/cpu-set-util.h +++ b/src/libbasic/include/basic/cpu-set-util.h @@ -22,7 +22,7 @@ #include <sched.h> -#include "macro.h" +#include "basic/macro.h" DEFINE_TRIVIAL_CLEANUP_FUNC(cpu_set_t*, CPU_FREE); #define _cleanup_cpu_free_ _cleanup_(CPU_FREEp) diff --git a/src/libbasic/include/basic/def.h b/src/libbasic/include/basic/def.h index 1a7a0f4928..c9151e6023 100644 --- a/src/libbasic/include/basic/def.h +++ b/src/libbasic/include/basic/def.h @@ -19,7 +19,7 @@ along with systemd; If not, see <http://www.gnu.org/licenses/>. ***/ -#include "util.h" +#include "basic/util.h" #define DEFAULT_TIMEOUT_USEC (90*USEC_PER_SEC) #define DEFAULT_RESTART_USEC (100*USEC_PER_MSEC) diff --git a/src/libbasic/include/basic/dirent-util.h b/src/libbasic/include/basic/dirent-util.h index b91d04908f..4352db66c5 100644 --- a/src/libbasic/include/basic/dirent-util.h +++ b/src/libbasic/include/basic/dirent-util.h @@ -23,8 +23,8 @@ #include <errno.h> #include <stdbool.h> -#include "macro.h" -#include "path-util.h" +#include "basic/macro.h" +#include "basic/path-util.h" int dirent_ensure_type(DIR *d, struct dirent *de); diff --git a/src/libbasic/include/basic/env-util.h b/src/libbasic/include/basic/env-util.h index b1fef704c2..f22958257d 100644 --- a/src/libbasic/include/basic/env-util.h +++ b/src/libbasic/include/basic/env-util.h @@ -22,7 +22,7 @@ #include <stdbool.h> #include <stddef.h> -#include "macro.h" +#include "basic/macro.h" bool env_name_is_valid(const char *e); bool env_value_is_valid(const char *e); diff --git a/src/libbasic/include/basic/escape.h b/src/libbasic/include/basic/escape.h index deaa4def28..dffe417cc6 100644 --- a/src/libbasic/include/basic/escape.h +++ b/src/libbasic/include/basic/escape.h @@ -25,8 +25,8 @@ #include <sys/types.h> #include <uchar.h> -#include "string-util.h" -#include "missing.h" +#include "basic/string-util.h" +#include "basic/missing.h" /* What characters are special in the shell? */ /* must be escaped outside and inside double-quotes */ diff --git a/src/libbasic/include/basic/exit-status.h b/src/libbasic/include/basic/exit-status.h index 1208c8feed..3e9dcb1e53 100644 --- a/src/libbasic/include/basic/exit-status.h +++ b/src/libbasic/include/basic/exit-status.h @@ -21,9 +21,9 @@ #include <stdbool.h> -#include "hashmap.h" -#include "macro.h" -#include "set.h" +#include "basic/hashmap.h" +#include "basic/macro.h" +#include "basic/set.h" typedef enum ExitStatus { /* EXIT_SUCCESS defined by libc */ diff --git a/src/libbasic/include/basic/extract-word.h b/src/libbasic/include/basic/extract-word.h index 21db5ef33f..6211a7d15b 100644 --- a/src/libbasic/include/basic/extract-word.h +++ b/src/libbasic/include/basic/extract-word.h @@ -19,7 +19,7 @@ along with systemd; If not, see <http://www.gnu.org/licenses/>. ***/ -#include "macro.h" +#include "basic/macro.h" typedef enum ExtractFlags { EXTRACT_RELAX = 1, diff --git a/src/libbasic/include/basic/fd-util.h b/src/libbasic/include/basic/fd-util.h index b86e41698a..706c49324c 100644 --- a/src/libbasic/include/basic/fd-util.h +++ b/src/libbasic/include/basic/fd-util.h @@ -24,7 +24,7 @@ #include <stdio.h> #include <sys/socket.h> -#include "macro.h" +#include "basic/macro.h" /* Make sure we can distinguish fd 0 and NULL */ #define FD_TO_PTR(fd) INT_TO_PTR((fd)+1) diff --git a/src/libbasic/include/basic/fdset.h b/src/libbasic/include/basic/fdset.h index 16efe5bdf2..3ff5d519af 100644 --- a/src/libbasic/include/basic/fdset.h +++ b/src/libbasic/include/basic/fdset.h @@ -21,9 +21,9 @@ #include <stdbool.h> -#include "hashmap.h" -#include "macro.h" -#include "set.h" +#include "basic/hashmap.h" +#include "basic/macro.h" +#include "basic/set.h" typedef struct FDSet FDSet; diff --git a/src/libbasic/include/basic/fileio-label.h b/src/libbasic/include/basic/fileio-label.h index fe7543013d..e8e8375de6 100644 --- a/src/libbasic/include/basic/fileio-label.h +++ b/src/libbasic/include/basic/fileio-label.h @@ -22,7 +22,7 @@ #include <stdio.h> -#include "fileio.h" +#include "basic/fileio.h" int write_string_file_atomic_label(const char *fn, const char *line); int write_env_file_label(const char *fname, char **l); diff --git a/src/libbasic/include/basic/fileio.h b/src/libbasic/include/basic/fileio.h index 58dbc80c24..31f75d0f97 100644 --- a/src/libbasic/include/basic/fileio.h +++ b/src/libbasic/include/basic/fileio.h @@ -25,8 +25,8 @@ #include <stdio.h> #include <sys/types.h> -#include "macro.h" -#include "time-util.h" +#include "basic/macro.h" +#include "basic/time-util.h" typedef enum { WRITE_STRING_FILE_CREATE = 1, diff --git a/src/libbasic/include/basic/fs-util.h b/src/libbasic/include/basic/fs-util.h index 517b599d6f..69292a3b22 100644 --- a/src/libbasic/include/basic/fs-util.h +++ b/src/libbasic/include/basic/fs-util.h @@ -27,7 +27,7 @@ #include <sys/types.h> #include <unistd.h> -#include "time-util.h" +#include "basic/time-util.h" int unlink_noerrno(const char *path); diff --git a/src/libbasic/include/basic/glob-util.h b/src/libbasic/include/basic/glob-util.h index 5d8fb47a26..63daf4d67f 100644 --- a/src/libbasic/include/basic/glob-util.h +++ b/src/libbasic/include/basic/glob-util.h @@ -22,8 +22,8 @@ #include <stdbool.h> #include <string.h> -#include "macro.h" -#include "string-util.h" +#include "basic/macro.h" +#include "basic/string-util.h" int glob_exists(const char *path); int glob_extend(char ***strv, const char *path); diff --git a/src/libbasic/include/basic/hash-funcs.h b/src/libbasic/include/basic/hash-funcs.h index 299189d143..95c565a3ce 100644 --- a/src/libbasic/include/basic/hash-funcs.h +++ b/src/libbasic/include/basic/hash-funcs.h @@ -20,8 +20,8 @@ along with systemd; If not, see <http://www.gnu.org/licenses/>. ***/ -#include "macro.h" -#include "siphash24.h" +#include "basic/macro.h" +#include "basic/siphash24.h" typedef void (*hash_func_t)(const void *p, struct siphash *state); typedef int (*compare_func_t)(const void *a, const void *b); diff --git a/src/libbasic/include/basic/hashmap.h b/src/libbasic/include/basic/hashmap.h index 6d1ae48b21..2be0e99d42 100644 --- a/src/libbasic/include/basic/hashmap.h +++ b/src/libbasic/include/basic/hashmap.h @@ -24,9 +24,9 @@ #include <stdbool.h> #include <stddef.h> -#include "hash-funcs.h" -#include "macro.h" -#include "util.h" +#include "basic/hash-funcs.h" +#include "basic/macro.h" +#include "basic/util.h" /* * A hash table implementation. As a minor optimization a NULL hashmap object diff --git a/src/libbasic/include/basic/hexdecoct.h b/src/libbasic/include/basic/hexdecoct.h index 1ba2f69ebd..3c1225cf8b 100644 --- a/src/libbasic/include/basic/hexdecoct.h +++ b/src/libbasic/include/basic/hexdecoct.h @@ -24,7 +24,7 @@ #include <stdio.h> #include <sys/types.h> -#include "macro.h" +#include "basic/macro.h" char octchar(int x) _const_; int unoctchar(char c) _const_; diff --git a/src/libbasic/include/basic/hostname-util.h b/src/libbasic/include/basic/hostname-util.h index 7af4e6c7ec..e23412e116 100644 --- a/src/libbasic/include/basic/hostname-util.h +++ b/src/libbasic/include/basic/hostname-util.h @@ -21,7 +21,7 @@ #include <stdbool.h> -#include "macro.h" +#include "basic/macro.h" bool hostname_is_set(void); diff --git a/src/libbasic/include/basic/in-addr-util.h b/src/libbasic/include/basic/in-addr-util.h index 17798ce816..c28a84a0d9 100644 --- a/src/libbasic/include/basic/in-addr-util.h +++ b/src/libbasic/include/basic/in-addr-util.h @@ -23,8 +23,8 @@ #include <stddef.h> #include <sys/socket.h> -#include "macro.h" -#include "util.h" +#include "basic/macro.h" +#include "basic/util.h" union in_addr_union { struct in_addr in; diff --git a/src/libbasic/include/basic/io-util.h b/src/libbasic/include/basic/io-util.h index 4684ed3bfc..100f15c283 100644 --- a/src/libbasic/include/basic/io-util.h +++ b/src/libbasic/include/basic/io-util.h @@ -25,8 +25,8 @@ #include <sys/types.h> #include <sys/uio.h> -#include "macro.h" -#include "time-util.h" +#include "basic/macro.h" +#include "basic/time-util.h" int flush_fd(int fd); diff --git a/src/libbasic/include/basic/locale-util.h b/src/libbasic/include/basic/locale-util.h index 0630a034ab..e5db878b12 100644 --- a/src/libbasic/include/basic/locale-util.h +++ b/src/libbasic/include/basic/locale-util.h @@ -22,7 +22,7 @@ #include <libintl.h> #include <stdbool.h> -#include "macro.h" +#include "basic/macro.h" typedef enum LocaleVariable { /* We don't list LC_ALL here on purpose. People should be diff --git a/src/libbasic/include/basic/lockfile-util.h b/src/libbasic/include/basic/lockfile-util.h index 22491ee8e1..e344e1f8f1 100644 --- a/src/libbasic/include/basic/lockfile-util.h +++ b/src/libbasic/include/basic/lockfile-util.h @@ -21,8 +21,8 @@ #include <stddef.h> -#include "macro.h" -#include "missing.h" +#include "basic/macro.h" +#include "basic/missing.h" typedef struct LockFile { char *path; diff --git a/src/libbasic/include/basic/log.h b/src/libbasic/include/basic/log.h index d2a22b5829..6ddbac1436 100644 --- a/src/libbasic/include/basic/log.h +++ b/src/libbasic/include/basic/log.h @@ -29,7 +29,7 @@ #include <systemd/sd-id128.h> -#include "macro.h" +#include "basic/macro.h" typedef enum LogTarget{ LOG_TARGET_CONSOLE, diff --git a/src/libbasic/include/basic/macro.h b/src/libbasic/include/basic/macro.h index e41aa4260f..e83d2f77d2 100644 --- a/src/libbasic/include/basic/macro.h +++ b/src/libbasic/include/basic/macro.h @@ -403,4 +403,4 @@ static inline unsigned long ALIGN_POWER2(unsigned long u) { } \ struct __useless_struct_to_allow_trailing_semicolon__ -#include "log.h" +#include "basic/log.h" diff --git a/src/libbasic/include/basic/missing.h b/src/libbasic/include/basic/missing.h index 651e414395..13c9b89080 100644 --- a/src/libbasic/include/basic/missing.h +++ b/src/libbasic/include/basic/missing.h @@ -50,7 +50,7 @@ #include <linux/btrfs.h> #endif -#include "macro.h" +#include "basic/macro.h" #ifndef RLIMIT_RTTIME #define RLIMIT_RTTIME 15 @@ -1013,4 +1013,4 @@ typedef int32_t key_serial_t; #endif -#include "missing_syscall.h" +#include "basic/missing_syscall.h" diff --git a/src/libbasic/include/basic/mount-util.h b/src/libbasic/include/basic/mount-util.h index bdb525d6b0..bb5b37d9a1 100644 --- a/src/libbasic/include/basic/mount-util.h +++ b/src/libbasic/include/basic/mount-util.h @@ -26,8 +26,8 @@ #include <sys/stat.h> #include <sys/types.h> -#include "macro.h" -#include "missing.h" +#include "basic/macro.h" +#include "basic/missing.h" int fd_is_mount_point(int fd, const char *filename, int flags); int path_is_mount_point(const char *path, int flags); diff --git a/src/libbasic/include/basic/ordered-set.h b/src/libbasic/include/basic/ordered-set.h index e1dfc86380..2823c17dda 100644 --- a/src/libbasic/include/basic/ordered-set.h +++ b/src/libbasic/include/basic/ordered-set.h @@ -19,7 +19,7 @@ along with systemd; If not, see <http://www.gnu.org/licenses/>. ***/ -#include "hashmap.h" +#include "basic/hashmap.h" typedef struct OrderedSet OrderedSet; diff --git a/src/libbasic/include/basic/parse-util.h b/src/libbasic/include/basic/parse-util.h index 7dc579a159..7132c958ef 100644 --- a/src/libbasic/include/basic/parse-util.h +++ b/src/libbasic/include/basic/parse-util.h @@ -25,7 +25,7 @@ #include <stdint.h> #include <sys/types.h> -#include "macro.h" +#include "basic/macro.h" #define MODE_INVALID ((mode_t) -1) diff --git a/src/libbasic/include/basic/path-util.h b/src/libbasic/include/basic/path-util.h index a27c13fcc3..cd787fae59 100644 --- a/src/libbasic/include/basic/path-util.h +++ b/src/libbasic/include/basic/path-util.h @@ -23,8 +23,8 @@ #include <stdbool.h> #include <stddef.h> -#include "macro.h" -#include "time-util.h" +#include "basic/macro.h" +#include "basic/time-util.h" #define DEFAULT_PATH_NORMAL "/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin" #define DEFAULT_PATH_SPLIT_USR DEFAULT_PATH_NORMAL ":/sbin:/bin" diff --git a/src/libbasic/include/basic/prioq.h b/src/libbasic/include/basic/prioq.h index 113c73d040..25dc1a253d 100644 --- a/src/libbasic/include/basic/prioq.h +++ b/src/libbasic/include/basic/prioq.h @@ -21,8 +21,8 @@ #include <stdbool.h> -#include "hashmap.h" -#include "macro.h" +#include "basic/hashmap.h" +#include "basic/macro.h" typedef struct Prioq Prioq; diff --git a/src/libbasic/include/basic/process-util.h b/src/libbasic/include/basic/process-util.h index 9f75088796..4fa45a97e3 100644 --- a/src/libbasic/include/basic/process-util.h +++ b/src/libbasic/include/basic/process-util.h @@ -27,8 +27,8 @@ #include <string.h> #include <sys/types.h> -#include "formats-util.h" -#include "macro.h" +#include "basic/formats-util.h" +#include "basic/macro.h" #define procfs_file_alloca(pid, field) \ ({ \ diff --git a/src/libbasic/include/basic/ratelimit.h b/src/libbasic/include/basic/ratelimit.h index 9c8dddf5ad..f54209c534 100644 --- a/src/libbasic/include/basic/ratelimit.h +++ b/src/libbasic/include/basic/ratelimit.h @@ -21,8 +21,8 @@ #include <stdbool.h> -#include "time-util.h" -#include "util.h" +#include "basic/time-util.h" +#include "basic/util.h" typedef struct RateLimit { usec_t interval; diff --git a/src/libbasic/include/basic/rlimit-util.h b/src/libbasic/include/basic/rlimit-util.h index d4594eccd6..d9a6a4e902 100644 --- a/src/libbasic/include/basic/rlimit-util.h +++ b/src/libbasic/include/basic/rlimit-util.h @@ -21,7 +21,7 @@ #include <sys/resource.h> -#include "macro.h" +#include "basic/macro.h" const char *rlimit_to_string(int i) _const_; int rlimit_from_string(const char *s) _pure_; diff --git a/src/libbasic/include/basic/selinux-util.h b/src/libbasic/include/basic/selinux-util.h index ce6bc8e44c..a619d0322a 100644 --- a/src/libbasic/include/basic/selinux-util.h +++ b/src/libbasic/include/basic/selinux-util.h @@ -23,7 +23,7 @@ #include <sys/socket.h> #include <sys/types.h> -#include "macro.h" +#include "basic/macro.h" bool mac_selinux_use(void); bool mac_selinux_have(void); diff --git a/src/libbasic/include/basic/set.h b/src/libbasic/include/basic/set.h index e0d9dd001c..4e74e9108b 100644 --- a/src/libbasic/include/basic/set.h +++ b/src/libbasic/include/basic/set.h @@ -19,8 +19,8 @@ along with systemd; If not, see <http://www.gnu.org/licenses/>. ***/ -#include "hashmap.h" -#include "macro.h" +#include "basic/hashmap.h" +#include "basic/macro.h" Set *internal_set_new(const struct hash_ops *hash_ops HASHMAP_DEBUG_PARAMS); #define set_new(ops) internal_set_new(ops HASHMAP_DEBUG_SRC_ARGS) diff --git a/src/libbasic/include/basic/signal-util.h b/src/libbasic/include/basic/signal-util.h index dfd6eb564d..bfc1be809a 100644 --- a/src/libbasic/include/basic/signal-util.h +++ b/src/libbasic/include/basic/signal-util.h @@ -21,7 +21,7 @@ #include <signal.h> -#include "macro.h" +#include "basic/macro.h" int reset_all_signal_handlers(void); int reset_signal_mask(void); diff --git a/src/libbasic/include/basic/smack-util.h b/src/libbasic/include/basic/smack-util.h index f90ba0a027..9ff19b30b3 100644 --- a/src/libbasic/include/basic/smack-util.h +++ b/src/libbasic/include/basic/smack-util.h @@ -24,7 +24,7 @@ #include <stdbool.h> #include <sys/types.h> -#include "macro.h" +#include "basic/macro.h" #define SMACK_FLOOR_LABEL "_" #define SMACK_STAR_LABEL "*" diff --git a/src/libbasic/include/basic/socket-util.h b/src/libbasic/include/basic/socket-util.h index e9230e4a9f..a711d368d5 100644 --- a/src/libbasic/include/basic/socket-util.h +++ b/src/libbasic/include/basic/socket-util.h @@ -29,8 +29,8 @@ #include <linux/netlink.h> #include <linux/if_packet.h> -#include "macro.h" -#include "util.h" +#include "basic/macro.h" +#include "basic/util.h" union sockaddr_union { struct sockaddr sa; diff --git a/src/libbasic/include/basic/stat-util.h b/src/libbasic/include/basic/stat-util.h index 56d28f791e..8c0cd0c97c 100644 --- a/src/libbasic/include/basic/stat-util.h +++ b/src/libbasic/include/basic/stat-util.h @@ -26,7 +26,7 @@ #include <sys/types.h> #include <sys/vfs.h> -#include "macro.h" +#include "basic/macro.h" int is_symlink(const char *path); int is_dir(const char *path, bool follow); diff --git a/src/libbasic/include/basic/stdio-util.h b/src/libbasic/include/basic/stdio-util.h index bd1144b4c9..414a278d0f 100644 --- a/src/libbasic/include/basic/stdio-util.h +++ b/src/libbasic/include/basic/stdio-util.h @@ -24,7 +24,7 @@ #include <stdio.h> #include <sys/types.h> -#include "macro.h" +#include "basic/macro.h" #define xsprintf(buf, fmt, ...) \ assert_message_se((size_t) snprintf(buf, ELEMENTSOF(buf), fmt, __VA_ARGS__) < ELEMENTSOF(buf), "xsprintf: " #buf "[] must be big enough") diff --git a/src/libbasic/include/basic/string-table.h b/src/libbasic/include/basic/string-table.h index d88625fca7..cf9345c80a 100644 --- a/src/libbasic/include/basic/string-table.h +++ b/src/libbasic/include/basic/string-table.h @@ -26,9 +26,9 @@ #include <string.h> #include <sys/types.h> -#include "macro.h" -#include "parse-util.h" -#include "string-util.h" +#include "basic/macro.h" +#include "basic/parse-util.h" +#include "basic/string-util.h" ssize_t string_table_lookup(const char * const *table, size_t len, const char *key); diff --git a/src/libbasic/include/basic/string-util.h b/src/libbasic/include/basic/string-util.h index 139cc8c91b..e0ff88b7fb 100644 --- a/src/libbasic/include/basic/string-util.h +++ b/src/libbasic/include/basic/string-util.h @@ -24,7 +24,7 @@ #include <stddef.h> #include <string.h> -#include "macro.h" +#include "basic/macro.h" /* What is interpreted as whitespace? */ #define WHITESPACE " \t\n\r" diff --git a/src/libbasic/include/basic/strv.h b/src/libbasic/include/basic/strv.h index f61bbb5386..20773223ad 100644 --- a/src/libbasic/include/basic/strv.h +++ b/src/libbasic/include/basic/strv.h @@ -24,10 +24,10 @@ #include <stdbool.h> #include <stddef.h> -#include "alloc-util.h" -#include "extract-word.h" -#include "macro.h" -#include "util.h" +#include "basic/alloc-util.h" +#include "basic/extract-word.h" +#include "basic/macro.h" +#include "basic/util.h" char *strv_find(char **l, const char *name) _pure_; char *strv_find_prefix(char **l, const char *name) _pure_; diff --git a/src/libbasic/include/basic/strxcpyx.h b/src/libbasic/include/basic/strxcpyx.h index 80ff58726b..7e9a5399d4 100644 --- a/src/libbasic/include/basic/strxcpyx.h +++ b/src/libbasic/include/basic/strxcpyx.h @@ -22,7 +22,7 @@ #include <stddef.h> -#include "macro.h" +#include "basic/macro.h" size_t strpcpy(char **dest, size_t size, const char *src); size_t strpcpyf(char **dest, size_t size, const char *src, ...) _printf_(3, 4); diff --git a/src/libbasic/include/basic/terminal-util.h b/src/libbasic/include/basic/terminal-util.h index a7c96a77cb..51f6fd16bc 100644 --- a/src/libbasic/include/basic/terminal-util.h +++ b/src/libbasic/include/basic/terminal-util.h @@ -24,8 +24,8 @@ #include <stdio.h> #include <sys/types.h> -#include "macro.h" -#include "time-util.h" +#include "basic/macro.h" +#include "basic/time-util.h" #define ANSI_RED "\x1B[0;31m" #define ANSI_GREEN "\x1B[0;32m" diff --git a/src/libbasic/include/basic/time-util.h b/src/libbasic/include/basic/time-util.h index a5e3f567ec..325266ec7e 100644 --- a/src/libbasic/include/basic/time-util.h +++ b/src/libbasic/include/basic/time-util.h @@ -32,7 +32,7 @@ typedef uint64_t nsec_t; #define NSEC_FMT "%" PRIu64 #define USEC_FMT "%" PRIu64 -#include "macro.h" +#include "basic/macro.h" typedef struct dual_timestamp { usec_t realtime; diff --git a/src/libbasic/include/basic/umask-util.h b/src/libbasic/include/basic/umask-util.h index 359d87d27c..d6a9835021 100644 --- a/src/libbasic/include/basic/umask-util.h +++ b/src/libbasic/include/basic/umask-util.h @@ -23,7 +23,7 @@ #include <sys/stat.h> #include <sys/types.h> -#include "macro.h" +#include "basic/macro.h" static inline void umaskp(mode_t *u) { umask(*u); diff --git a/src/libbasic/include/basic/unit-name.h b/src/libbasic/include/basic/unit-name.h index f209a84634..c31e474cb7 100644 --- a/src/libbasic/include/basic/unit-name.h +++ b/src/libbasic/include/basic/unit-name.h @@ -21,7 +21,7 @@ #include <stdbool.h> -#include "macro.h" +#include "basic/macro.h" #define UNIT_NAME_MAX 256 diff --git a/src/libbasic/include/basic/utf8.h b/src/libbasic/include/basic/utf8.h index f9b9c9468b..f6fdb6eff7 100644 --- a/src/libbasic/include/basic/utf8.h +++ b/src/libbasic/include/basic/utf8.h @@ -24,8 +24,8 @@ #include <stdint.h> #include <uchar.h> -#include "macro.h" -#include "missing.h" +#include "basic/macro.h" +#include "basic/missing.h" #define UTF8_REPLACEMENT_CHARACTER "\xef\xbf\xbd" #define UTF8_BYTE_ORDER_MARK "\xef\xbb\xbf" diff --git a/src/libbasic/include/basic/util.h b/src/libbasic/include/basic/util.h index 1c032c15c9..18d7eb2250 100644 --- a/src/libbasic/include/basic/util.h +++ b/src/libbasic/include/basic/util.h @@ -41,10 +41,10 @@ #include <time.h> #include <unistd.h> -#include "formats-util.h" -#include "macro.h" -#include "missing.h" -#include "time-util.h" +#include "basic/formats-util.h" +#include "basic/macro.h" +#include "basic/missing.h" +#include "basic/time-util.h" size_t page_size(void) _pure_; #define PAGE_ALIGN(l) ALIGN_TO((l), page_size()) diff --git a/src/libbasic/include/basic/virt.h b/src/libbasic/include/basic/virt.h index a538f07f6b..b0e30e26f8 100644 --- a/src/libbasic/include/basic/virt.h +++ b/src/libbasic/include/basic/virt.h @@ -21,7 +21,7 @@ #include <stdbool.h> -#include "macro.h" +#include "basic/macro.h" enum { VIRTUALIZATION_NONE = 0, diff --git a/src/libbasic/include/basic/web-util.h b/src/libbasic/include/basic/web-util.h index e6bb6b53f5..941940e0bc 100644 --- a/src/libbasic/include/basic/web-util.h +++ b/src/libbasic/include/basic/web-util.h @@ -21,7 +21,7 @@ #include <stdbool.h> -#include "macro.h" +#include "basic/macro.h" bool http_url_is_valid(const char *url) _pure_; diff --git a/src/libbasic/include/basic/xattr-util.h b/src/libbasic/include/basic/xattr-util.h index 6fa097bf7e..9990b05af8 100644 --- a/src/libbasic/include/basic/xattr-util.h +++ b/src/libbasic/include/basic/xattr-util.h @@ -23,7 +23,7 @@ #include <stddef.h> #include <sys/types.h> -#include "time-util.h" +#include "basic/time-util.h" int getxattr_malloc(const char *path, const char *name, char **value, bool allow_symlink); int fgetxattr_malloc(int fd, const char *name, char **value); diff --git a/src/libbasic/src/Makefile b/src/libbasic/src/Makefile index 2fc52e91f5..f29590ae15 100644 --- a/src/libbasic/src/Makefile +++ b/src/libbasic/src/Makefile @@ -240,4 +240,11 @@ libbasic_la_LIBADD = \ -lrt \ -lm +_inc = $(call at.path,$(addprefix $(outdir)/../include/basic/,$1)) +$(outdir)/af-list.lo: $(call _inc,af-from-name.h af-to-name.h) +$(outdir)/arphrd-list.lo: $(call _inc,arphrd-from-name.h arphrd-to-name.h) +$(outdir)/cap-list.lo: $(call _inc,cap-from-name.h cap-to-name.h) +$(outdir)/errno-list.lo: $(call _inc,errno-from-name.h errno-to-name.h) +systemd.CPPFLAGS += $(libbasic.CPPFLAGS) + include $(topsrcdir)/build-aux/Makefile.tail.mk diff --git a/src/libbasic/src/MurmurHash2.c b/src/libbasic/src/MurmurHash2.c index 9020793930..7d43f18f61 100644 --- a/src/libbasic/src/MurmurHash2.c +++ b/src/libbasic/src/MurmurHash2.c @@ -13,7 +13,7 @@ // 2. It will not produce the same results on little-endian and big-endian // machines. -#include "MurmurHash2.h" +#include "basic/MurmurHash2.h" //----------------------------------------------------------------------------- // Platform-specific functions and macros diff --git a/src/libbasic/src/af-list.c b/src/libbasic/src/af-list.c index 3fac9c508b..1c75c926bb 100644 --- a/src/libbasic/src/af-list.c +++ b/src/libbasic/src/af-list.c @@ -20,13 +20,13 @@ #include <string.h> #include <sys/socket.h> -#include "af-list.h" -#include "macro.h" +#include "basic/af-list.h" +#include "basic/macro.h" static const struct af_name* lookup_af(register const char *str, register unsigned int len); -#include "af-from-name.h" -#include "af-to-name.h" +#include "basic/af-from-name.h" +#include "basic/af-to-name.h" const char *af_to_name(int id) { diff --git a/src/libbasic/src/alloc-util.c b/src/libbasic/src/alloc-util.c index b540dcddf5..4e88a3a3bc 100644 --- a/src/libbasic/src/alloc-util.c +++ b/src/libbasic/src/alloc-util.c @@ -20,9 +20,9 @@ #include <stdint.h> #include <string.h> -#include "alloc-util.h" -#include "macro.h" -#include "util.h" +#include "basic/alloc-util.h" +#include "basic/macro.h" +#include "basic/util.h" void* memdup(const void *p, size_t l) { void *r; diff --git a/src/libbasic/src/architecture.c b/src/libbasic/src/architecture.c index b1c8e91f50..22815f5353 100644 --- a/src/libbasic/src/architecture.c +++ b/src/libbasic/src/architecture.c @@ -19,10 +19,10 @@ #include <sys/utsname.h> -#include "architecture.h" -#include "macro.h" -#include "string-table.h" -#include "string-util.h" +#include "basic/architecture.h" +#include "basic/macro.h" +#include "basic/string-table.h" +#include "basic/string-util.h" int uname_architecture(void) { diff --git a/src/libbasic/src/arphrd-list.c b/src/libbasic/src/arphrd-list.c index 6792d1ee3f..649bd37456 100644 --- a/src/libbasic/src/arphrd-list.c +++ b/src/libbasic/src/arphrd-list.c @@ -20,13 +20,13 @@ #include <net/if_arp.h> #include <string.h> -#include "arphrd-list.h" -#include "macro.h" +#include "basic/arphrd-list.h" +#include "basic/macro.h" static const struct arphrd_name* lookup_arphrd(register const char *str, register unsigned int len); -#include "arphrd-from-name.h" -#include "arphrd-to-name.h" +#include "basic/arphrd-from-name.h" +#include "basic/arphrd-to-name.h" const char *arphrd_to_name(int id) { diff --git a/src/libbasic/src/async.c b/src/libbasic/src/async.c index a1f163f27b..0e2fce6850 100644 --- a/src/libbasic/src/async.c +++ b/src/libbasic/src/async.c @@ -22,11 +22,11 @@ #include <stddef.h> #include <unistd.h> -#include "async.h" -#include "fd-util.h" -#include "log.h" -#include "macro.h" -#include "util.h" +#include "basic/async.h" +#include "basic/fd-util.h" +#include "basic/log.h" +#include "basic/macro.h" +#include "basic/util.h" int asynchronous_job(void* (*func)(void *p), void *arg) { pthread_attr_t a; diff --git a/src/libbasic/src/audit-util.c b/src/libbasic/src/audit-util.c index 5741fecdd6..b27eff74c0 100644 --- a/src/libbasic/src/audit-util.c +++ b/src/libbasic/src/audit-util.c @@ -22,14 +22,14 @@ #include <stdio.h> #include <sys/socket.h> -#include "alloc-util.h" -#include "audit-util.h" -#include "fd-util.h" -#include "fileio.h" -#include "macro.h" -#include "parse-util.h" -#include "process-util.h" -#include "user-util.h" +#include "basic/alloc-util.h" +#include "basic/audit-util.h" +#include "basic/fd-util.h" +#include "basic/fileio.h" +#include "basic/macro.h" +#include "basic/parse-util.h" +#include "basic/process-util.h" +#include "basic/user-util.h" int audit_session_from_pid(pid_t pid, uint32_t *id) { _cleanup_free_ char *s = NULL; diff --git a/src/libbasic/src/barrier.c b/src/libbasic/src/barrier.c index 2da633b311..ad685bb3c1 100644 --- a/src/libbasic/src/barrier.c +++ b/src/libbasic/src/barrier.c @@ -27,9 +27,9 @@ #include <sys/types.h> #include <unistd.h> -#include "barrier.h" -#include "fd-util.h" -#include "macro.h" +#include "basic/barrier.h" +#include "basic/fd-util.h" +#include "basic/macro.h" /** * Barriers diff --git a/src/libbasic/src/bitmap.c b/src/libbasic/src/bitmap.c index ad1fda0198..8645134022 100644 --- a/src/libbasic/src/bitmap.c +++ b/src/libbasic/src/bitmap.c @@ -23,10 +23,10 @@ #include <stdlib.h> #include <string.h> -#include "alloc-util.h" -#include "bitmap.h" -#include "hashmap.h" -#include "macro.h" +#include "basic/alloc-util.h" +#include "basic/bitmap.h" +#include "basic/hashmap.h" +#include "basic/macro.h" struct Bitmap { uint64_t *bitmaps; diff --git a/src/libbasic/src/btrfs-util.c b/src/libbasic/src/btrfs-util.c index 359d85f2e8..1bcac6d314 100644 --- a/src/libbasic/src/btrfs-util.c +++ b/src/libbasic/src/btrfs-util.c @@ -35,23 +35,23 @@ #include <linux/btrfs.h> #endif -#include "alloc-util.h" -#include "btrfs-ctree.h" -#include "btrfs-util.h" -#include "copy.h" -#include "fd-util.h" -#include "fileio.h" -#include "io-util.h" -#include "macro.h" -#include "missing.h" -#include "path-util.h" -#include "selinux-util.h" -#include "smack-util.h" -#include "sparse-endian.h" -#include "stat-util.h" -#include "string-util.h" -#include "time-util.h" -#include "util.h" +#include "basic/alloc-util.h" +#include "basic/btrfs-ctree.h" +#include "basic/btrfs-util.h" +#include "basic/copy.h" +#include "basic/fd-util.h" +#include "basic/fileio.h" +#include "basic/io-util.h" +#include "basic/macro.h" +#include "basic/missing.h" +#include "basic/path-util.h" +#include "basic/selinux-util.h" +#include "basic/smack-util.h" +#include "basic/sparse-endian.h" +#include "basic/stat-util.h" +#include "basic/string-util.h" +#include "basic/time-util.h" +#include "basic/util.h" /* WARNING: Be careful with file system ioctls! When we get an fd, we * need to make sure it either refers to only a regular file or diff --git a/src/libbasic/src/bus-label.c b/src/libbasic/src/bus-label.c index d4531c7947..a7fd5a227e 100644 --- a/src/libbasic/src/bus-label.c +++ b/src/libbasic/src/bus-label.c @@ -19,10 +19,10 @@ #include <stdlib.h> -#include "alloc-util.h" -#include "bus-label.h" -#include "hexdecoct.h" -#include "macro.h" +#include "basic/alloc-util.h" +#include "basic/bus-label.h" +#include "basic/hexdecoct.h" +#include "basic/macro.h" char *bus_label_escape(const char *s) { char *r, *t; diff --git a/src/libbasic/src/calendarspec.c b/src/libbasic/src/calendarspec.c index 6e0bab9b94..a70eb078c6 100644 --- a/src/libbasic/src/calendarspec.c +++ b/src/libbasic/src/calendarspec.c @@ -25,12 +25,12 @@ #include <string.h> #include <time.h> -#include "alloc-util.h" -#include "calendarspec.h" -#include "fileio.h" -#include "macro.h" -#include "parse-util.h" -#include "string-util.h" +#include "basic/alloc-util.h" +#include "basic/calendarspec.h" +#include "basic/fileio.h" +#include "basic/macro.h" +#include "basic/parse-util.h" +#include "basic/string-util.h" #define BITS_WEEKDAYS 127 diff --git a/src/libbasic/src/cap-list.c b/src/libbasic/src/cap-list.c index 3e773a06f5..22fc8b9b31 100644 --- a/src/libbasic/src/cap-list.c +++ b/src/libbasic/src/cap-list.c @@ -20,16 +20,16 @@ #include <errno.h> #include <string.h> -#include "cap-list.h" -#include "macro.h" -#include "missing.h" -#include "parse-util.h" -#include "util.h" +#include "basic/cap-list.h" +#include "basic/macro.h" +#include "basic/missing.h" +#include "basic/parse-util.h" +#include "basic/util.h" static const struct capability_name* lookup_capability(register const char *str, register unsigned int len); -#include "cap-from-name.h" -#include "cap-to-name.h" +#include "basic/cap-from-name.h" +#include "basic/cap-to-name.h" const char *capability_to_name(int id) { diff --git a/src/libbasic/src/capability-util.c b/src/libbasic/src/capability-util.c index d4c5bd6937..6c35ad09e5 100644 --- a/src/libbasic/src/capability-util.c +++ b/src/libbasic/src/capability-util.c @@ -25,13 +25,13 @@ #include <sys/prctl.h> #include <unistd.h> -#include "alloc-util.h" -#include "capability-util.h" -#include "fileio.h" -#include "log.h" -#include "macro.h" -#include "parse-util.h" -#include "util.h" +#include "basic/alloc-util.h" +#include "basic/capability-util.h" +#include "basic/fileio.h" +#include "basic/log.h" +#include "basic/macro.h" +#include "basic/parse-util.h" +#include "basic/util.h" int have_effective_cap(int value) { _cleanup_cap_free_ cap_t cap; diff --git a/src/libbasic/src/cgroup-util.c b/src/libbasic/src/cgroup-util.c index 7cdc97ee3c..68c8aae540 100644 --- a/src/libbasic/src/cgroup-util.c +++ b/src/libbasic/src/cgroup-util.c @@ -30,32 +30,32 @@ #include <sys/types.h> #include <unistd.h> -#include "alloc-util.h" -#include "cgroup-util.h" -#include "def.h" -#include "dirent-util.h" -#include "extract-word.h" -#include "fd-util.h" -#include "fileio.h" -#include "formats-util.h" -#include "fs-util.h" -#include "log.h" -#include "login-util.h" -#include "macro.h" -#include "missing.h" -#include "mkdir.h" -#include "parse-util.h" -#include "path-util.h" -#include "proc-cmdline.h" -#include "process-util.h" -#include "set.h" -#include "special.h" -#include "stat-util.h" -#include "stdio-util.h" -#include "string-table.h" -#include "string-util.h" -#include "unit-name.h" -#include "user-util.h" +#include "basic/alloc-util.h" +#include "basic/cgroup-util.h" +#include "basic/def.h" +#include "basic/dirent-util.h" +#include "basic/extract-word.h" +#include "basic/fd-util.h" +#include "basic/fileio.h" +#include "basic/formats-util.h" +#include "basic/fs-util.h" +#include "basic/log.h" +#include "basic/login-util.h" +#include "basic/macro.h" +#include "basic/missing.h" +#include "basic/mkdir.h" +#include "basic/parse-util.h" +#include "basic/path-util.h" +#include "basic/proc-cmdline.h" +#include "basic/process-util.h" +#include "basic/set.h" +#include "basic/special.h" +#include "basic/stat-util.h" +#include "basic/stdio-util.h" +#include "basic/string-table.h" +#include "basic/string-util.h" +#include "basic/unit-name.h" +#include "basic/user-util.h" int cg_enumerate_processes(const char *controller, const char *path, FILE **_f) { _cleanup_free_ char *fs = NULL; diff --git a/src/libbasic/src/chattr-util.c b/src/libbasic/src/chattr-util.c index 2896a729af..a227ce6b05 100644 --- a/src/libbasic/src/chattr-util.c +++ b/src/libbasic/src/chattr-util.c @@ -23,9 +23,9 @@ #include <sys/stat.h> #include <linux/fs.h> -#include "chattr-util.h" -#include "fd-util.h" -#include "macro.h" +#include "basic/chattr-util.h" +#include "basic/fd-util.h" +#include "basic/macro.h" int chattr_fd(int fd, unsigned value, unsigned mask) { unsigned old_attr, new_attr; diff --git a/src/libbasic/src/clock-util.c b/src/libbasic/src/clock-util.c index 7fe8d35ea5..a6d43803a1 100644 --- a/src/libbasic/src/clock-util.c +++ b/src/libbasic/src/clock-util.c @@ -27,11 +27,11 @@ #include <sys/ioctl.h> #include <sys/time.h> -#include "clock-util.h" -#include "fd-util.h" -#include "macro.h" -#include "string-util.h" -#include "util.h" +#include "basic/clock-util.h" +#include "basic/fd-util.h" +#include "basic/macro.h" +#include "basic/string-util.h" +#include "basic/util.h" int clock_get_hwclock(struct tm *tm) { _cleanup_close_ int fd = -1; diff --git a/src/libbasic/src/conf-files.c b/src/libbasic/src/conf-files.c index c781610e14..2bb794e256 100644 --- a/src/libbasic/src/conf-files.c +++ b/src/libbasic/src/conf-files.c @@ -24,17 +24,17 @@ #include <stdlib.h> #include <string.h> -#include "conf-files.h" -#include "dirent-util.h" -#include "fd-util.h" -#include "hashmap.h" -#include "log.h" -#include "macro.h" -#include "missing.h" -#include "path-util.h" -#include "string-util.h" -#include "strv.h" -#include "util.h" +#include "basic/conf-files.h" +#include "basic/dirent-util.h" +#include "basic/fd-util.h" +#include "basic/hashmap.h" +#include "basic/log.h" +#include "basic/macro.h" +#include "basic/missing.h" +#include "basic/path-util.h" +#include "basic/string-util.h" +#include "basic/strv.h" +#include "basic/util.h" static int files_add(Hashmap *h, const char *root, const char *path, const char *suffix) { _cleanup_closedir_ DIR *dir = NULL; diff --git a/src/libbasic/src/copy.c b/src/libbasic/src/copy.c index c3586728d0..4053ac9c16 100644 --- a/src/libbasic/src/copy.c +++ b/src/libbasic/src/copy.c @@ -30,22 +30,22 @@ #include <time.h> #include <unistd.h> -#include "alloc-util.h" -#include "btrfs-util.h" -#include "chattr-util.h" -#include "copy.h" -#include "dirent-util.h" -#include "fd-util.h" -#include "fileio.h" -#include "fs-util.h" -#include "io-util.h" -#include "macro.h" -#include "missing.h" -#include "string-util.h" -#include "strv.h" -#include "time-util.h" -#include "umask-util.h" -#include "xattr-util.h" +#include "basic/alloc-util.h" +#include "basic/btrfs-util.h" +#include "basic/chattr-util.h" +#include "basic/copy.h" +#include "basic/dirent-util.h" +#include "basic/fd-util.h" +#include "basic/fileio.h" +#include "basic/fs-util.h" +#include "basic/io-util.h" +#include "basic/macro.h" +#include "basic/missing.h" +#include "basic/string-util.h" +#include "basic/strv.h" +#include "basic/time-util.h" +#include "basic/umask-util.h" +#include "basic/xattr-util.h" #define COPY_BUFFER_SIZE (16*1024u) diff --git a/src/libbasic/src/cpu-set-util.c b/src/libbasic/src/cpu-set-util.c index 95ed6928ff..89e012d6e2 100644 --- a/src/libbasic/src/cpu-set-util.c +++ b/src/libbasic/src/cpu-set-util.c @@ -22,13 +22,13 @@ #include <stddef.h> #include <syslog.h> -#include "alloc-util.h" -#include "cpu-set-util.h" -#include "extract-word.h" -#include "log.h" -#include "macro.h" -#include "parse-util.h" -#include "string-util.h" +#include "basic/alloc-util.h" +#include "basic/cpu-set-util.h" +#include "basic/extract-word.h" +#include "basic/log.h" +#include "basic/macro.h" +#include "basic/parse-util.h" +#include "basic/string-util.h" cpu_set_t* cpu_set_malloc(unsigned *ncpus) { cpu_set_t *c; diff --git a/src/libbasic/src/device-nodes.c b/src/libbasic/src/device-nodes.c index 38c0628a90..e5b2eb637c 100644 --- a/src/libbasic/src/device-nodes.c +++ b/src/libbasic/src/device-nodes.c @@ -21,8 +21,8 @@ #include <stdio.h> #include <string.h> -#include "device-nodes.h" -#include "utf8.h" +#include "basic/device-nodes.h" +#include "basic/utf8.h" int whitelisted_char_for_devnode(char c, const char *white) { diff --git a/src/libbasic/src/dirent-util.c b/src/libbasic/src/dirent-util.c index 59067121b7..5bc740b189 100644 --- a/src/libbasic/src/dirent-util.c +++ b/src/libbasic/src/dirent-util.c @@ -20,9 +20,9 @@ #include <fcntl.h> #include <sys/stat.h> -#include "dirent-util.h" -#include "path-util.h" -#include "string-util.h" +#include "basic/dirent-util.h" +#include "basic/path-util.h" +#include "basic/string-util.h" int dirent_ensure_type(DIR *d, struct dirent *de) { struct stat st; diff --git a/src/libbasic/src/env-util.c b/src/libbasic/src/env-util.c index 7f5fddb700..67d8261c87 100644 --- a/src/libbasic/src/env-util.c +++ b/src/libbasic/src/env-util.c @@ -24,14 +24,14 @@ #include <string.h> #include <unistd.h> -#include "alloc-util.h" -#include "env-util.h" -#include "extract-word.h" -#include "macro.h" -#include "parse-util.h" -#include "string-util.h" -#include "strv.h" -#include "utf8.h" +#include "basic/alloc-util.h" +#include "basic/env-util.h" +#include "basic/extract-word.h" +#include "basic/macro.h" +#include "basic/parse-util.h" +#include "basic/string-util.h" +#include "basic/strv.h" +#include "basic/utf8.h" #define VALID_CHARS_ENV_NAME \ DIGITS LETTERS \ diff --git a/src/libbasic/src/errno-list.c b/src/libbasic/src/errno-list.c index 31b66bad5e..a40c4efc2e 100644 --- a/src/libbasic/src/errno-list.c +++ b/src/libbasic/src/errno-list.c @@ -19,14 +19,14 @@ #include <string.h> -#include "errno-list.h" -#include "macro.h" +#include "basic/errno-list.h" +#include "basic/macro.h" static const struct errno_name* lookup_errno(register const char *str, register unsigned int len); -#include "errno-from-name.h" -#include "errno-to-name.h" +#include "basic/errno-from-name.h" +#include "basic/errno-to-name.h" const char *errno_to_name(int id) { diff --git a/src/libbasic/src/escape.c b/src/libbasic/src/escape.c index 01daf11ce7..609b68ae53 100644 --- a/src/libbasic/src/escape.c +++ b/src/libbasic/src/escape.c @@ -21,11 +21,11 @@ #include <stdlib.h> #include <string.h> -#include "alloc-util.h" -#include "escape.h" -#include "hexdecoct.h" -#include "macro.h" -#include "utf8.h" +#include "basic/alloc-util.h" +#include "basic/escape.h" +#include "basic/hexdecoct.h" +#include "basic/macro.h" +#include "basic/utf8.h" size_t cescape_char(char c, char *buf) { char * buf_old = buf; diff --git a/src/libbasic/src/ether-addr-util.c b/src/libbasic/src/ether-addr-util.c index 5697e8d132..933b7c9dc7 100644 --- a/src/libbasic/src/ether-addr-util.c +++ b/src/libbasic/src/ether-addr-util.c @@ -21,9 +21,9 @@ #include <stdio.h> #include <sys/types.h> -#include "ether-addr-util.h" -#include "macro.h" -#include "string-util.h" +#include "basic/ether-addr-util.h" +#include "basic/macro.h" +#include "basic/string-util.h" char* ether_addr_to_string(const struct ether_addr *addr, char buffer[ETHER_ADDR_TO_STRING_MAX]) { assert(addr); diff --git a/src/libbasic/src/exit-status.c b/src/libbasic/src/exit-status.c index 92fa5ace61..c7af63e052 100644 --- a/src/libbasic/src/exit-status.c +++ b/src/libbasic/src/exit-status.c @@ -20,9 +20,9 @@ #include <signal.h> #include <stdlib.h> -#include "exit-status.h" -#include "macro.h" -#include "set.h" +#include "basic/exit-status.h" +#include "basic/macro.h" +#include "basic/set.h" const char* exit_status_to_string(ExitStatus status, ExitStatusLevel level) { diff --git a/src/libbasic/src/extract-word.c b/src/libbasic/src/extract-word.c index d6c1228463..c38a815592 100644 --- a/src/libbasic/src/extract-word.c +++ b/src/libbasic/src/extract-word.c @@ -26,13 +26,13 @@ #include <string.h> #include <syslog.h> -#include "alloc-util.h" -#include "escape.h" -#include "extract-word.h" -#include "log.h" -#include "macro.h" -#include "string-util.h" -#include "utf8.h" +#include "basic/alloc-util.h" +#include "basic/escape.h" +#include "basic/extract-word.h" +#include "basic/log.h" +#include "basic/macro.h" +#include "basic/string-util.h" +#include "basic/utf8.h" int extract_first_word(const char **p, char **ret, const char *separators, ExtractFlags flags) { _cleanup_free_ char *s = NULL; diff --git a/src/libbasic/src/fd-util.c b/src/libbasic/src/fd-util.c index 8b466cff15..277a4c1075 100644 --- a/src/libbasic/src/fd-util.c +++ b/src/libbasic/src/fd-util.c @@ -24,15 +24,15 @@ #include <sys/stat.h> #include <unistd.h> -#include "fd-util.h" -#include "fs-util.h" -#include "macro.h" -#include "missing.h" -#include "parse-util.h" -#include "path-util.h" -#include "socket-util.h" -#include "stdio-util.h" -#include "util.h" +#include "basic/fd-util.h" +#include "basic/fs-util.h" +#include "basic/macro.h" +#include "basic/missing.h" +#include "basic/parse-util.h" +#include "basic/path-util.h" +#include "basic/socket-util.h" +#include "basic/stdio-util.h" +#include "basic/util.h" int close_nointr(int fd) { assert(fd >= 0); diff --git a/src/libbasic/src/fdset.c b/src/libbasic/src/fdset.c index b52bf1ad05..71e920d08e 100644 --- a/src/libbasic/src/fdset.c +++ b/src/libbasic/src/fdset.c @@ -25,13 +25,13 @@ #include <systemd/sd-daemon.h> -#include "fd-util.h" -#include "fdset.h" -#include "log.h" -#include "macro.h" -#include "parse-util.h" -#include "path-util.h" -#include "set.h" +#include "basic/fd-util.h" +#include "basic/fdset.h" +#include "basic/log.h" +#include "basic/macro.h" +#include "basic/parse-util.h" +#include "basic/path-util.h" +#include "basic/set.h" #define MAKE_SET(s) ((Set*) s) #define MAKE_FDSET(s) ((FDSet*) s) diff --git a/src/libbasic/src/fileio-label.c b/src/libbasic/src/fileio-label.c index 66dbc0fe1e..3e0cab1b38 100644 --- a/src/libbasic/src/fileio-label.c +++ b/src/libbasic/src/fileio-label.c @@ -20,9 +20,9 @@ #include <sys/stat.h> -#include "fileio-label.h" -#include "fileio.h" -#include "selinux-util.h" +#include "basic/fileio-label.h" +#include "basic/fileio.h" +#include "basic/selinux-util.h" int write_string_file_atomic_label(const char *fn, const char *line) { int r; diff --git a/src/libbasic/src/fileio.c b/src/libbasic/src/fileio.c index 29f5374222..358477cebe 100644 --- a/src/libbasic/src/fileio.c +++ b/src/libbasic/src/fileio.c @@ -28,24 +28,24 @@ #include <sys/types.h> #include <unistd.h> -#include "alloc-util.h" +#include "basic/alloc-util.h" #include "ctype.h" -#include "escape.h" -#include "fd-util.h" -#include "fileio.h" -#include "fs-util.h" -#include "hexdecoct.h" -#include "log.h" -#include "macro.h" -#include "parse-util.h" -#include "path-util.h" -#include "random-util.h" -#include "stdio-util.h" -#include "string-util.h" -#include "strv.h" -#include "time-util.h" -#include "umask-util.h" -#include "utf8.h" +#include "basic/escape.h" +#include "basic/fd-util.h" +#include "basic/fileio.h" +#include "basic/fs-util.h" +#include "basic/hexdecoct.h" +#include "basic/log.h" +#include "basic/macro.h" +#include "basic/parse-util.h" +#include "basic/path-util.h" +#include "basic/random-util.h" +#include "basic/stdio-util.h" +#include "basic/string-util.h" +#include "basic/strv.h" +#include "basic/time-util.h" +#include "basic/umask-util.h" +#include "basic/utf8.h" int write_string_stream(FILE *f, const char *line, bool enforce_newline) { diff --git a/src/libbasic/src/fs-util.c b/src/libbasic/src/fs-util.c index e24e7036f7..03b06fd2d8 100644 --- a/src/libbasic/src/fs-util.c +++ b/src/libbasic/src/fs-util.c @@ -27,23 +27,23 @@ #include <time.h> #include <unistd.h> -#include "alloc-util.h" -#include "dirent-util.h" -#include "fd-util.h" -#include "fileio.h" -#include "fs-util.h" -#include "log.h" -#include "macro.h" -#include "missing.h" -#include "mkdir.h" -#include "parse-util.h" -#include "path-util.h" -#include "stdio-util.h" -#include "string-util.h" -#include "strv.h" -#include "time-util.h" -#include "user-util.h" -#include "util.h" +#include "basic/alloc-util.h" +#include "basic/dirent-util.h" +#include "basic/fd-util.h" +#include "basic/fileio.h" +#include "basic/fs-util.h" +#include "basic/log.h" +#include "basic/macro.h" +#include "basic/missing.h" +#include "basic/mkdir.h" +#include "basic/parse-util.h" +#include "basic/path-util.h" +#include "basic/stdio-util.h" +#include "basic/string-util.h" +#include "basic/strv.h" +#include "basic/time-util.h" +#include "basic/user-util.h" +#include "basic/util.h" int unlink_noerrno(const char *path) { PROTECT_ERRNO; diff --git a/src/libbasic/src/glob-util.c b/src/libbasic/src/glob-util.c index 007198c269..8762a59bd9 100644 --- a/src/libbasic/src/glob-util.c +++ b/src/libbasic/src/glob-util.c @@ -20,9 +20,9 @@ #include <errno.h> #include <glob.h> -#include "glob-util.h" -#include "macro.h" -#include "strv.h" +#include "basic/glob-util.h" +#include "basic/macro.h" +#include "basic/strv.h" int glob_exists(const char *path) { _cleanup_globfree_ glob_t g = {}; diff --git a/src/libbasic/src/gunicode.c b/src/libbasic/src/gunicode.c index 542110503f..4862021fbb 100644 --- a/src/libbasic/src/gunicode.c +++ b/src/libbasic/src/gunicode.c @@ -6,7 +6,7 @@ #include <stdlib.h> -#include "gunicode.h" +#include "basic/gunicode.h" #define unichar uint32_t diff --git a/src/libbasic/src/hash-funcs.c b/src/libbasic/src/hash-funcs.c index c3a4a011b5..e82a342063 100644 --- a/src/libbasic/src/hash-funcs.c +++ b/src/libbasic/src/hash-funcs.c @@ -18,7 +18,7 @@ along with systemd; If not, see <http://www.gnu.org/licenses/>. ***/ -#include "hash-funcs.h" +#include "basic/hash-funcs.h" void string_hash_func(const void *p, struct siphash *state) { siphash24_compress(p, strlen(p) + 1, state); diff --git a/src/libbasic/src/hashmap.c b/src/libbasic/src/hashmap.c index 49a0479592..0b744c525a 100644 --- a/src/libbasic/src/hashmap.c +++ b/src/libbasic/src/hashmap.c @@ -23,20 +23,20 @@ #include <stdlib.h> #include <string.h> -#include "alloc-util.h" -#include "hashmap.h" -#include "macro.h" -#include "mempool.h" -#include "process-util.h" -#include "random-util.h" -#include "set.h" -#include "siphash24.h" -#include "strv.h" -#include "util.h" +#include "basic/alloc-util.h" +#include "basic/hashmap.h" +#include "basic/macro.h" +#include "basic/mempool.h" +#include "basic/process-util.h" +#include "basic/random-util.h" +#include "basic/set.h" +#include "basic/siphash24.h" +#include "basic/strv.h" +#include "basic/util.h" #ifdef ENABLE_DEBUG_HASHMAP #include <pthread.h> -#include "list.h" +#include "basic/list.h" #endif /* diff --git a/src/libbasic/src/hexdecoct.c b/src/libbasic/src/hexdecoct.c index c5bda6c4d6..060a95b616 100644 --- a/src/libbasic/src/hexdecoct.c +++ b/src/libbasic/src/hexdecoct.c @@ -22,10 +22,10 @@ #include <stdint.h> #include <stdlib.h> -#include "alloc-util.h" -#include "hexdecoct.h" -#include "macro.h" -#include "util.h" +#include "basic/alloc-util.h" +#include "basic/hexdecoct.h" +#include "basic/macro.h" +#include "basic/util.h" char octchar(int x) { return '0' + (x & 7); diff --git a/src/libbasic/src/hostname-util.c b/src/libbasic/src/hostname-util.c index 13c3bb6446..e66f9a2250 100644 --- a/src/libbasic/src/hostname-util.c +++ b/src/libbasic/src/hostname-util.c @@ -24,11 +24,11 @@ #include <sys/utsname.h> #include <unistd.h> -#include "fd-util.h" -#include "fileio.h" -#include "hostname-util.h" -#include "macro.h" -#include "string-util.h" +#include "basic/fd-util.h" +#include "basic/fileio.h" +#include "basic/hostname-util.h" +#include "basic/macro.h" +#include "basic/string-util.h" bool hostname_is_set(void) { struct utsname u; diff --git a/src/libbasic/src/in-addr-util.c b/src/libbasic/src/in-addr-util.c index 245107ebb8..7d648ce354 100644 --- a/src/libbasic/src/in-addr-util.c +++ b/src/libbasic/src/in-addr-util.c @@ -23,10 +23,10 @@ #include <stdint.h> #include <stdlib.h> -#include "alloc-util.h" -#include "in-addr-util.h" -#include "macro.h" -#include "util.h" +#include "basic/alloc-util.h" +#include "basic/in-addr-util.h" +#include "basic/macro.h" +#include "basic/util.h" int in_addr_is_null(int family, const union in_addr_union *u) { assert(u); diff --git a/src/libbasic/src/io-util.c b/src/libbasic/src/io-util.c index cc6dfa8c1b..800a7044f6 100644 --- a/src/libbasic/src/io-util.c +++ b/src/libbasic/src/io-util.c @@ -24,8 +24,8 @@ #include <time.h> #include <unistd.h> -#include "io-util.h" -#include "time-util.h" +#include "basic/io-util.h" +#include "basic/time-util.h" int flush_fd(int fd) { struct pollfd pollfd = { diff --git a/src/libbasic/src/label.c b/src/libbasic/src/label.c index f5ab855d32..cea374198a 100644 --- a/src/libbasic/src/label.c +++ b/src/libbasic/src/label.c @@ -21,10 +21,10 @@ #include <sys/stat.h> #include <unistd.h> -#include "label.h" -#include "macro.h" -#include "selinux-util.h" -#include "smack-util.h" +#include "basic/label.h" +#include "basic/macro.h" +#include "basic/selinux-util.h" +#include "basic/smack-util.h" int label_fix(const char *path, bool ignore_enoent, bool ignore_erofs) { int r, q; diff --git a/src/libbasic/src/locale-util.c b/src/libbasic/src/locale-util.c index ada0a28cd8..7cedaae319 100644 --- a/src/libbasic/src/locale-util.c +++ b/src/libbasic/src/locale-util.c @@ -30,16 +30,16 @@ #include <sys/mman.h> #include <sys/stat.h> -#include "dirent-util.h" -#include "fd-util.h" -#include "hashmap.h" -#include "locale-util.h" -#include "path-util.h" -#include "set.h" -#include "string-table.h" -#include "string-util.h" -#include "strv.h" -#include "utf8.h" +#include "basic/dirent-util.h" +#include "basic/fd-util.h" +#include "basic/hashmap.h" +#include "basic/locale-util.h" +#include "basic/path-util.h" +#include "basic/set.h" +#include "basic/string-table.h" +#include "basic/string-util.h" +#include "basic/strv.h" +#include "basic/utf8.h" static int add_locales_from_archive(Set *locales) { /* Stolen from glibc... */ diff --git a/src/libbasic/src/lockfile-util.c b/src/libbasic/src/lockfile-util.c index 3ee4191e4d..233627c1a4 100644 --- a/src/libbasic/src/lockfile-util.c +++ b/src/libbasic/src/lockfile-util.c @@ -24,12 +24,12 @@ #include <sys/file.h> #include <sys/stat.h> -#include "alloc-util.h" -#include "fd-util.h" -#include "fs-util.h" -#include "lockfile-util.h" -#include "macro.h" -#include "path-util.h" +#include "basic/alloc-util.h" +#include "basic/fd-util.h" +#include "basic/fs-util.h" +#include "basic/lockfile-util.h" +#include "basic/macro.h" +#include "basic/path-util.h" int make_lock_file(const char *p, int operation, LockFile *ret) { _cleanup_close_ int fd = -1; diff --git a/src/libbasic/src/log.c b/src/libbasic/src/log.c index 05c4896f55..6028cc7a27 100644 --- a/src/libbasic/src/log.c +++ b/src/libbasic/src/log.c @@ -35,25 +35,25 @@ #include <systemd/sd-messages.h> -#include "alloc-util.h" -#include "fd-util.h" -#include "formats-util.h" -#include "io-util.h" -#include "log.h" -#include "macro.h" -#include "missing.h" -#include "parse-util.h" -#include "proc-cmdline.h" -#include "process-util.h" -#include "signal-util.h" -#include "socket-util.h" -#include "stdio-util.h" -#include "string-table.h" -#include "string-util.h" -#include "syslog-util.h" -#include "terminal-util.h" -#include "time-util.h" -#include "util.h" +#include "basic/alloc-util.h" +#include "basic/fd-util.h" +#include "basic/formats-util.h" +#include "basic/io-util.h" +#include "basic/log.h" +#include "basic/macro.h" +#include "basic/missing.h" +#include "basic/parse-util.h" +#include "basic/proc-cmdline.h" +#include "basic/process-util.h" +#include "basic/signal-util.h" +#include "basic/socket-util.h" +#include "basic/stdio-util.h" +#include "basic/string-table.h" +#include "basic/string-util.h" +#include "basic/syslog-util.h" +#include "basic/terminal-util.h" +#include "basic/time-util.h" +#include "basic/util.h" #define SNDBUF_SIZE (8*1024*1024) diff --git a/src/libbasic/src/login-util.c b/src/libbasic/src/login-util.c index 339e94f12d..fe97f66392 100644 --- a/src/libbasic/src/login-util.c +++ b/src/libbasic/src/login-util.c @@ -19,8 +19,8 @@ #include <string.h> -#include "login-util.h" -#include "string-util.h" +#include "basic/login-util.h" +#include "basic/string-util.h" bool session_id_valid(const char *id) { diff --git a/src/libbasic/src/memfd-util.c b/src/libbasic/src/memfd-util.c index 8c8cc78ebf..810dd37ee7 100644 --- a/src/libbasic/src/memfd-util.c +++ b/src/libbasic/src/memfd-util.c @@ -28,13 +28,13 @@ #include <sys/mman.h> #include <sys/prctl.h> -#include "alloc-util.h" -#include "fd-util.h" -#include "macro.h" -#include "memfd-util.h" -#include "missing.h" -#include "string-util.h" -#include "utf8.h" +#include "basic/alloc-util.h" +#include "basic/fd-util.h" +#include "basic/macro.h" +#include "basic/memfd-util.h" +#include "basic/missing.h" +#include "basic/string-util.h" +#include "basic/utf8.h" int memfd_new(const char *name) { _cleanup_free_ char *g = NULL; diff --git a/src/libbasic/src/mempool.c b/src/libbasic/src/mempool.c index f95e2beb0f..0a64c1b29c 100644 --- a/src/libbasic/src/mempool.c +++ b/src/libbasic/src/mempool.c @@ -21,9 +21,9 @@ #include <stdint.h> #include <stdlib.h> -#include "macro.h" -#include "mempool.h" -#include "util.h" +#include "basic/macro.h" +#include "basic/mempool.h" +#include "basic/util.h" struct pool { struct pool *next; diff --git a/src/libbasic/src/mkdir-label.c b/src/libbasic/src/mkdir-label.c index aa6878cdf0..83a1e925c6 100644 --- a/src/libbasic/src/mkdir-label.c +++ b/src/libbasic/src/mkdir-label.c @@ -22,8 +22,8 @@ #include <sys/types.h> #include <unistd.h> -#include "label.h" -#include "mkdir.h" +#include "basic/label.h" +#include "basic/mkdir.h" int mkdir_safe_label(const char *path, mode_t mode, uid_t uid, gid_t gid) { return mkdir_safe_internal(path, mode, uid, gid, mkdir_label); diff --git a/src/libbasic/src/mkdir.c b/src/libbasic/src/mkdir.c index 6b1a98402c..0a7f432f3e 100644 --- a/src/libbasic/src/mkdir.c +++ b/src/libbasic/src/mkdir.c @@ -22,12 +22,12 @@ #include <string.h> #include <sys/stat.h> -#include "fs-util.h" -#include "macro.h" -#include "mkdir.h" -#include "path-util.h" -#include "stat-util.h" -#include "user-util.h" +#include "basic/fs-util.h" +#include "basic/macro.h" +#include "basic/mkdir.h" +#include "basic/path-util.h" +#include "basic/stat-util.h" +#include "basic/user-util.h" int mkdir_safe_internal(const char *path, mode_t mode, uid_t uid, gid_t gid, mkdir_func_t _mkdir) { struct stat st; diff --git a/src/libbasic/src/mount-util.c b/src/libbasic/src/mount-util.c index ba698959b7..274ec9d29c 100644 --- a/src/libbasic/src/mount-util.c +++ b/src/libbasic/src/mount-util.c @@ -25,17 +25,17 @@ #include <sys/statvfs.h> #include <unistd.h> -#include "alloc-util.h" -#include "escape.h" -#include "fd-util.h" -#include "fileio.h" -#include "hashmap.h" -#include "mount-util.h" -#include "parse-util.h" -#include "path-util.h" -#include "set.h" -#include "stdio-util.h" -#include "string-util.h" +#include "basic/alloc-util.h" +#include "basic/escape.h" +#include "basic/fd-util.h" +#include "basic/fileio.h" +#include "basic/hashmap.h" +#include "basic/mount-util.h" +#include "basic/parse-util.h" +#include "basic/path-util.h" +#include "basic/set.h" +#include "basic/stdio-util.h" +#include "basic/string-util.h" static int fd_fdinfo_mnt_id(int fd, const char *filename, int flags, int *mnt_id) { char path[strlen("/proc/self/fdinfo/") + DECIMAL_STR_MAX(int)]; diff --git a/src/libbasic/src/ordered-set.c b/src/libbasic/src/ordered-set.c index 2e0bdf6488..fc6c3c018c 100644 --- a/src/libbasic/src/ordered-set.c +++ b/src/libbasic/src/ordered-set.c @@ -17,8 +17,8 @@ along with systemd; If not, see <http://www.gnu.org/licenses/>. ***/ -#include "ordered-set.h" -#include "strv.h" +#include "basic/ordered-set.h" +#include "basic/strv.h" int ordered_set_consume(OrderedSet *s, void *p) { int r; diff --git a/src/libbasic/src/parse-util.c b/src/libbasic/src/parse-util.c index 6c11b605a9..b6a99c7cdb 100644 --- a/src/libbasic/src/parse-util.c +++ b/src/libbasic/src/parse-util.c @@ -25,11 +25,11 @@ #include <string.h> #include <xlocale.h> -#include "alloc-util.h" -#include "extract-word.h" -#include "macro.h" -#include "parse-util.h" -#include "string-util.h" +#include "basic/alloc-util.h" +#include "basic/extract-word.h" +#include "basic/macro.h" +#include "basic/parse-util.h" +#include "basic/string-util.h" int parse_boolean(const char *v) { assert(v); diff --git a/src/libbasic/src/path-util.c b/src/libbasic/src/path-util.c index b2fa81a294..143380dec2 100644 --- a/src/libbasic/src/path-util.c +++ b/src/libbasic/src/path-util.c @@ -31,17 +31,17 @@ #include <libgen.h> #undef basename -#include "alloc-util.h" -#include "extract-word.h" -#include "fs-util.h" -#include "log.h" -#include "macro.h" -#include "missing.h" -#include "path-util.h" -#include "stat-util.h" -#include "string-util.h" -#include "strv.h" -#include "time-util.h" +#include "basic/alloc-util.h" +#include "basic/extract-word.h" +#include "basic/fs-util.h" +#include "basic/log.h" +#include "basic/macro.h" +#include "basic/missing.h" +#include "basic/path-util.h" +#include "basic/stat-util.h" +#include "basic/string-util.h" +#include "basic/strv.h" +#include "basic/time-util.h" bool path_is_absolute(const char *p) { return p[0] == '/'; diff --git a/src/libbasic/src/prioq.c b/src/libbasic/src/prioq.c index d2ec516d29..f29c80b5fc 100644 --- a/src/libbasic/src/prioq.c +++ b/src/libbasic/src/prioq.c @@ -30,9 +30,9 @@ #include <errno.h> #include <stdlib.h> -#include "alloc-util.h" -#include "hashmap.h" -#include "prioq.h" +#include "basic/alloc-util.h" +#include "basic/hashmap.h" +#include "basic/prioq.h" struct prioq_item { void *data; diff --git a/src/libbasic/src/proc-cmdline.c b/src/libbasic/src/proc-cmdline.c index 3505fa9c9a..e35a21ac0d 100644 --- a/src/libbasic/src/proc-cmdline.c +++ b/src/libbasic/src/proc-cmdline.c @@ -21,17 +21,17 @@ #include <stddef.h> #include <string.h> -#include "alloc-util.h" -#include "extract-word.h" -#include "fileio.h" -#include "macro.h" -#include "parse-util.h" -#include "proc-cmdline.h" -#include "process-util.h" -#include "special.h" -#include "string-util.h" -#include "util.h" -#include "virt.h" +#include "basic/alloc-util.h" +#include "basic/extract-word.h" +#include "basic/fileio.h" +#include "basic/macro.h" +#include "basic/parse-util.h" +#include "basic/proc-cmdline.h" +#include "basic/process-util.h" +#include "basic/special.h" +#include "basic/string-util.h" +#include "basic/util.h" +#include "basic/virt.h" int proc_cmdline(char **ret) { assert(ret); diff --git a/src/libbasic/src/process-util.c b/src/libbasic/src/process-util.c index 1ad8816206..44ac8794dc 100644 --- a/src/libbasic/src/process-util.c +++ b/src/libbasic/src/process-util.c @@ -37,23 +37,23 @@ #include <valgrind/valgrind.h> #endif -#include "alloc-util.h" -#include "architecture.h" -#include "escape.h" -#include "fd-util.h" -#include "fileio.h" -#include "fs-util.h" -#include "ioprio.h" -#include "log.h" -#include "macro.h" -#include "missing.h" -#include "process-util.h" -#include "signal-util.h" -#include "stat-util.h" -#include "string-table.h" -#include "string-util.h" -#include "user-util.h" -#include "util.h" +#include "basic/alloc-util.h" +#include "basic/architecture.h" +#include "basic/escape.h" +#include "basic/fd-util.h" +#include "basic/fileio.h" +#include "basic/fs-util.h" +#include "basic/ioprio.h" +#include "basic/log.h" +#include "basic/macro.h" +#include "basic/missing.h" +#include "basic/process-util.h" +#include "basic/signal-util.h" +#include "basic/stat-util.h" +#include "basic/string-table.h" +#include "basic/string-util.h" +#include "basic/user-util.h" +#include "basic/util.h" int get_process_state(pid_t pid) { const char *p; diff --git a/src/libbasic/src/random-util.c b/src/libbasic/src/random-util.c index 2f468db770..6c903cbb9a 100644 --- a/src/libbasic/src/random-util.c +++ b/src/libbasic/src/random-util.c @@ -30,11 +30,11 @@ #include <sys/auxv.h> #endif -#include "fd-util.h" -#include "io-util.h" -#include "missing.h" -#include "random-util.h" -#include "time-util.h" +#include "basic/fd-util.h" +#include "basic/io-util.h" +#include "basic/missing.h" +#include "basic/random-util.h" +#include "basic/time-util.h" int dev_urandom(void *p, size_t n) { static int have_syscall = -1; diff --git a/src/libbasic/src/ratelimit.c b/src/libbasic/src/ratelimit.c index 3ca5625e4d..366aeb6d9a 100644 --- a/src/libbasic/src/ratelimit.c +++ b/src/libbasic/src/ratelimit.c @@ -20,8 +20,8 @@ #include <sys/time.h> -#include "macro.h" -#include "ratelimit.h" +#include "basic/macro.h" +#include "basic/ratelimit.h" /* Modelled after Linux' lib/ratelimit.c by Dave Young * <hidave.darkstar@gmail.com>, which is licensed GPLv2. */ diff --git a/src/libbasic/src/replace-var.c b/src/libbasic/src/replace-var.c index 6a204b9ec3..50e60221ad 100644 --- a/src/libbasic/src/replace-var.c +++ b/src/libbasic/src/replace-var.c @@ -22,10 +22,10 @@ #include <stdlib.h> #include <string.h> -#include "alloc-util.h" -#include "macro.h" -#include "replace-var.h" -#include "string-util.h" +#include "basic/alloc-util.h" +#include "basic/macro.h" +#include "basic/replace-var.h" +#include "basic/string-util.h" /* * Generic infrastructure for replacing @FOO@ style variables in diff --git a/src/libbasic/src/rlimit-util.c b/src/libbasic/src/rlimit-util.c index ee063720ed..3a8196d9c1 100644 --- a/src/libbasic/src/rlimit-util.c +++ b/src/libbasic/src/rlimit-util.c @@ -20,14 +20,14 @@ #include <errno.h> #include <sys/resource.h> -#include "alloc-util.h" -#include "extract-word.h" -#include "formats-util.h" -#include "macro.h" -#include "missing.h" -#include "rlimit-util.h" -#include "string-table.h" -#include "time-util.h" +#include "basic/alloc-util.h" +#include "basic/extract-word.h" +#include "basic/formats-util.h" +#include "basic/macro.h" +#include "basic/missing.h" +#include "basic/rlimit-util.h" +#include "basic/string-table.h" +#include "basic/time-util.h" int setrlimit_closest(int resource, const struct rlimit *rlim) { struct rlimit highest, fixed; diff --git a/src/libbasic/src/rm-rf.c b/src/libbasic/src/rm-rf.c index 43816fd1bb..b05b512aee 100644 --- a/src/libbasic/src/rm-rf.c +++ b/src/libbasic/src/rm-rf.c @@ -26,15 +26,15 @@ #include <sys/statfs.h> #include <unistd.h> -#include "btrfs-util.h" -#include "fd-util.h" -#include "log.h" -#include "macro.h" -#include "mount-util.h" -#include "path-util.h" -#include "rm-rf.h" -#include "stat-util.h" -#include "string-util.h" +#include "basic/btrfs-util.h" +#include "basic/fd-util.h" +#include "basic/log.h" +#include "basic/macro.h" +#include "basic/mount-util.h" +#include "basic/path-util.h" +#include "basic/rm-rf.h" +#include "basic/stat-util.h" +#include "basic/string-util.h" int rm_rf_children(int fd, RemoveFlags flags, struct stat *root_dev) { _cleanup_closedir_ DIR *d = NULL; diff --git a/src/libbasic/src/selinux-util.c b/src/libbasic/src/selinux-util.c index 10c2f39369..34d2dcdccf 100644 --- a/src/libbasic/src/selinux-util.c +++ b/src/libbasic/src/selinux-util.c @@ -32,13 +32,13 @@ #include <selinux/selinux.h> #endif -#include "alloc-util.h" -#include "log.h" -#include "macro.h" -#include "path-util.h" -#include "selinux-util.h" -#include "time-util.h" -#include "util.h" +#include "basic/alloc-util.h" +#include "basic/log.h" +#include "basic/macro.h" +#include "basic/path-util.h" +#include "basic/selinux-util.h" +#include "basic/time-util.h" +#include "basic/util.h" #ifdef HAVE_SELINUX DEFINE_TRIVIAL_CLEANUP_FUNC(security_context_t, freecon); diff --git a/src/libbasic/src/sigbus.c b/src/libbasic/src/sigbus.c index 0ce4f75684..7249f812d7 100644 --- a/src/libbasic/src/sigbus.c +++ b/src/libbasic/src/sigbus.c @@ -22,9 +22,9 @@ #include <stddef.h> #include <sys/mman.h> -#include "macro.h" -#include "sigbus.h" -#include "util.h" +#include "basic/macro.h" +#include "basic/sigbus.h" +#include "basic/util.h" #define SIGBUS_QUEUE_MAX 64 diff --git a/src/libbasic/src/signal-util.c b/src/libbasic/src/signal-util.c index 280b5c3251..ade7bff364 100644 --- a/src/libbasic/src/signal-util.c +++ b/src/libbasic/src/signal-util.c @@ -21,12 +21,12 @@ #include <stdarg.h> #include <stdio.h> -#include "macro.h" -#include "parse-util.h" -#include "signal-util.h" -#include "stdio-util.h" -#include "string-table.h" -#include "string-util.h" +#include "basic/macro.h" +#include "basic/parse-util.h" +#include "basic/signal-util.h" +#include "basic/stdio-util.h" +#include "basic/string-table.h" +#include "basic/string-util.h" int reset_all_signal_handlers(void) { static const struct sigaction sa = { diff --git a/src/libbasic/src/siphash24.c b/src/libbasic/src/siphash24.c index 060e8ba387..8fbc05b435 100644 --- a/src/libbasic/src/siphash24.c +++ b/src/libbasic/src/siphash24.c @@ -17,9 +17,9 @@ coding style) */ -#include "macro.h" -#include "siphash24.h" -#include "unaligned.h" +#include "basic/macro.h" +#include "basic/siphash24.h" +#include "basic/unaligned.h" static inline uint64_t rotate_left(uint64_t x, uint8_t b) { assert(b < 64); diff --git a/src/libbasic/src/smack-util.c b/src/libbasic/src/smack-util.c index 3a3df987df..c3ce6bd4ac 100644 --- a/src/libbasic/src/smack-util.c +++ b/src/libbasic/src/smack-util.c @@ -25,15 +25,15 @@ #include <sys/xattr.h> #include <unistd.h> -#include "alloc-util.h" -#include "fileio.h" -#include "log.h" -#include "macro.h" -#include "path-util.h" -#include "process-util.h" -#include "smack-util.h" -#include "string-table.h" -#include "xattr-util.h" +#include "basic/alloc-util.h" +#include "basic/fileio.h" +#include "basic/log.h" +#include "basic/macro.h" +#include "basic/path-util.h" +#include "basic/process-util.h" +#include "basic/smack-util.h" +#include "basic/string-table.h" +#include "basic/xattr-util.h" #ifdef HAVE_SMACK bool mac_smack_use(void) { diff --git a/src/libbasic/src/socket-label.c b/src/libbasic/src/socket-label.c index 6d1dc83874..75036f451f 100644 --- a/src/libbasic/src/socket-label.c +++ b/src/libbasic/src/socket-label.c @@ -26,15 +26,15 @@ #include <sys/un.h> #include <unistd.h> -#include "alloc-util.h" -#include "fd-util.h" -#include "log.h" -#include "macro.h" -#include "missing.h" -#include "mkdir.h" -#include "selinux-util.h" -#include "socket-util.h" -#include "umask-util.h" +#include "basic/alloc-util.h" +#include "basic/fd-util.h" +#include "basic/log.h" +#include "basic/macro.h" +#include "basic/missing.h" +#include "basic/mkdir.h" +#include "basic/selinux-util.h" +#include "basic/socket-util.h" +#include "basic/umask-util.h" int socket_address_listen( const SocketAddress *a, diff --git a/src/libbasic/src/socket-util.c b/src/libbasic/src/socket-util.c index c8769a54f4..9e1bf1d91d 100644 --- a/src/libbasic/src/socket-util.c +++ b/src/libbasic/src/socket-util.c @@ -31,22 +31,22 @@ #include <string.h> #include <unistd.h> -#include "alloc-util.h" -#include "fd-util.h" -#include "fileio.h" -#include "formats-util.h" -#include "log.h" -#include "macro.h" -#include "missing.h" -#include "parse-util.h" -#include "path-util.h" -#include "socket-util.h" -#include "string-table.h" -#include "string-util.h" -#include "strv.h" -#include "user-util.h" -#include "utf8.h" -#include "util.h" +#include "basic/alloc-util.h" +#include "basic/fd-util.h" +#include "basic/fileio.h" +#include "basic/formats-util.h" +#include "basic/log.h" +#include "basic/macro.h" +#include "basic/missing.h" +#include "basic/parse-util.h" +#include "basic/path-util.h" +#include "basic/socket-util.h" +#include "basic/string-table.h" +#include "basic/string-util.h" +#include "basic/strv.h" +#include "basic/user-util.h" +#include "basic/utf8.h" +#include "basic/util.h" int socket_address_parse(SocketAddress *a, const char *s) { char *e, *n; diff --git a/src/libbasic/src/stat-util.c b/src/libbasic/src/stat-util.c index 309e84b93d..64f01e5b4d 100644 --- a/src/libbasic/src/stat-util.c +++ b/src/libbasic/src/stat-util.c @@ -26,12 +26,12 @@ #include <sys/statvfs.h> #include <unistd.h> -#include "dirent-util.h" -#include "fd-util.h" -#include "macro.h" -#include "missing.h" -#include "stat-util.h" -#include "string-util.h" +#include "basic/dirent-util.h" +#include "basic/fd-util.h" +#include "basic/macro.h" +#include "basic/missing.h" +#include "basic/stat-util.h" +#include "basic/string-util.h" int is_symlink(const char *path) { struct stat info; diff --git a/src/libbasic/src/strbuf.c b/src/libbasic/src/strbuf.c index 4bef87d3c2..3b6fafeb30 100644 --- a/src/libbasic/src/strbuf.c +++ b/src/libbasic/src/strbuf.c @@ -21,8 +21,8 @@ #include <stdlib.h> #include <string.h> -#include "alloc-util.h" -#include "strbuf.h" +#include "basic/alloc-util.h" +#include "basic/strbuf.h" /* * Strbuf stores given strings in a single continuous allocated memory diff --git a/src/libbasic/src/string-table.c b/src/libbasic/src/string-table.c index a1499ab126..fae5e944b5 100644 --- a/src/libbasic/src/string-table.c +++ b/src/libbasic/src/string-table.c @@ -17,8 +17,8 @@ along with systemd; If not, see <http://www.gnu.org/licenses/>. ***/ -#include "string-table.h" -#include "string-util.h" +#include "basic/string-table.h" +#include "basic/string-util.h" ssize_t string_table_lookup(const char * const *table, size_t len, const char *key) { size_t i; diff --git a/src/libbasic/src/string-util.c b/src/libbasic/src/string-util.c index 293a15f9c0..003a20a41d 100644 --- a/src/libbasic/src/string-util.c +++ b/src/libbasic/src/string-util.c @@ -23,12 +23,12 @@ #include <stdio.h> #include <stdlib.h> -#include "alloc-util.h" -#include "gunicode.h" -#include "macro.h" -#include "string-util.h" -#include "utf8.h" -#include "util.h" +#include "basic/alloc-util.h" +#include "basic/gunicode.h" +#include "basic/macro.h" +#include "basic/string-util.h" +#include "basic/utf8.h" +#include "basic/util.h" int strcmp_ptr(const char *a, const char *b) { diff --git a/src/libbasic/src/strv.c b/src/libbasic/src/strv.c index 97a96e5762..aadbef953c 100644 --- a/src/libbasic/src/strv.c +++ b/src/libbasic/src/strv.c @@ -24,13 +24,13 @@ #include <stdlib.h> #include <string.h> -#include "alloc-util.h" -#include "escape.h" -#include "extract-word.h" -#include "fileio.h" -#include "string-util.h" -#include "strv.h" -#include "util.h" +#include "basic/alloc-util.h" +#include "basic/escape.h" +#include "basic/extract-word.h" +#include "basic/fileio.h" +#include "basic/string-util.h" +#include "basic/strv.h" +#include "basic/util.h" char *strv_find(char **l, const char *name) { char **i; diff --git a/src/libbasic/src/strxcpyx.c b/src/libbasic/src/strxcpyx.c index aaf11d21f6..b6225f0e12 100644 --- a/src/libbasic/src/strxcpyx.c +++ b/src/libbasic/src/strxcpyx.c @@ -27,7 +27,7 @@ #include <stdio.h> #include <string.h> -#include "strxcpyx.h" +#include "basic/strxcpyx.h" size_t strpcpy(char **dest, size_t size, const char *src) { size_t len; diff --git a/src/libbasic/src/syslog-util.c b/src/libbasic/src/syslog-util.c index db3405154e..8647f2a2d6 100644 --- a/src/libbasic/src/syslog-util.c +++ b/src/libbasic/src/syslog-util.c @@ -20,10 +20,10 @@ #include <string.h> #include <syslog.h> -#include "hexdecoct.h" -#include "macro.h" -#include "string-table.h" -#include "syslog-util.h" +#include "basic/hexdecoct.h" +#include "basic/macro.h" +#include "basic/string-table.h" +#include "basic/syslog-util.h" int syslog_parse_priority(const char **p, int *priority, bool with_facility) { int a = 0, b = 0, c = 0; diff --git a/src/libbasic/src/terminal-util.c b/src/libbasic/src/terminal-util.c index 9521b79daa..6755a3f787 100644 --- a/src/libbasic/src/terminal-util.c +++ b/src/libbasic/src/terminal-util.c @@ -38,21 +38,21 @@ #include <termios.h> #include <unistd.h> -#include "alloc-util.h" -#include "fd-util.h" -#include "fileio.h" -#include "fs-util.h" -#include "io-util.h" -#include "log.h" -#include "macro.h" -#include "parse-util.h" -#include "process-util.h" -#include "socket-util.h" -#include "stat-util.h" -#include "string-util.h" -#include "terminal-util.h" -#include "time-util.h" -#include "util.h" +#include "basic/alloc-util.h" +#include "basic/fd-util.h" +#include "basic/fileio.h" +#include "basic/fs-util.h" +#include "basic/io-util.h" +#include "basic/log.h" +#include "basic/macro.h" +#include "basic/parse-util.h" +#include "basic/process-util.h" +#include "basic/socket-util.h" +#include "basic/stat-util.h" +#include "basic/string-util.h" +#include "basic/terminal-util.h" +#include "basic/time-util.h" +#include "basic/util.h" static volatile unsigned cached_columns = 0; static volatile unsigned cached_lines = 0; diff --git a/src/libbasic/src/time-util.c b/src/libbasic/src/time-util.c index edd9179cb8..05f5ad7dc7 100644 --- a/src/libbasic/src/time-util.c +++ b/src/libbasic/src/time-util.c @@ -28,17 +28,17 @@ #include <sys/types.h> #include <unistd.h> -#include "alloc-util.h" -#include "fd-util.h" -#include "fileio.h" -#include "fs-util.h" -#include "log.h" -#include "macro.h" -#include "parse-util.h" -#include "path-util.h" -#include "string-util.h" -#include "strv.h" -#include "time-util.h" +#include "basic/alloc-util.h" +#include "basic/fd-util.h" +#include "basic/fileio.h" +#include "basic/fs-util.h" +#include "basic/log.h" +#include "basic/macro.h" +#include "basic/parse-util.h" +#include "basic/path-util.h" +#include "basic/string-util.h" +#include "basic/strv.h" +#include "basic/time-util.h" static nsec_t timespec_load_nsec(const struct timespec *ts); diff --git a/src/libbasic/src/unit-name.c b/src/libbasic/src/unit-name.c index fe883b95c7..42c79da536 100644 --- a/src/libbasic/src/unit-name.c +++ b/src/libbasic/src/unit-name.c @@ -23,16 +23,16 @@ #include <stdlib.h> #include <string.h> -#include "alloc-util.h" -#include "bus-label.h" -#include "glob-util.h" -#include "hexdecoct.h" -#include "macro.h" -#include "path-util.h" -#include "string-table.h" -#include "string-util.h" -#include "strv.h" -#include "unit-name.h" +#include "basic/alloc-util.h" +#include "basic/bus-label.h" +#include "basic/glob-util.h" +#include "basic/hexdecoct.h" +#include "basic/macro.h" +#include "basic/path-util.h" +#include "basic/string-table.h" +#include "basic/string-util.h" +#include "basic/strv.h" +#include "basic/unit-name.h" /* Characters valid in a unit name. */ #define VALID_CHARS \ diff --git a/src/libbasic/src/user-util.c b/src/libbasic/src/user-util.c index f65ca3edaa..aeada699ac 100644 --- a/src/libbasic/src/user-util.c +++ b/src/libbasic/src/user-util.c @@ -30,15 +30,15 @@ #include <sys/stat.h> #include <unistd.h> -#include "missing.h" -#include "alloc-util.h" -#include "fd-util.h" -#include "formats-util.h" -#include "macro.h" -#include "parse-util.h" -#include "path-util.h" -#include "string-util.h" -#include "user-util.h" +#include "basic/missing.h" +#include "basic/alloc-util.h" +#include "basic/fd-util.h" +#include "basic/formats-util.h" +#include "basic/macro.h" +#include "basic/parse-util.h" +#include "basic/path-util.h" +#include "basic/string-util.h" +#include "basic/user-util.h" bool uid_is_valid(uid_t uid) { diff --git a/src/libbasic/src/utf8.c b/src/libbasic/src/utf8.c index 6eae2b983d..b5144b7312 100644 --- a/src/libbasic/src/utf8.c +++ b/src/libbasic/src/utf8.c @@ -46,10 +46,10 @@ #include <stdlib.h> #include <string.h> -#include "alloc-util.h" -#include "hexdecoct.h" -#include "macro.h" -#include "utf8.h" +#include "basic/alloc-util.h" +#include "basic/hexdecoct.h" +#include "basic/macro.h" +#include "basic/utf8.h" bool unichar_is_valid(char32_t ch) { diff --git a/src/libbasic/src/util.c b/src/libbasic/src/util.c index 756c663be4..d0db8a28fb 100644 --- a/src/libbasic/src/util.c +++ b/src/libbasic/src/util.c @@ -34,30 +34,30 @@ #include <sys/types.h> #include <unistd.h> -#include "alloc-util.h" -#include "build.h" -#include "def.h" -#include "dirent-util.h" -#include "fd-util.h" -#include "fileio.h" -#include "formats-util.h" -#include "hashmap.h" -#include "hostname-util.h" -#include "log.h" -#include "macro.h" -#include "missing.h" -#include "parse-util.h" -#include "path-util.h" -#include "process-util.h" -#include "set.h" -#include "signal-util.h" -#include "stat-util.h" -#include "string-util.h" -#include "strv.h" -#include "time-util.h" -#include "umask-util.h" -#include "user-util.h" -#include "util.h" +#include "basic/alloc-util.h" +#include "basic/build.h" +#include "basic/def.h" +#include "basic/dirent-util.h" +#include "basic/fd-util.h" +#include "basic/fileio.h" +#include "basic/formats-util.h" +#include "basic/hashmap.h" +#include "basic/hostname-util.h" +#include "basic/log.h" +#include "basic/macro.h" +#include "basic/missing.h" +#include "basic/parse-util.h" +#include "basic/path-util.h" +#include "basic/process-util.h" +#include "basic/set.h" +#include "basic/signal-util.h" +#include "basic/stat-util.h" +#include "basic/string-util.h" +#include "basic/strv.h" +#include "basic/time-util.h" +#include "basic/umask-util.h" +#include "basic/user-util.h" +#include "basic/util.h" /* Put this test here for a lack of better place */ assert_cc(EAGAIN == EWOULDBLOCK); diff --git a/src/libbasic/src/verbs.c b/src/libbasic/src/verbs.c index d9cdb38d65..526e0fc338 100644 --- a/src/libbasic/src/verbs.c +++ b/src/libbasic/src/verbs.c @@ -22,11 +22,11 @@ #include <stdbool.h> #include <stddef.h> -#include "log.h" -#include "macro.h" -#include "string-util.h" -#include "verbs.h" -#include "virt.h" +#include "basic/log.h" +#include "basic/macro.h" +#include "basic/string-util.h" +#include "basic/verbs.h" +#include "basic/virt.h" int dispatch_verb(int argc, char *argv[], const Verb verbs[], void *userdata) { const Verb *verb; diff --git a/src/libbasic/src/virt.c b/src/libbasic/src/virt.c index dace1f4328..33a74f16cf 100644 --- a/src/libbasic/src/virt.c +++ b/src/libbasic/src/virt.c @@ -23,16 +23,16 @@ #include <string.h> #include <unistd.h> -#include "alloc-util.h" -#include "dirent-util.h" -#include "fd-util.h" -#include "fileio.h" -#include "macro.h" -#include "process-util.h" -#include "stat-util.h" -#include "string-table.h" -#include "string-util.h" -#include "virt.h" +#include "basic/alloc-util.h" +#include "basic/dirent-util.h" +#include "basic/fd-util.h" +#include "basic/fileio.h" +#include "basic/macro.h" +#include "basic/process-util.h" +#include "basic/stat-util.h" +#include "basic/string-table.h" +#include "basic/string-util.h" +#include "basic/virt.h" static int detect_vm_cpuid(void) { diff --git a/src/libbasic/src/web-util.c b/src/libbasic/src/web-util.c index 595688ed93..a68813ffb8 100644 --- a/src/libbasic/src/web-util.c +++ b/src/libbasic/src/web-util.c @@ -19,9 +19,9 @@ #include <stdbool.h> -#include "string-util.h" -#include "utf8.h" -#include "web-util.h" +#include "basic/string-util.h" +#include "basic/utf8.h" +#include "basic/web-util.h" bool http_etag_is_valid(const char *etag) { if (isempty(etag)) diff --git a/src/libbasic/src/xattr-util.c b/src/libbasic/src/xattr-util.c index 8256899eda..07f063e10b 100644 --- a/src/libbasic/src/xattr-util.c +++ b/src/libbasic/src/xattr-util.c @@ -25,13 +25,13 @@ #include <sys/time.h> #include <sys/xattr.h> -#include "alloc-util.h" -#include "fd-util.h" -#include "macro.h" -#include "sparse-endian.h" -#include "stdio-util.h" -#include "time-util.h" -#include "xattr-util.h" +#include "basic/alloc-util.h" +#include "basic/fd-util.h" +#include "basic/macro.h" +#include "basic/sparse-endian.h" +#include "basic/stdio-util.h" +#include "basic/time-util.h" +#include "basic/xattr-util.h" int getxattr_malloc(const char *path, const char *name, char **value, bool allow_symlink) { char *v; diff --git a/src/libbasic/src/xml.c b/src/libbasic/src/xml.c index 1dbeac7324..273fe51fa9 100644 --- a/src/libbasic/src/xml.c +++ b/src/libbasic/src/xml.c @@ -21,9 +21,9 @@ #include <stddef.h> #include <string.h> -#include "macro.h" -#include "string-util.h" -#include "xml.h" +#include "basic/macro.h" +#include "basic/string-util.h" +#include "basic/xml.h" enum { STATE_NULL, diff --git a/src/libcore/Makefile b/src/libcore/Makefile index f40a115042..23032ea6f7 100644 --- a/src/libcore/Makefile +++ b/src/libcore/Makefile @@ -163,8 +163,13 @@ libcore_la_LIBADD = \ $(APPARMOR_LIBS) \ $(MOUNT_LIBS) -$(outdir)/load-fragment-gperf-nulstr.c: src/core/load-fragment-gperf.gperf - $(AM_V_at)$(MKDIR_P) $(dir $@) +$(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 ";" }' < $< > $@ +systemd.CPPFLAGS += -I$(topsrcdir)/src/libudev/src +systemd.CPPFLAGS += -DMOUNT_PATH=\"$(MOUNT_PATH)\" +systemd.CPPFLAGS += -DUMOUNT_PATH=\"$(UMOUNT_PATH)\" +systemd.CPPFLAGS += -DSYSTEMD_CGROUP_AGENT_PATH=\"$(libexecdir)/systemd-cgroups-agent\" +systemd.CPPFLAGS += -DSYSTEMD_BINARY_PATH=\"$(libexecdir)/systemd\" + include $(topsrcdir)/build-aux/Makefile.tail.mk diff --git a/src/libcore/audit-fd.c b/src/libcore/audit-fd.c index 76afe3fe15..8ea525eda3 100644 --- a/src/libcore/audit-fd.c +++ b/src/libcore/audit-fd.c @@ -27,9 +27,9 @@ #include <libaudit.h> #include <stdbool.h> -#include "fd-util.h" -#include "log.h" -#include "util.h" +#include "basic/fd-util.h" +#include "basic/log.h" +#include "basic/util.h" static bool initialized = false; static int audit_fd; diff --git a/src/libcore/automount.c b/src/libcore/automount.c index f06d837e30..145ed5ab5d 100644 --- a/src/libcore/automount.c +++ b/src/libcore/automount.c @@ -27,27 +27,27 @@ #include <sys/stat.h> #include <unistd.h> -#include "alloc-util.h" -#include "async.h" +#include "basic/alloc-util.h" +#include "basic/async.h" #include "automount.h" -#include "bus-error.h" -#include "bus-util.h" +#include "sd-bus/bus-error.h" +#include "shared/bus-util.h" #include "dbus-automount.h" -#include "fd-util.h" -#include "formats-util.h" -#include "io-util.h" -#include "label.h" -#include "mkdir.h" -#include "mount-util.h" +#include "basic/fd-util.h" +#include "basic/formats-util.h" +#include "basic/io-util.h" +#include "basic/label.h" +#include "basic/mkdir.h" +#include "basic/mount-util.h" #include "mount.h" -#include "parse-util.h" -#include "path-util.h" -#include "process-util.h" -#include "special.h" -#include "stdio-util.h" -#include "string-table.h" -#include "string-util.h" -#include "unit-name.h" +#include "basic/parse-util.h" +#include "basic/path-util.h" +#include "basic/process-util.h" +#include "basic/special.h" +#include "basic/stdio-util.h" +#include "basic/string-table.h" +#include "basic/string-util.h" +#include "basic/unit-name.h" #include "unit.h" static const UnitActiveState state_translation_table[_AUTOMOUNT_STATE_MAX] = { diff --git a/src/libcore/bus-policy.c b/src/libcore/bus-policy.c index 4907c268e8..cc228bc42f 100644 --- a/src/libcore/bus-policy.c +++ b/src/libcore/bus-policy.c @@ -19,13 +19,13 @@ #include <stdlib.h> -#include "alloc-util.h" -#include "bus-kernel.h" +#include "basic/alloc-util.h" +#include "sd-bus/bus-kernel.h" #include "bus-policy.h" -#include "kdbus.h" -#include "string-table.h" -#include "user-util.h" -#include "util.h" +#include "sd-bus/kdbus.h" +#include "basic/string-table.h" +#include "basic/user-util.h" +#include "basic/util.h" int bus_kernel_translate_access(BusPolicyAccess access) { assert(access >= 0); diff --git a/src/libcore/bus-policy.h b/src/libcore/bus-policy.h index 5b2c4d5953..a6d19c1e9a 100644 --- a/src/libcore/bus-policy.h +++ b/src/libcore/bus-policy.h @@ -19,9 +19,9 @@ along with systemd; If not, see <http://www.gnu.org/licenses/>. ***/ -#include "kdbus.h" -#include "list.h" -#include "macro.h" +#include "sd-bus/kdbus.h" +#include "basic/list.h" +#include "basic/macro.h" typedef struct BusNamePolicy BusNamePolicy; diff --git a/src/libcore/busname.c b/src/libcore/busname.c index f03a95c24e..765fd7a442 100644 --- a/src/libcore/busname.c +++ b/src/libcore/busname.c @@ -19,23 +19,23 @@ #include <sys/mman.h> -#include "alloc-util.h" -#include "bus-internal.h" -#include "bus-kernel.h" +#include "basic/alloc-util.h" +#include "sd-bus/bus-internal.h" +#include "sd-bus/bus-kernel.h" #include "bus-policy.h" -#include "bus-util.h" +#include "shared/bus-util.h" #include "busname.h" #include "dbus-busname.h" -#include "fd-util.h" -#include "formats-util.h" -#include "kdbus.h" -#include "parse-util.h" -#include "process-util.h" +#include "basic/fd-util.h" +#include "basic/formats-util.h" +#include "sd-bus/kdbus.h" +#include "basic/parse-util.h" +#include "basic/process-util.h" #include "service.h" -#include "signal-util.h" -#include "special.h" -#include "string-table.h" -#include "string-util.h" +#include "basic/signal-util.h" +#include "basic/special.h" +#include "basic/string-table.h" +#include "basic/string-util.h" static const UnitActiveState state_translation_table[_BUSNAME_STATE_MAX] = { [BUSNAME_DEAD] = UNIT_INACTIVE, diff --git a/src/libcore/cgroup.c b/src/libcore/cgroup.c index 0fb63b1bd1..43d494cee7 100644 --- a/src/libcore/cgroup.c +++ b/src/libcore/cgroup.c @@ -20,19 +20,19 @@ #include <fcntl.h> #include <fnmatch.h> -#include "alloc-util.h" -#include "cgroup-util.h" +#include "basic/alloc-util.h" +#include "basic/cgroup-util.h" #include "cgroup.h" -#include "fd-util.h" -#include "fileio.h" -#include "fs-util.h" -#include "parse-util.h" -#include "path-util.h" -#include "process-util.h" -#include "special.h" -#include "string-table.h" -#include "string-util.h" -#include "stdio-util.h" +#include "basic/fd-util.h" +#include "basic/fileio.h" +#include "basic/fs-util.h" +#include "basic/parse-util.h" +#include "basic/path-util.h" +#include "basic/process-util.h" +#include "basic/special.h" +#include "basic/string-table.h" +#include "basic/string-util.h" +#include "basic/stdio-util.h" #define CGROUP_CPU_QUOTA_PERIOD_USEC ((usec_t) 100 * USEC_PER_MSEC) diff --git a/src/libcore/cgroup.h b/src/libcore/cgroup.h index 2b1edbafc4..69ff9832bf 100644 --- a/src/libcore/cgroup.h +++ b/src/libcore/cgroup.h @@ -21,9 +21,9 @@ #include <stdbool.h> -#include "list.h" -#include "time-util.h" -#include "cgroup-util.h" +#include "basic/list.h" +#include "basic/time-util.h" +#include "basic/cgroup-util.h" typedef struct CGroupContext CGroupContext; typedef struct CGroupDeviceAllow CGroupDeviceAllow; @@ -115,7 +115,7 @@ struct CGroupContext { bool delegate; }; -#include "cgroup-util.h" +#include "basic/cgroup-util.h" #include "unit.h" void cgroup_context_init(CGroupContext *c); diff --git a/src/libcore/dbus-automount.c b/src/libcore/dbus-automount.c index b2806ad86f..bc44dc1c0a 100644 --- a/src/libcore/dbus-automount.c +++ b/src/libcore/dbus-automount.c @@ -18,9 +18,9 @@ ***/ #include "automount.h" -#include "bus-util.h" +#include "shared/bus-util.h" #include "dbus-automount.h" -#include "string-util.h" +#include "basic/string-util.h" static BUS_DEFINE_PROPERTY_GET_ENUM(property_get_result, automount_result, AutomountResult); diff --git a/src/libcore/dbus-busname.c b/src/libcore/dbus-busname.c index cf816ba15b..80e7484f46 100644 --- a/src/libcore/dbus-busname.c +++ b/src/libcore/dbus-busname.c @@ -17,10 +17,10 @@ along with systemd; If not, see <http://www.gnu.org/licenses/>. ***/ -#include "bus-util.h" +#include "shared/bus-util.h" #include "busname.h" #include "dbus-busname.h" -#include "string-util.h" +#include "basic/string-util.h" #include "unit.h" static BUS_DEFINE_PROPERTY_GET_ENUM(property_get_result, busname_result, BusNameResult); diff --git a/src/libcore/dbus-cgroup.c b/src/libcore/dbus-cgroup.c index eef1c47c14..86f7c626c4 100644 --- a/src/libcore/dbus-cgroup.c +++ b/src/libcore/dbus-cgroup.c @@ -17,14 +17,14 @@ along with systemd; If not, see <http://www.gnu.org/licenses/>. ***/ -#include "alloc-util.h" -#include "bus-util.h" -#include "cgroup-util.h" +#include "basic/alloc-util.h" +#include "shared/bus-util.h" +#include "basic/cgroup-util.h" #include "cgroup.h" #include "dbus-cgroup.h" -#include "fd-util.h" -#include "fileio.h" -#include "path-util.h" +#include "basic/fd-util.h" +#include "basic/fileio.h" +#include "basic/path-util.h" static BUS_DEFINE_PROPERTY_GET_ENUM(property_get_cgroup_device_policy, cgroup_device_policy, CGroupDevicePolicy); diff --git a/src/libcore/dbus-execute.c b/src/libcore/dbus-execute.c index 06943c6365..b5530d945e 100644 --- a/src/libcore/dbus-execute.c +++ b/src/libcore/dbus-execute.c @@ -23,28 +23,28 @@ #include <seccomp.h> #endif -#include "af-list.h" -#include "alloc-util.h" -#include "bus-util.h" -#include "capability-util.h" +#include "basic/af-list.h" +#include "basic/alloc-util.h" +#include "shared/bus-util.h" +#include "basic/capability-util.h" #include "dbus-execute.h" -#include "env-util.h" +#include "basic/env-util.h" #include "execute.h" -#include "fd-util.h" -#include "fileio.h" -#include "ioprio.h" -#include "missing.h" +#include "basic/fd-util.h" +#include "basic/fileio.h" +#include "basic/ioprio.h" +#include "basic/missing.h" #include "namespace.h" -#include "parse-util.h" -#include "path-util.h" -#include "process-util.h" -#include "rlimit-util.h" +#include "basic/parse-util.h" +#include "basic/path-util.h" +#include "basic/process-util.h" +#include "basic/rlimit-util.h" #ifdef HAVE_SECCOMP -#include "seccomp-util.h" +#include "shared/seccomp-util.h" #endif -#include "strv.h" -#include "syslog-util.h" -#include "utf8.h" +#include "basic/strv.h" +#include "basic/syslog-util.h" +#include "basic/utf8.h" BUS_DEFINE_PROPERTY_GET_ENUM(bus_property_get_exec_output, exec_output, ExecOutput); diff --git a/src/libcore/dbus-job.c b/src/libcore/dbus-job.c index 1d739787bb..dde6aa28ef 100644 --- a/src/libcore/dbus-job.c +++ b/src/libcore/dbus-job.c @@ -19,13 +19,13 @@ #include <systemd/sd-bus.h> -#include "alloc-util.h" +#include "basic/alloc-util.h" #include "dbus-job.h" #include "dbus.h" #include "job.h" -#include "log.h" +#include "basic/log.h" #include "selinux-access.h" -#include "string-util.h" +#include "basic/string-util.h" static BUS_DEFINE_PROPERTY_GET_ENUM(property_get_type, job_type, JobType); static BUS_DEFINE_PROPERTY_GET_ENUM(property_get_state, job_state, JobState); diff --git a/src/libcore/dbus-kill.c b/src/libcore/dbus-kill.c index 0f54c6b84b..cd76682298 100644 --- a/src/libcore/dbus-kill.c +++ b/src/libcore/dbus-kill.c @@ -17,10 +17,10 @@ along with systemd; If not, see <http://www.gnu.org/licenses/>. ***/ -#include "bus-util.h" +#include "shared/bus-util.h" #include "dbus-kill.h" #include "kill.h" -#include "signal-util.h" +#include "basic/signal-util.h" static BUS_DEFINE_PROPERTY_GET_ENUM(property_get_kill_mode, kill_mode, KillMode); diff --git a/src/libcore/dbus-manager.c b/src/libcore/dbus-manager.c index 86722e1162..59f8a7908a 100644 --- a/src/libcore/dbus-manager.c +++ b/src/libcore/dbus-manager.c @@ -21,30 +21,30 @@ #include <sys/prctl.h> #include <unistd.h> -#include "alloc-util.h" -#include "architecture.h" -#include "build.h" -#include "bus-common-errors.h" -#include "clock-util.h" +#include "basic/alloc-util.h" +#include "basic/architecture.h" +#include "basic/build.h" +#include "sd-bus/bus-common-errors.h" +#include "basic/clock-util.h" #include "dbus-execute.h" #include "dbus-job.h" #include "dbus-manager.h" #include "dbus-unit.h" #include "dbus.h" -#include "env-util.h" -#include "fd-util.h" -#include "fileio.h" -#include "formats-util.h" -#include "install.h" -#include "log.h" -#include "path-util.h" +#include "basic/env-util.h" +#include "basic/fd-util.h" +#include "basic/fileio.h" +#include "basic/formats-util.h" +#include "shared/install.h" +#include "basic/log.h" +#include "basic/path-util.h" #include "selinux-access.h" -#include "stat-util.h" -#include "string-util.h" -#include "strv.h" -#include "syslog-util.h" -#include "virt.h" -#include "watchdog.h" +#include "basic/stat-util.h" +#include "basic/string-util.h" +#include "basic/strv.h" +#include "basic/syslog-util.h" +#include "basic/virt.h" +#include "shared/watchdog.h" static int property_get_version( sd_bus *bus, diff --git a/src/libcore/dbus-mount.c b/src/libcore/dbus-mount.c index 935db7c48b..e6e824b6b9 100644 --- a/src/libcore/dbus-mount.c +++ b/src/libcore/dbus-mount.c @@ -17,13 +17,13 @@ along with systemd; If not, see <http://www.gnu.org/licenses/>. ***/ -#include "bus-util.h" +#include "shared/bus-util.h" #include "dbus-cgroup.h" #include "dbus-execute.h" #include "dbus-kill.h" #include "dbus-mount.h" #include "mount.h" -#include "string-util.h" +#include "basic/string-util.h" #include "unit.h" static int property_get_what( diff --git a/src/libcore/dbus-path.c b/src/libcore/dbus-path.c index 1e153e503f..2f2a65d4c1 100644 --- a/src/libcore/dbus-path.c +++ b/src/libcore/dbus-path.c @@ -17,10 +17,10 @@ along with systemd; If not, see <http://www.gnu.org/licenses/>. ***/ -#include "bus-util.h" +#include "shared/bus-util.h" #include "dbus-path.h" #include "path.h" -#include "string-util.h" +#include "basic/string-util.h" #include "unit.h" static BUS_DEFINE_PROPERTY_GET_ENUM(property_get_result, path_result, PathResult); diff --git a/src/libcore/dbus-scope.c b/src/libcore/dbus-scope.c index 34ee9a8fa9..3a9c3b98ec 100644 --- a/src/libcore/dbus-scope.c +++ b/src/libcore/dbus-scope.c @@ -17,10 +17,10 @@ along with systemd; If not, see <http://www.gnu.org/licenses/>. ***/ -#include "alloc-util.h" -#include "bus-common-errors.h" -#include "bus-internal.h" -#include "bus-util.h" +#include "basic/alloc-util.h" +#include "sd-bus/bus-common-errors.h" +#include "sd-bus/bus-internal.h" +#include "shared/bus-util.h" #include "dbus-cgroup.h" #include "dbus-kill.h" #include "dbus-scope.h" diff --git a/src/libcore/dbus-service.c b/src/libcore/dbus-service.c index 03eecca911..463d9da4e1 100644 --- a/src/libcore/dbus-service.c +++ b/src/libcore/dbus-service.c @@ -17,19 +17,19 @@ along with systemd; If not, see <http://www.gnu.org/licenses/>. ***/ -#include "alloc-util.h" -#include "async.h" -#include "bus-util.h" +#include "basic/alloc-util.h" +#include "basic/async.h" +#include "shared/bus-util.h" #include "dbus-cgroup.h" #include "dbus-execute.h" #include "dbus-kill.h" #include "dbus-service.h" -#include "fd-util.h" -#include "fileio.h" -#include "path-util.h" +#include "basic/fd-util.h" +#include "basic/fileio.h" +#include "basic/path-util.h" #include "service.h" -#include "string-util.h" -#include "strv.h" +#include "basic/string-util.h" +#include "basic/strv.h" #include "unit.h" static BUS_DEFINE_PROPERTY_GET_ENUM(property_get_type, service_type, ServiceType); diff --git a/src/libcore/dbus-socket.c b/src/libcore/dbus-socket.c index 961340608d..53c9911991 100644 --- a/src/libcore/dbus-socket.c +++ b/src/libcore/dbus-socket.c @@ -17,13 +17,13 @@ along with systemd; If not, see <http://www.gnu.org/licenses/>. ***/ -#include "alloc-util.h" -#include "bus-util.h" +#include "basic/alloc-util.h" +#include "shared/bus-util.h" #include "dbus-cgroup.h" #include "dbus-execute.h" #include "dbus-socket.h" #include "socket.h" -#include "string-util.h" +#include "basic/string-util.h" #include "unit.h" static BUS_DEFINE_PROPERTY_GET_ENUM(property_get_result, socket_result, SocketResult); diff --git a/src/libcore/dbus-swap.c b/src/libcore/dbus-swap.c index 292f8738c6..2cfc8bd496 100644 --- a/src/libcore/dbus-swap.c +++ b/src/libcore/dbus-swap.c @@ -18,11 +18,11 @@ along with systemd; If not, see <http://www.gnu.org/licenses/>. ***/ -#include "bus-util.h" +#include "shared/bus-util.h" #include "dbus-cgroup.h" #include "dbus-execute.h" #include "dbus-swap.h" -#include "string-util.h" +#include "basic/string-util.h" #include "swap.h" #include "unit.h" diff --git a/src/libcore/dbus-timer.c b/src/libcore/dbus-timer.c index a0e61b023e..be84522036 100644 --- a/src/libcore/dbus-timer.c +++ b/src/libcore/dbus-timer.c @@ -17,10 +17,10 @@ along with systemd; If not, see <http://www.gnu.org/licenses/>. ***/ -#include "alloc-util.h" -#include "bus-util.h" +#include "basic/alloc-util.h" +#include "shared/bus-util.h" #include "dbus-timer.h" -#include "strv.h" +#include "basic/strv.h" #include "timer.h" #include "unit.h" diff --git a/src/libcore/dbus-unit.c b/src/libcore/dbus-unit.c index dcd8db0898..dd5d6e4c5e 100644 --- a/src/libcore/dbus-unit.c +++ b/src/libcore/dbus-unit.c @@ -19,21 +19,21 @@ #include <systemd/sd-bus.h> -#include "alloc-util.h" -#include "bus-common-errors.h" -#include "cgroup-util.h" +#include "basic/alloc-util.h" +#include "sd-bus/bus-common-errors.h" +#include "basic/cgroup-util.h" #include "dbus-unit.h" #include "dbus.h" -#include "fd-util.h" -#include "locale-util.h" -#include "log.h" -#include "process-util.h" +#include "basic/fd-util.h" +#include "basic/locale-util.h" +#include "basic/log.h" +#include "basic/process-util.h" #include "selinux-access.h" -#include "signal-util.h" -#include "special.h" -#include "string-util.h" -#include "strv.h" -#include "user-util.h" +#include "basic/signal-util.h" +#include "basic/special.h" +#include "basic/string-util.h" +#include "basic/strv.h" +#include "basic/user-util.h" static BUS_DEFINE_PROPERTY_GET_ENUM(property_get_load_state, unit_load_state, UnitLoadState); static BUS_DEFINE_PROPERTY_GET_ENUM(property_get_job_mode, job_mode, JobMode); diff --git a/src/libcore/dbus.c b/src/libcore/dbus.c index 1b217da303..d1d6248041 100644 --- a/src/libcore/dbus.c +++ b/src/libcore/dbus.c @@ -23,11 +23,11 @@ #include <systemd/sd-bus.h> -#include "alloc-util.h" -#include "bus-common-errors.h" -#include "bus-error.h" -#include "bus-internal.h" -#include "bus-util.h" +#include "basic/alloc-util.h" +#include "sd-bus/bus-common-errors.h" +#include "sd-bus/bus-error.h" +#include "sd-bus/bus-internal.h" +#include "shared/bus-util.h" #include "dbus-cgroup.h" #include "dbus-execute.h" #include "dbus-job.h" @@ -35,16 +35,16 @@ #include "dbus-manager.h" #include "dbus-unit.h" #include "dbus.h" -#include "fd-util.h" -#include "log.h" -#include "missing.h" -#include "mkdir.h" +#include "basic/fd-util.h" +#include "basic/log.h" +#include "basic/missing.h" +#include "basic/mkdir.h" #include "selinux-access.h" -#include "special.h" -#include "string-util.h" -#include "strv.h" -#include "strxcpyx.h" -#include "user-util.h" +#include "basic/special.h" +#include "basic/string-util.h" +#include "basic/strv.h" +#include "basic/strxcpyx.h" +#include "basic/user-util.h" #define CONNECTIONS_MAX 4096 diff --git a/src/libcore/device.c b/src/libcore/device.c index 16e56efcc3..10e9e9ae76 100644 --- a/src/libcore/device.c +++ b/src/libcore/device.c @@ -22,17 +22,17 @@ #include "libudev.h" -#include "alloc-util.h" +#include "basic/alloc-util.h" #include "dbus-device.h" #include "device.h" -#include "log.h" -#include "parse-util.h" -#include "path-util.h" -#include "stat-util.h" -#include "string-util.h" +#include "basic/log.h" +#include "basic/parse-util.h" +#include "basic/path-util.h" +#include "basic/stat-util.h" +#include "basic/string-util.h" #include "swap.h" -#include "udev-util.h" -#include "unit-name.h" +#include "shared/udev-util.h" +#include "basic/unit-name.h" #include "unit.h" static const UnitActiveState state_translation_table[_DEVICE_STATE_MAX] = { diff --git a/src/libcore/execute.c b/src/libcore/execute.c index b58fb80be2..e7628bceb3 100644 --- a/src/libcore/execute.c +++ b/src/libcore/execute.c @@ -51,53 +51,53 @@ #include <systemd/sd-messages.h> -#include "af-list.h" -#include "alloc-util.h" +#include "basic/af-list.h" +#include "basic/alloc-util.h" #ifdef HAVE_APPARMOR -#include "apparmor-util.h" +#include "shared/apparmor-util.h" #endif -#include "async.h" -#include "barrier.h" -#include "cap-list.h" -#include "capability-util.h" -#include "def.h" -#include "env-util.h" -#include "errno-list.h" +#include "basic/async.h" +#include "basic/barrier.h" +#include "basic/cap-list.h" +#include "basic/capability-util.h" +#include "basic/def.h" +#include "basic/env-util.h" +#include "basic/errno-list.h" #include "execute.h" -#include "exit-status.h" -#include "fd-util.h" -#include "fileio.h" -#include "formats-util.h" -#include "fs-util.h" -#include "glob-util.h" -#include "io-util.h" -#include "ioprio.h" -#include "log.h" -#include "macro.h" -#include "missing.h" -#include "mkdir.h" +#include "basic/exit-status.h" +#include "basic/fd-util.h" +#include "basic/fileio.h" +#include "basic/formats-util.h" +#include "basic/fs-util.h" +#include "basic/glob-util.h" +#include "basic/io-util.h" +#include "basic/ioprio.h" +#include "basic/log.h" +#include "basic/macro.h" +#include "basic/missing.h" +#include "basic/mkdir.h" #include "namespace.h" -#include "parse-util.h" -#include "path-util.h" -#include "process-util.h" -#include "rlimit-util.h" -#include "rm-rf.h" +#include "basic/parse-util.h" +#include "basic/path-util.h" +#include "basic/process-util.h" +#include "basic/rlimit-util.h" +#include "basic/rm-rf.h" #ifdef HAVE_SECCOMP -#include "seccomp-util.h" +#include "shared/seccomp-util.h" #endif -#include "securebits.h" -#include "selinux-util.h" -#include "signal-util.h" -#include "smack-util.h" -#include "string-table.h" -#include "string-util.h" -#include "strv.h" -#include "syslog-util.h" -#include "terminal-util.h" +#include "basic/securebits.h" +#include "basic/selinux-util.h" +#include "basic/signal-util.h" +#include "basic/smack-util.h" +#include "basic/string-table.h" +#include "basic/string-util.h" +#include "basic/strv.h" +#include "basic/syslog-util.h" +#include "basic/terminal-util.h" #include "unit.h" -#include "user-util.h" -#include "util.h" -#include "utmp-wtmp.h" +#include "basic/user-util.h" +#include "basic/util.h" +#include "shared/utmp-wtmp.h" #define IDLE_TIMEOUT_USEC (5*USEC_PER_SEC) #define IDLE_TIMEOUT2_USEC (1*USEC_PER_SEC) diff --git a/src/libcore/execute.h b/src/libcore/execute.h index 41148bcea2..190a56f443 100644 --- a/src/libcore/execute.h +++ b/src/libcore/execute.h @@ -30,9 +30,9 @@ typedef struct ExecParameters ExecParameters; #include <stdio.h> #include <sys/capability.h> -#include "fdset.h" -#include "list.h" -#include "missing.h" +#include "basic/fdset.h" +#include "basic/list.h" +#include "basic/missing.h" #include "namespace.h" typedef enum ExecUtmpMode { @@ -199,7 +199,7 @@ struct ExecContext { bool no_new_privileges_set:1; }; -#include "cgroup-util.h" +#include "basic/cgroup-util.h" #include "cgroup.h" struct ExecParameters { diff --git a/src/libcore/failure-action.c b/src/libcore/failure-action.c index ddae46190f..be76c15a37 100644 --- a/src/libcore/failure-action.c +++ b/src/libcore/failure-action.c @@ -21,12 +21,12 @@ #include <sys/reboot.h> #include <linux/reboot.h> -#include "bus-error.h" -#include "bus-util.h" +#include "sd-bus/bus-error.h" +#include "shared/bus-util.h" #include "failure-action.h" -#include "special.h" -#include "string-table.h" -#include "terminal-util.h" +#include "basic/special.h" +#include "basic/string-table.h" +#include "basic/terminal-util.h" static void log_and_status(Manager *m, const char *message) { log_warning("%s", message); diff --git a/src/libcore/failure-action.h b/src/libcore/failure-action.h index 1adac4ad5c..96c6b51cb2 100644 --- a/src/libcore/failure-action.h +++ b/src/libcore/failure-action.h @@ -32,7 +32,7 @@ typedef enum FailureAction { _FAILURE_ACTION_INVALID = -1 } FailureAction; -#include "macro.h" +#include "basic/macro.h" #include "manager.h" int failure_action(Manager *m, FailureAction action, const char *reboot_arg); diff --git a/src/libcore/hostname-setup.c b/src/libcore/hostname-setup.c index 68be52856b..0085c0d405 100644 --- a/src/libcore/hostname-setup.c +++ b/src/libcore/hostname-setup.c @@ -21,14 +21,14 @@ #include <stdio.h> #include <stdlib.h> -#include "alloc-util.h" -#include "fileio.h" +#include "basic/alloc-util.h" +#include "basic/fileio.h" #include "hostname-setup.h" -#include "hostname-util.h" -#include "log.h" -#include "macro.h" -#include "string-util.h" -#include "util.h" +#include "basic/hostname-util.h" +#include "basic/log.h" +#include "basic/macro.h" +#include "basic/string-util.h" +#include "basic/util.h" int hostname_setup(void) { int r; diff --git a/src/libcore/ima-setup.c b/src/libcore/ima-setup.c index d1b0ce76ef..c6eb358c9d 100644 --- a/src/libcore/ima-setup.c +++ b/src/libcore/ima-setup.c @@ -22,11 +22,11 @@ #include <errno.h> #include <unistd.h> -#include "fd-util.h" -#include "fileio.h" +#include "basic/fd-util.h" +#include "basic/fileio.h" #include "ima-setup.h" -#include "log.h" -#include "util.h" +#include "basic/log.h" +#include "basic/util.h" #define IMA_SECFS_DIR "/sys/kernel/security/ima" #define IMA_SECFS_POLICY IMA_SECFS_DIR "/policy" diff --git a/src/libcore/job.c b/src/libcore/job.c index 42fdcb988a..1a24a7f152 100644 --- a/src/libcore/job.c +++ b/src/libcore/job.c @@ -22,24 +22,24 @@ #include <systemd/sd-id128.h> #include <systemd/sd-messages.h> -#include "alloc-util.h" -#include "async.h" +#include "basic/alloc-util.h" +#include "basic/async.h" #include "dbus-job.h" #include "dbus.h" -#include "escape.h" +#include "basic/escape.h" #include "job.h" -#include "log.h" -#include "macro.h" -#include "parse-util.h" -#include "set.h" -#include "special.h" -#include "stdio-util.h" -#include "string-table.h" -#include "string-util.h" -#include "strv.h" -#include "terminal-util.h" +#include "basic/log.h" +#include "basic/macro.h" +#include "basic/parse-util.h" +#include "basic/set.h" +#include "basic/special.h" +#include "basic/stdio-util.h" +#include "basic/string-table.h" +#include "basic/string-util.h" +#include "basic/strv.h" +#include "basic/terminal-util.h" #include "unit.h" -#include "virt.h" +#include "basic/virt.h" Job* job_new_raw(Unit *unit) { Job *j; diff --git a/src/libcore/job.h b/src/libcore/job.h index 68c2089b91..f88e5a0782 100644 --- a/src/libcore/job.h +++ b/src/libcore/job.h @@ -23,8 +23,8 @@ #include <systemd/sd-event.h> -#include "list.h" -#include "unit-name.h" +#include "basic/list.h" +#include "basic/unit-name.h" typedef struct Job Job; typedef struct JobDependency JobDependency; diff --git a/src/libcore/kill.c b/src/libcore/kill.c index 6854587d54..22e5bdb4fe 100644 --- a/src/libcore/kill.c +++ b/src/libcore/kill.c @@ -18,9 +18,9 @@ ***/ #include "kill.h" -#include "signal-util.h" -#include "string-table.h" -#include "util.h" +#include "basic/signal-util.h" +#include "basic/string-table.h" +#include "basic/util.h" void kill_context_init(KillContext *c) { assert(c); diff --git a/src/libcore/kill.h b/src/libcore/kill.h index b3d2056cb0..529e4c5377 100644 --- a/src/libcore/kill.h +++ b/src/libcore/kill.h @@ -24,7 +24,7 @@ typedef struct KillContext KillContext; #include <stdbool.h> #include <stdio.h> -#include "macro.h" +#include "basic/macro.h" typedef enum KillMode { /* The kill mode is a property of a unit. */ diff --git a/src/libcore/killall.c b/src/libcore/killall.c index 09378f7085..03bed30704 100644 --- a/src/libcore/killall.c +++ b/src/libcore/killall.c @@ -22,16 +22,16 @@ #include <sys/wait.h> #include <unistd.h> -#include "alloc-util.h" -#include "fd-util.h" -#include "formats-util.h" +#include "basic/alloc-util.h" +#include "basic/fd-util.h" +#include "basic/formats-util.h" #include "killall.h" -#include "parse-util.h" -#include "process-util.h" -#include "set.h" -#include "string-util.h" -#include "terminal-util.h" -#include "util.h" +#include "basic/parse-util.h" +#include "basic/process-util.h" +#include "basic/set.h" +#include "basic/string-util.h" +#include "basic/terminal-util.h" +#include "basic/util.h" #define TIMEOUT_USEC (10 * USEC_PER_SEC) diff --git a/src/libcore/kmod-setup.c b/src/libcore/kmod-setup.c index 3503db52ed..6ddf1137ec 100644 --- a/src/libcore/kmod-setup.c +++ b/src/libcore/kmod-setup.c @@ -24,10 +24,10 @@ #include <libkmod.h> #endif -#include "bus-util.h" -#include "capability-util.h" +#include "shared/bus-util.h" +#include "basic/capability-util.h" #include "kmod-setup.h" -#include "macro.h" +#include "basic/macro.h" #ifdef HAVE_KMOD static void systemd_kmod_log( diff --git a/src/libcore/load-dropin.c b/src/libcore/load-dropin.c index f83fa09301..bb6cf0f989 100644 --- a/src/libcore/load-dropin.c +++ b/src/libcore/load-dropin.c @@ -18,12 +18,12 @@ ***/ -#include "conf-parser.h" +#include "shared/conf-parser.h" #include "load-dropin.h" #include "load-fragment.h" -#include "log.h" -#include "strv.h" -#include "unit-name.h" +#include "basic/log.h" +#include "basic/strv.h" +#include "basic/unit-name.h" #include "unit.h" static int add_dependency_consumer( diff --git a/src/libcore/load-dropin.h b/src/libcore/load-dropin.h index 942d26724e..067661b1ff 100644 --- a/src/libcore/load-dropin.h +++ b/src/libcore/load-dropin.h @@ -19,7 +19,7 @@ along with systemd; If not, see <http://www.gnu.org/licenses/>. ***/ -#include "dropin.h" +#include "shared/dropin.h" #include "unit.h" /* Read service data supplementary drop-in directories */ diff --git a/src/libcore/load-fragment-gperf.gperf.m4 b/src/libcore/load-fragment-gperf.gperf.m4 index 8193418980..c9f6e6acf7 100644 --- a/src/libcore/load-fragment-gperf.gperf.m4 +++ b/src/libcore/load-fragment-gperf.gperf.m4 @@ -1,8 +1,8 @@ %{ #include <stddef.h> -#include "conf-parser.h" +#include "shared/conf-parser.h" #include "load-fragment.h" -#include "missing.h" +#include "basic/missing.h" %} struct ConfigPerfItem; %null_strings diff --git a/src/libcore/load-fragment.c b/src/libcore/load-fragment.c index 86b4fb071b..6d9100b189 100644 --- a/src/libcore/load-fragment.c +++ b/src/libcore/load-fragment.c @@ -30,42 +30,42 @@ #include <sys/resource.h> #include <sys/stat.h> -#include "af-list.h" -#include "alloc-util.h" -#include "bus-error.h" -#include "bus-internal.h" -#include "bus-util.h" -#include "cap-list.h" -#include "capability-util.h" +#include "basic/af-list.h" +#include "basic/alloc-util.h" +#include "sd-bus/bus-error.h" +#include "sd-bus/bus-internal.h" +#include "shared/bus-util.h" +#include "basic/cap-list.h" +#include "basic/capability-util.h" #include "cgroup.h" -#include "conf-parser.h" -#include "cpu-set-util.h" -#include "env-util.h" -#include "errno-list.h" -#include "escape.h" -#include "fd-util.h" -#include "fs-util.h" -#include "ioprio.h" +#include "shared/conf-parser.h" +#include "basic/cpu-set-util.h" +#include "basic/env-util.h" +#include "basic/errno-list.h" +#include "basic/escape.h" +#include "basic/fd-util.h" +#include "basic/fs-util.h" +#include "basic/ioprio.h" #include "load-fragment.h" -#include "log.h" -#include "missing.h" -#include "parse-util.h" -#include "path-util.h" -#include "process-util.h" -#include "rlimit-util.h" +#include "basic/log.h" +#include "basic/missing.h" +#include "basic/parse-util.h" +#include "basic/path-util.h" +#include "basic/process-util.h" +#include "basic/rlimit-util.h" #ifdef HAVE_SECCOMP -#include "seccomp-util.h" +#include "shared/seccomp-util.h" #endif -#include "securebits.h" -#include "signal-util.h" -#include "stat-util.h" -#include "string-util.h" -#include "strv.h" -#include "unit-name.h" +#include "basic/securebits.h" +#include "basic/signal-util.h" +#include "basic/stat-util.h" +#include "basic/string-util.h" +#include "basic/strv.h" +#include "basic/unit-name.h" #include "unit-printf.h" #include "unit.h" -#include "utf8.h" -#include "web-util.h" +#include "basic/utf8.h" +#include "basic/web-util.h" int config_parse_warn_compat( const char *unit, diff --git a/src/libcore/locale-setup.c b/src/libcore/locale-setup.c index ccf61d29fb..1c9660cdf4 100644 --- a/src/libcore/locale-setup.c +++ b/src/libcore/locale-setup.c @@ -20,14 +20,14 @@ #include <errno.h> #include <stdlib.h> -#include "env-util.h" -#include "fileio.h" +#include "basic/env-util.h" +#include "basic/fileio.h" #include "locale-setup.h" -#include "locale-util.h" -#include "string-util.h" -#include "strv.h" -#include "util.h" -#include "virt.h" +#include "basic/locale-util.h" +#include "basic/string-util.h" +#include "basic/strv.h" +#include "basic/util.h" +#include "basic/virt.h" int locale_setup(char ***environment) { char **add; diff --git a/src/libcore/loopback-setup.c b/src/libcore/loopback-setup.c index d56bbfa6fc..8affda895c 100644 --- a/src/libcore/loopback-setup.c +++ b/src/libcore/loopback-setup.c @@ -23,8 +23,7 @@ #include <systemd/sd-netlink.h> #include "loopback-setup.h" -#include "missing.h" -#include "netlink-util.h" +#include "basic/missing.h" static int start_loopback(sd_netlink *rtnl) { _cleanup_(sd_netlink_message_unrefp) sd_netlink_message *req = NULL; diff --git a/src/libcore/machine-id-setup.c b/src/libcore/machine-id-setup.c index 812e4b038c..702cc90e89 100644 --- a/src/libcore/machine-id-setup.c +++ b/src/libcore/machine-id-setup.c @@ -27,24 +27,24 @@ #include <systemd/sd-id128.h> -#include "alloc-util.h" -#include "fd-util.h" -#include "fileio.h" -#include "fs-util.h" -#include "hexdecoct.h" -#include "io-util.h" -#include "log.h" +#include "basic/alloc-util.h" +#include "basic/fd-util.h" +#include "basic/fileio.h" +#include "basic/fs-util.h" +#include "basic/hexdecoct.h" +#include "basic/io-util.h" +#include "basic/log.h" #include "machine-id-setup.h" -#include "macro.h" -#include "mkdir.h" -#include "mount-util.h" -#include "path-util.h" -#include "process-util.h" -#include "stat-util.h" -#include "string-util.h" -#include "umask-util.h" -#include "util.h" -#include "virt.h" +#include "basic/macro.h" +#include "basic/mkdir.h" +#include "basic/mount-util.h" +#include "basic/path-util.h" +#include "basic/process-util.h" +#include "basic/stat-util.h" +#include "basic/string-util.h" +#include "basic/umask-util.h" +#include "basic/util.h" +#include "basic/virt.h" static int shorten_uuid(char destination[34], const char source[36]) { unsigned i, j; diff --git a/src/libcore/manager.c b/src/libcore/manager.c index 831fdbaabf..9019967300 100644 --- a/src/libcore/manager.c +++ b/src/libcore/manager.c @@ -38,53 +38,53 @@ #include <systemd/sd-daemon.h> #include <systemd/sd-messages.h> -#include "alloc-util.h" +#include "basic/alloc-util.h" #include "audit-fd.h" -#include "boot-timestamps.h" -#include "bus-common-errors.h" -#include "bus-error.h" -#include "bus-kernel.h" -#include "bus-util.h" +#include "shared/boot-timestamps.h" +#include "sd-bus/bus-common-errors.h" +#include "sd-bus/bus-error.h" +#include "sd-bus/bus-kernel.h" +#include "shared/bus-util.h" #include "dbus-job.h" #include "dbus-manager.h" #include "dbus-unit.h" #include "dbus.h" -#include "dirent-util.h" -#include "env-util.h" -#include "escape.h" -#include "exit-status.h" -#include "fd-util.h" -#include "fileio.h" -#include "fs-util.h" -#include "hashmap.h" -#include "io-util.h" +#include "basic/dirent-util.h" +#include "basic/env-util.h" +#include "basic/escape.h" +#include "basic/exit-status.h" +#include "basic/fd-util.h" +#include "basic/fileio.h" +#include "basic/fs-util.h" +#include "basic/hashmap.h" +#include "basic/io-util.h" #include "locale-setup.h" -#include "log.h" -#include "macro.h" +#include "basic/log.h" +#include "basic/macro.h" #include "manager.h" -#include "missing.h" -#include "mkdir.h" -#include "mkdir.h" -#include "parse-util.h" -#include "path-lookup.h" -#include "path-util.h" -#include "process-util.h" -#include "ratelimit.h" -#include "rm-rf.h" -#include "signal-util.h" -#include "special.h" -#include "stat-util.h" -#include "string-table.h" -#include "string-util.h" -#include "strv.h" -#include "terminal-util.h" -#include "time-util.h" +#include "basic/missing.h" +#include "basic/mkdir.h" +#include "basic/mkdir.h" +#include "basic/parse-util.h" +#include "shared/path-lookup.h" +#include "basic/path-util.h" +#include "basic/process-util.h" +#include "basic/ratelimit.h" +#include "basic/rm-rf.h" +#include "basic/signal-util.h" +#include "basic/special.h" +#include "basic/stat-util.h" +#include "basic/string-table.h" +#include "basic/string-util.h" +#include "basic/strv.h" +#include "basic/terminal-util.h" +#include "basic/time-util.h" #include "transaction.h" -#include "umask-util.h" -#include "unit-name.h" -#include "util.h" -#include "virt.h" -#include "watchdog.h" +#include "basic/umask-util.h" +#include "basic/unit-name.h" +#include "basic/util.h" +#include "basic/virt.h" +#include "shared/watchdog.h" #define NOTIFY_RCVBUF_SIZE (8*1024*1024) #define CGROUPS_AGENT_RCVBUF_SIZE (8*1024*1024) diff --git a/src/libcore/manager.h b/src/libcore/manager.h index 70d79ce549..87186b6e40 100644 --- a/src/libcore/manager.h +++ b/src/libcore/manager.h @@ -26,11 +26,11 @@ #include <systemd/sd-bus.h> #include <systemd/sd-event.h> -#include "cgroup-util.h" -#include "fdset.h" -#include "hashmap.h" -#include "list.h" -#include "ratelimit.h" +#include "basic/cgroup-util.h" +#include "basic/fdset.h" +#include "basic/hashmap.h" +#include "basic/list.h" +#include "basic/ratelimit.h" /* Enforce upper limit how many names we allow */ #define MANAGER_MAX_NAMES 131072 /* 128K */ @@ -70,9 +70,9 @@ typedef enum StatusType { #include "execute.h" #include "job.h" -#include "path-lookup.h" +#include "shared/path-lookup.h" #include "show-status.h" -#include "unit-name.h" +#include "basic/unit-name.h" struct Manager { /* Note that the set of units we know of is allowed to be diff --git a/src/libcore/mount-setup.c b/src/libcore/mount-setup.c index 40fc548b42..09df45c567 100644 --- a/src/libcore/mount-setup.c +++ b/src/libcore/mount-setup.c @@ -23,25 +23,25 @@ #include <sys/mount.h> #include <unistd.h> -#include "alloc-util.h" -#include "bus-util.h" -#include "cgroup-util.h" -#include "dev-setup.h" -#include "efivars.h" -#include "label.h" -#include "log.h" -#include "macro.h" -#include "missing.h" -#include "mkdir.h" +#include "basic/alloc-util.h" +#include "shared/bus-util.h" +#include "basic/cgroup-util.h" +#include "shared/dev-setup.h" +#include "shared/efivars.h" +#include "basic/label.h" +#include "basic/log.h" +#include "basic/macro.h" +#include "basic/missing.h" +#include "basic/mkdir.h" #include "mount-setup.h" -#include "mount-util.h" -#include "path-util.h" -#include "set.h" -#include "smack-util.h" -#include "strv.h" -#include "user-util.h" -#include "util.h" -#include "virt.h" +#include "basic/mount-util.h" +#include "basic/path-util.h" +#include "basic/set.h" +#include "basic/smack-util.h" +#include "basic/strv.h" +#include "basic/user-util.h" +#include "basic/util.h" +#include "basic/virt.h" typedef enum MountMode { MNT_NONE = 0, diff --git a/src/libcore/mount.c b/src/libcore/mount.c index 7db9d1325b..ab6efd4a9c 100644 --- a/src/libcore/mount.c +++ b/src/libcore/mount.c @@ -24,26 +24,26 @@ #include <systemd/sd-messages.h> -#include "alloc-util.h" +#include "basic/alloc-util.h" #include "dbus-mount.h" -#include "escape.h" -#include "exit-status.h" -#include "formats-util.h" -#include "fstab-util.h" -#include "log.h" +#include "basic/escape.h" +#include "basic/exit-status.h" +#include "basic/formats-util.h" +#include "shared/fstab-util.h" +#include "basic/log.h" #include "manager.h" -#include "mkdir.h" +#include "basic/mkdir.h" #include "mount-setup.h" -#include "mount-util.h" +#include "basic/mount-util.h" #include "mount.h" -#include "parse-util.h" -#include "path-util.h" -#include "process-util.h" -#include "special.h" -#include "string-table.h" -#include "string-util.h" -#include "strv.h" -#include "unit-name.h" +#include "basic/parse-util.h" +#include "basic/path-util.h" +#include "basic/process-util.h" +#include "basic/special.h" +#include "basic/string-table.h" +#include "basic/string-util.h" +#include "basic/strv.h" +#include "basic/unit-name.h" #include "unit.h" #define RETRY_UMOUNT_MAX 32 diff --git a/src/libcore/namespace.c b/src/libcore/namespace.c index 203d122810..f7c5364437 100644 --- a/src/libcore/namespace.c +++ b/src/libcore/namespace.c @@ -26,23 +26,23 @@ #include <unistd.h> #include <linux/fs.h> -#include "alloc-util.h" -#include "dev-setup.h" -#include "fd-util.h" +#include "basic/alloc-util.h" +#include "shared/dev-setup.h" +#include "basic/fd-util.h" #include "loopback-setup.h" -#include "missing.h" -#include "mkdir.h" -#include "mount-util.h" +#include "basic/missing.h" +#include "basic/mkdir.h" +#include "basic/mount-util.h" #include "namespace.h" -#include "path-util.h" -#include "selinux-util.h" -#include "socket-util.h" -#include "string-table.h" -#include "string-util.h" -#include "strv.h" -#include "umask-util.h" -#include "user-util.h" -#include "util.h" +#include "basic/path-util.h" +#include "basic/selinux-util.h" +#include "basic/socket-util.h" +#include "basic/string-table.h" +#include "basic/string-util.h" +#include "basic/strv.h" +#include "basic/umask-util.h" +#include "basic/user-util.h" +#include "basic/util.h" #define DEV_MOUNT_OPTIONS (MS_NOSUID|MS_STRICTATIME|MS_NOEXEC) diff --git a/src/libcore/namespace.h b/src/libcore/namespace.h index b54b7b47d6..03097327dd 100644 --- a/src/libcore/namespace.h +++ b/src/libcore/namespace.h @@ -21,7 +21,7 @@ #include <stdbool.h> -#include "macro.h" +#include "basic/macro.h" typedef enum ProtectHome { PROTECT_HOME_NO, diff --git a/src/libcore/path.c b/src/libcore/path.c index 0dd0d375d8..782e085174 100644 --- a/src/libcore/path.c +++ b/src/libcore/path.c @@ -22,20 +22,20 @@ #include <sys/inotify.h> #include <unistd.h> -#include "bus-error.h" -#include "bus-util.h" +#include "sd-bus/bus-error.h" +#include "shared/bus-util.h" #include "dbus-path.h" -#include "fd-util.h" -#include "fs-util.h" -#include "glob-util.h" -#include "macro.h" -#include "mkdir.h" +#include "basic/fd-util.h" +#include "basic/fs-util.h" +#include "basic/glob-util.h" +#include "basic/macro.h" +#include "basic/mkdir.h" #include "path.h" -#include "special.h" -#include "stat-util.h" -#include "string-table.h" -#include "string-util.h" -#include "unit-name.h" +#include "basic/special.h" +#include "basic/stat-util.h" +#include "basic/string-table.h" +#include "basic/string-util.h" +#include "basic/unit-name.h" #include "unit.h" static const UnitActiveState state_translation_table[_PATH_STATE_MAX] = { diff --git a/src/libcore/scope.c b/src/libcore/scope.c index 238f63a729..baf1051375 100644 --- a/src/libcore/scope.c +++ b/src/libcore/scope.c @@ -20,16 +20,16 @@ #include <errno.h> #include <unistd.h> -#include "alloc-util.h" +#include "basic/alloc-util.h" #include "dbus-scope.h" #include "load-dropin.h" -#include "log.h" +#include "basic/log.h" #include "scope.h" -#include "special.h" -#include "string-table.h" -#include "string-util.h" -#include "strv.h" -#include "unit-name.h" +#include "basic/special.h" +#include "basic/string-table.h" +#include "basic/string-util.h" +#include "basic/strv.h" +#include "basic/unit-name.h" #include "unit.h" static const UnitActiveState state_translation_table[_SCOPE_STATE_MAX] = { diff --git a/src/libcore/selinux-access.c b/src/libcore/selinux-access.c index 2c04fb0a8f..a259e128c1 100644 --- a/src/libcore/selinux-access.c +++ b/src/libcore/selinux-access.c @@ -31,15 +31,15 @@ #include <systemd/sd-bus.h> -#include "alloc-util.h" +#include "basic/alloc-util.h" #include "audit-fd.h" -#include "bus-util.h" -#include "log.h" -#include "path-util.h" -#include "selinux-util.h" -#include "stdio-util.h" -#include "strv.h" -#include "util.h" +#include "shared/bus-util.h" +#include "basic/log.h" +#include "basic/path-util.h" +#include "basic/selinux-util.h" +#include "basic/stdio-util.h" +#include "basic/strv.h" +#include "basic/util.h" static bool initialized = false; diff --git a/src/libcore/selinux-access.h b/src/libcore/selinux-access.h index cbf33ef6c4..1b1a8418ec 100644 --- a/src/libcore/selinux-access.h +++ b/src/libcore/selinux-access.h @@ -21,7 +21,7 @@ #include <systemd/sd-bus.h> -#include "bus-util.h" +#include "shared/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); diff --git a/src/libcore/selinux-setup.c b/src/libcore/selinux-setup.c index 4072df58e6..37a143bce4 100644 --- a/src/libcore/selinux-setup.c +++ b/src/libcore/selinux-setup.c @@ -25,12 +25,12 @@ #include <selinux/selinux.h> #endif -#include "log.h" -#include "macro.h" +#include "basic/log.h" +#include "basic/macro.h" #include "selinux-setup.h" -#include "selinux-util.h" -#include "string-util.h" -#include "util.h" +#include "basic/selinux-util.h" +#include "basic/string-util.h" +#include "basic/util.h" #ifdef HAVE_SELINUX _printf_(2,3) diff --git a/src/libcore/service.c b/src/libcore/service.c index 7ebabca5d6..2845a841c3 100644 --- a/src/libcore/service.c +++ b/src/libcore/service.c @@ -21,38 +21,38 @@ #include <signal.h> #include <unistd.h> -#include "alloc-util.h" -#include "async.h" -#include "bus-error.h" -#include "bus-kernel.h" -#include "bus-util.h" +#include "basic/alloc-util.h" +#include "basic/async.h" +#include "sd-bus/bus-error.h" +#include "sd-bus/bus-kernel.h" +#include "shared/bus-util.h" #include "dbus-service.h" -#include "def.h" -#include "env-util.h" -#include "escape.h" -#include "exit-status.h" -#include "fd-util.h" -#include "fileio.h" -#include "formats-util.h" -#include "fs-util.h" +#include "basic/def.h" +#include "basic/env-util.h" +#include "basic/escape.h" +#include "basic/exit-status.h" +#include "basic/fd-util.h" +#include "basic/fileio.h" +#include "basic/formats-util.h" +#include "basic/fs-util.h" #include "load-dropin.h" #include "load-fragment.h" -#include "log.h" +#include "basic/log.h" #include "manager.h" -#include "parse-util.h" -#include "path-util.h" -#include "process-util.h" +#include "basic/parse-util.h" +#include "basic/path-util.h" +#include "basic/process-util.h" #include "service.h" -#include "signal-util.h" -#include "special.h" -#include "string-table.h" -#include "string-util.h" -#include "strv.h" -#include "unit-name.h" +#include "basic/signal-util.h" +#include "basic/special.h" +#include "basic/string-table.h" +#include "basic/string-util.h" +#include "basic/strv.h" +#include "basic/unit-name.h" #include "unit-printf.h" #include "unit.h" -#include "utf8.h" -#include "util.h" +#include "basic/utf8.h" +#include "basic/util.h" static const UnitActiveState state_translation_table[_SERVICE_STATE_MAX] = { [SERVICE_DEAD] = UNIT_INACTIVE, diff --git a/src/libcore/service.h b/src/libcore/service.h index 4af3d40439..66e2c387fe 100644 --- a/src/libcore/service.h +++ b/src/libcore/service.h @@ -22,10 +22,10 @@ typedef struct Service Service; typedef struct ServiceFDStore ServiceFDStore; -#include "exit-status.h" +#include "basic/exit-status.h" #include "kill.h" #include "path.h" -#include "ratelimit.h" +#include "basic/ratelimit.h" typedef enum ServiceRestart { SERVICE_RESTART_NO, diff --git a/src/libcore/show-status.c b/src/libcore/show-status.c index 59ebdc7219..03a3117f53 100644 --- a/src/libcore/show-status.c +++ b/src/libcore/show-status.c @@ -17,14 +17,14 @@ along with systemd; If not, see <http://www.gnu.org/licenses/>. ***/ -#include "alloc-util.h" -#include "fd-util.h" -#include "io-util.h" -#include "parse-util.h" +#include "basic/alloc-util.h" +#include "basic/fd-util.h" +#include "basic/io-util.h" +#include "basic/parse-util.h" #include "show-status.h" -#include "string-util.h" -#include "terminal-util.h" -#include "util.h" +#include "basic/string-util.h" +#include "basic/terminal-util.h" +#include "basic/util.h" int parse_show_status(const char *v, ShowStatus *ret) { int r; diff --git a/src/libcore/show-status.h b/src/libcore/show-status.h index 9a29e72645..56c56eb358 100644 --- a/src/libcore/show-status.h +++ b/src/libcore/show-status.h @@ -21,7 +21,7 @@ #include <stdbool.h> -#include "macro.h" +#include "basic/macro.h" /* Manager status */ diff --git a/src/libcore/slice.c b/src/libcore/slice.c index c7700b8857..d9b3fa9525 100644 --- a/src/libcore/slice.c +++ b/src/libcore/slice.c @@ -19,14 +19,14 @@ #include <errno.h> -#include "alloc-util.h" +#include "basic/alloc-util.h" #include "dbus-slice.h" -#include "log.h" +#include "basic/log.h" #include "slice.h" -#include "special.h" -#include "string-util.h" -#include "strv.h" -#include "unit-name.h" +#include "basic/special.h" +#include "basic/string-util.h" +#include "basic/strv.h" +#include "basic/unit-name.h" #include "unit.h" static const UnitActiveState state_translation_table[_SLICE_STATE_MAX] = { diff --git a/src/libcore/smack-setup.c b/src/libcore/smack-setup.c index 5a6d11cfa1..16eb234202 100644 --- a/src/libcore/smack-setup.c +++ b/src/libcore/smack-setup.c @@ -26,15 +26,15 @@ #include <stdlib.h> #include <string.h> -#include "alloc-util.h" -#include "dirent-util.h" -#include "fd-util.h" -#include "fileio.h" -#include "log.h" -#include "macro.h" +#include "basic/alloc-util.h" +#include "basic/dirent-util.h" +#include "basic/fd-util.h" +#include "basic/fileio.h" +#include "basic/log.h" +#include "basic/macro.h" #include "smack-setup.h" -#include "string-util.h" -#include "util.h" +#include "basic/string-util.h" +#include "basic/util.h" #ifdef HAVE_SMACK diff --git a/src/libcore/socket.c b/src/libcore/socket.c index f6204d04bf..7ee5edfef8 100644 --- a/src/libcore/socket.c +++ b/src/libcore/socket.c @@ -28,35 +28,35 @@ #include <unistd.h> #include <linux/sctp.h> -#include "alloc-util.h" -#include "bus-error.h" -#include "bus-util.h" -#include "copy.h" +#include "basic/alloc-util.h" +#include "sd-bus/bus-error.h" +#include "shared/bus-util.h" +#include "basic/copy.h" #include "dbus-socket.h" -#include "def.h" -#include "exit-status.h" -#include "fd-util.h" -#include "formats-util.h" -#include "io-util.h" -#include "label.h" -#include "log.h" -#include "missing.h" -#include "mkdir.h" -#include "parse-util.h" -#include "path-util.h" -#include "process-util.h" -#include "selinux-util.h" -#include "signal-util.h" -#include "smack-util.h" +#include "basic/def.h" +#include "basic/exit-status.h" +#include "basic/fd-util.h" +#include "basic/formats-util.h" +#include "basic/io-util.h" +#include "basic/label.h" +#include "basic/log.h" +#include "basic/missing.h" +#include "basic/mkdir.h" +#include "basic/parse-util.h" +#include "basic/path-util.h" +#include "basic/process-util.h" +#include "basic/selinux-util.h" +#include "basic/signal-util.h" +#include "basic/smack-util.h" #include "socket.h" -#include "special.h" -#include "string-table.h" -#include "string-util.h" -#include "strv.h" -#include "unit-name.h" +#include "basic/special.h" +#include "basic/string-table.h" +#include "basic/string-util.h" +#include "basic/strv.h" +#include "basic/unit-name.h" #include "unit-printf.h" #include "unit.h" -#include "user-util.h" +#include "basic/user-util.h" static const UnitActiveState state_translation_table[_SOCKET_STATE_MAX] = { [SOCKET_DEAD] = UNIT_INACTIVE, diff --git a/src/libcore/socket.h b/src/libcore/socket.h index 0f1ac69c6f..4f25eabd5d 100644 --- a/src/libcore/socket.h +++ b/src/libcore/socket.h @@ -23,7 +23,7 @@ typedef struct Socket Socket; #include "mount.h" #include "service.h" -#include "socket-util.h" +#include "basic/socket-util.h" typedef enum SocketExecCommand { SOCKET_EXEC_START_PRE, diff --git a/src/libcore/swap.c b/src/libcore/swap.c index a532b15be8..c08057a9fe 100644 --- a/src/libcore/swap.c +++ b/src/libcore/swap.c @@ -24,24 +24,24 @@ #include "libudev.h" -#include "alloc-util.h" +#include "basic/alloc-util.h" #include "dbus-swap.h" -#include "escape.h" -#include "exit-status.h" -#include "fd-util.h" -#include "formats-util.h" -#include "fstab-util.h" -#include "parse-util.h" -#include "path-util.h" -#include "process-util.h" -#include "special.h" -#include "string-table.h" -#include "string-util.h" +#include "basic/escape.h" +#include "basic/exit-status.h" +#include "basic/fd-util.h" +#include "basic/formats-util.h" +#include "shared/fstab-util.h" +#include "basic/parse-util.h" +#include "basic/path-util.h" +#include "basic/process-util.h" +#include "basic/special.h" +#include "basic/string-table.h" +#include "basic/string-util.h" #include "swap.h" -#include "udev-util.h" -#include "unit-name.h" +#include "shared/udev-util.h" +#include "basic/unit-name.h" #include "unit.h" -#include "virt.h" +#include "basic/virt.h" static const UnitActiveState state_translation_table[_SWAP_STATE_MAX] = { [SWAP_DEAD] = UNIT_INACTIVE, diff --git a/src/libcore/target.c b/src/libcore/target.c index 61a91aad07..25630b80e5 100644 --- a/src/libcore/target.c +++ b/src/libcore/target.c @@ -18,10 +18,10 @@ ***/ #include "dbus-target.h" -#include "log.h" -#include "special.h" -#include "string-util.h" -#include "unit-name.h" +#include "basic/log.h" +#include "basic/special.h" +#include "basic/string-util.h" +#include "basic/unit-name.h" #include "unit.h" #include "target.h" diff --git a/src/libcore/timer.c b/src/libcore/timer.c index 3206296f09..45eec02dee 100644 --- a/src/libcore/timer.c +++ b/src/libcore/timer.c @@ -19,21 +19,21 @@ #include <errno.h> -#include "alloc-util.h" -#include "bus-error.h" -#include "bus-util.h" +#include "basic/alloc-util.h" +#include "sd-bus/bus-error.h" +#include "shared/bus-util.h" #include "dbus-timer.h" -#include "fs-util.h" -#include "parse-util.h" -#include "random-util.h" -#include "special.h" -#include "string-table.h" -#include "string-util.h" +#include "basic/fs-util.h" +#include "basic/parse-util.h" +#include "basic/random-util.h" +#include "basic/special.h" +#include "basic/string-table.h" +#include "basic/string-util.h" #include "timer.h" -#include "unit-name.h" +#include "basic/unit-name.h" #include "unit.h" -#include "user-util.h" -#include "virt.h" +#include "basic/user-util.h" +#include "basic/virt.h" static const UnitActiveState state_translation_table[_TIMER_STATE_MAX] = { [TIMER_DEAD] = UNIT_INACTIVE, diff --git a/src/libcore/timer.h b/src/libcore/timer.h index 9c4b64f898..3773ec47e1 100644 --- a/src/libcore/timer.h +++ b/src/libcore/timer.h @@ -21,7 +21,7 @@ typedef struct Timer Timer; -#include "calendarspec.h" +#include "basic/calendarspec.h" typedef enum TimerBase { TIMER_ACTIVE, diff --git a/src/libcore/transaction.c b/src/libcore/transaction.c index e06a48a2f1..a0ff69e2dc 100644 --- a/src/libcore/transaction.c +++ b/src/libcore/transaction.c @@ -20,10 +20,10 @@ #include <fcntl.h> #include <unistd.h> -#include "alloc-util.h" -#include "bus-common-errors.h" -#include "bus-error.h" -#include "terminal-util.h" +#include "basic/alloc-util.h" +#include "sd-bus/bus-common-errors.h" +#include "sd-bus/bus-error.h" +#include "basic/terminal-util.h" #include "transaction.h" #include "dbus-unit.h" diff --git a/src/libcore/transaction.h b/src/libcore/transaction.h index 6a3f927b0f..73489af0e6 100644 --- a/src/libcore/transaction.h +++ b/src/libcore/transaction.h @@ -21,7 +21,7 @@ typedef struct Transaction Transaction; -#include "hashmap.h" +#include "basic/hashmap.h" #include "job.h" #include "manager.h" #include "unit.h" diff --git a/src/libcore/unit-printf.c b/src/libcore/unit-printf.c index f11df42af3..c64d45e251 100644 --- a/src/libcore/unit-printf.c +++ b/src/libcore/unit-printf.c @@ -17,17 +17,17 @@ along with systemd; If not, see <http://www.gnu.org/licenses/>. ***/ -#include "alloc-util.h" -#include "cgroup-util.h" -#include "formats-util.h" -#include "macro.h" -#include "specifier.h" -#include "string-util.h" -#include "strv.h" -#include "unit-name.h" +#include "basic/alloc-util.h" +#include "basic/cgroup-util.h" +#include "basic/formats-util.h" +#include "basic/macro.h" +#include "shared/specifier.h" +#include "basic/string-util.h" +#include "basic/strv.h" +#include "basic/unit-name.h" #include "unit-printf.h" #include "unit.h" -#include "user-util.h" +#include "basic/user-util.h" static int specifier_prefix_and_instance(char specifier, void *data, void *userdata, char **ret) { Unit *u = userdata; diff --git a/src/libcore/unit.c b/src/libcore/unit.c index 8bd39f87f9..3caa8baa26 100644 --- a/src/libcore/unit.c +++ b/src/libcore/unit.c @@ -26,38 +26,38 @@ #include <systemd/sd-id128.h> #include <systemd/sd-messages.h> -#include "alloc-util.h" -#include "bus-common-errors.h" -#include "bus-util.h" -#include "cgroup-util.h" +#include "basic/alloc-util.h" +#include "sd-bus/bus-common-errors.h" +#include "shared/bus-util.h" +#include "basic/cgroup-util.h" #include "dbus-unit.h" #include "dbus.h" -#include "dropin.h" -#include "escape.h" +#include "shared/dropin.h" +#include "basic/escape.h" #include "execute.h" -#include "fileio-label.h" -#include "formats-util.h" +#include "basic/fileio-label.h" +#include "basic/formats-util.h" #include "load-dropin.h" #include "load-fragment.h" -#include "log.h" -#include "macro.h" -#include "missing.h" -#include "mkdir.h" -#include "parse-util.h" -#include "path-util.h" -#include "process-util.h" -#include "set.h" -#include "signal-util.h" -#include "special.h" -#include "stat-util.h" -#include "stdio-util.h" -#include "string-util.h" -#include "strv.h" -#include "umask-util.h" -#include "unit-name.h" +#include "basic/log.h" +#include "basic/macro.h" +#include "basic/missing.h" +#include "basic/mkdir.h" +#include "basic/parse-util.h" +#include "basic/path-util.h" +#include "basic/process-util.h" +#include "basic/set.h" +#include "basic/signal-util.h" +#include "basic/special.h" +#include "basic/stat-util.h" +#include "basic/stdio-util.h" +#include "basic/string-util.h" +#include "basic/strv.h" +#include "basic/umask-util.h" +#include "basic/unit-name.h" #include "unit.h" -#include "user-util.h" -#include "virt.h" +#include "basic/user-util.h" +#include "basic/virt.h" const UnitVTable * const unit_vtable[_UNIT_TYPE_MAX] = { [UNIT_SERVICE] = &service_vtable, diff --git a/src/libcore/unit.h b/src/libcore/unit.h index 08a927962d..df1174b837 100644 --- a/src/libcore/unit.h +++ b/src/libcore/unit.h @@ -28,11 +28,11 @@ typedef struct UnitVTable UnitVTable; typedef struct UnitRef UnitRef; typedef struct UnitStatusMessageFormats UnitStatusMessageFormats; -#include "condition.h" +#include "shared/condition.h" #include "failure-action.h" -#include "install.h" -#include "list.h" -#include "unit-name.h" +#include "shared/install.h" +#include "basic/list.h" +#include "basic/unit-name.h" typedef enum KillOperation { KILL_TERMINATE, diff --git a/src/libfirewall/Makefile b/src/libfirewall/Makefile index ced0f7e476..ebc567cc55 100644 --- a/src/libfirewall/Makefile +++ b/src/libfirewall/Makefile @@ -39,4 +39,6 @@ libfirewall_la_LIBADD = \ $(LIBIPTC_LIBS) endif # HAVE_LIBIPTC +systemd.CPPFLAGS += $(libbasic.CPPFLAGS) + include $(topsrcdir)/build-aux/Makefile.tail.mk diff --git a/src/libfirewall/firewall-util.c b/src/libfirewall/firewall-util.c index f73108eaa3..5423b8cc3a 100644 --- a/src/libfirewall/firewall-util.c +++ b/src/libfirewall/firewall-util.c @@ -38,11 +38,11 @@ #include <linux/netfilter/xt_addrtype.h> #include <libiptc/libiptc.h> -#include "alloc-util.h" +#include "basic/alloc-util.h" #include "firewall-util.h" -#include "in-addr-util.h" -#include "macro.h" -#include "socket-util.h" +#include "basic/in-addr-util.h" +#include "basic/macro.h" +#include "basic/socket-util.h" DEFINE_TRIVIAL_CLEANUP_FUNC(struct xtc_handle*, iptc_free); diff --git a/src/libfirewall/firewall-util.h b/src/libfirewall/firewall-util.h index c39b34cf8f..1e54dc0ceb 100644 --- a/src/libfirewall/firewall-util.h +++ b/src/libfirewall/firewall-util.h @@ -22,7 +22,7 @@ #include <stdbool.h> #include <stdint.h> -#include "in-addr-util.h" +#include "basic/in-addr-util.h" #ifdef HAVE_LIBIPTC diff --git a/src/libshared/include/shared/acl-util.h b/src/libshared/include/shared/acl-util.h index 396e9e067e..af5bcb5b4f 100644 --- a/src/libshared/include/shared/acl-util.h +++ b/src/libshared/include/shared/acl-util.h @@ -25,7 +25,7 @@ #include <stdbool.h> #include <sys/acl.h> -#include "macro.h" +#include "basic/macro.h" int acl_find_uid(acl_t acl, uid_t uid, acl_entry_t *entry); int calc_acl_mask_if_needed(acl_t *acl_p); diff --git a/src/libshared/include/shared/acpi-fpdt.h b/src/libshared/include/shared/acpi-fpdt.h index fc28175d0a..3da32c08ad 100644 --- a/src/libshared/include/shared/acpi-fpdt.h +++ b/src/libshared/include/shared/acpi-fpdt.h @@ -19,6 +19,6 @@ along with systemd; If not, see <http://www.gnu.org/licenses/>. ***/ -#include <time-util.h> +#include "basic/time-util.h" int acpi_get_boot_usec(usec_t *loader_start, usec_t *loader_exit); diff --git a/src/libshared/include/shared/ask-password-api.h b/src/libshared/include/shared/ask-password-api.h index 9d7f65130c..770ab1f5c0 100644 --- a/src/libshared/include/shared/ask-password-api.h +++ b/src/libshared/include/shared/ask-password-api.h @@ -21,7 +21,7 @@ #include <stdbool.h> -#include "time-util.h" +#include "basic/time-util.h" typedef enum AskPasswordFlags { ASK_PASSWORD_ACCEPT_CACHED = 1, diff --git a/src/libshared/include/shared/boot-timestamps.h b/src/libshared/include/shared/boot-timestamps.h index 6f691026be..00ea7e3009 100644 --- a/src/libshared/include/shared/boot-timestamps.h +++ b/src/libshared/include/shared/boot-timestamps.h @@ -20,6 +20,6 @@ along with systemd; If not, see <http://www.gnu.org/licenses/>. ***/ -#include <time-util.h> +#include "basic/time-util.h" int boot_timestamps(const dual_timestamp *n, dual_timestamp *firmware, dual_timestamp *loader); diff --git a/src/libshared/include/shared/bus-unit-util.h b/src/libshared/include/shared/bus-unit-util.h index 8327189a63..e657b42ecb 100644 --- a/src/libshared/include/shared/bus-unit-util.h +++ b/src/libshared/include/shared/bus-unit-util.h @@ -21,8 +21,8 @@ #include <systemd/sd-bus.h> -#include "output-mode.h" -#include "install.h" +#include "shared/output-mode.h" +#include "shared/install.h" typedef struct UnitInfo { const char *machine; diff --git a/src/libshared/include/shared/bus-util.h b/src/libshared/include/shared/bus-util.h index f2b46530ba..73f2ea0749 100644 --- a/src/libshared/include/shared/bus-util.h +++ b/src/libshared/include/shared/bus-util.h @@ -27,9 +27,9 @@ #include <systemd/sd-bus.h> #include <systemd/sd-event.h> -#include "hashmap.h" -#include "macro.h" -#include "string-util.h" +#include "basic/hashmap.h" +#include "basic/macro.h" +#include "basic/string-util.h" typedef enum BusTransport { BUS_TRANSPORT_LOCAL, diff --git a/src/libshared/include/shared/cgroup-show.h b/src/libshared/include/shared/cgroup-show.h index 5c1d6e6d98..7deb42fff7 100644 --- a/src/libshared/include/shared/cgroup-show.h +++ b/src/libshared/include/shared/cgroup-show.h @@ -22,8 +22,8 @@ #include <stdbool.h> #include <sys/types.h> -#include "logs-show.h" -#include "output-mode.h" +#include "shared/logs-show.h" +#include "shared/output-mode.h" int show_cgroup_by_path(const char *path, const char *prefix, unsigned columns, OutputFlags flags); int show_cgroup(const char *controller, const char *path, const char *prefix, unsigned columns, OutputFlags flags); diff --git a/src/libshared/include/shared/condition.h b/src/libshared/include/shared/condition.h index bdda04b770..fd798460d1 100644 --- a/src/libshared/include/shared/condition.h +++ b/src/libshared/include/shared/condition.h @@ -22,8 +22,8 @@ #include <stdbool.h> #include <stdio.h> -#include "list.h" -#include "macro.h" +#include "basic/list.h" +#include "basic/macro.h" typedef enum ConditionType { CONDITION_ARCHITECTURE, diff --git a/src/libshared/include/shared/conf-parser.h b/src/libshared/include/shared/conf-parser.h index f6964e3fd4..f7423d45e7 100644 --- a/src/libshared/include/shared/conf-parser.h +++ b/src/libshared/include/shared/conf-parser.h @@ -25,9 +25,9 @@ #include <stdio.h> #include <syslog.h> -#include "alloc-util.h" -#include "log.h" -#include "macro.h" +#include "basic/alloc-util.h" +#include "basic/log.h" +#include "basic/macro.h" /* An abstract parser for simple, line based, shallow configuration * files consisting of variable assignments only. */ diff --git a/src/libshared/include/shared/dns-domain.h b/src/libshared/include/shared/dns-domain.h index af780f0b8b..72e4cb0104 100644 --- a/src/libshared/include/shared/dns-domain.h +++ b/src/libshared/include/shared/dns-domain.h @@ -24,8 +24,8 @@ #include <stddef.h> #include <stdint.h> -#include "hashmap.h" -#include "in-addr-util.h" +#include "basic/hashmap.h" +#include "basic/in-addr-util.h" /* Length of a single label, with all escaping removed, excluding any trailing dot or NUL byte */ #define DNS_LABEL_MAX 63 diff --git a/src/libshared/include/shared/dropin.h b/src/libshared/include/shared/dropin.h index c1936f397b..44235405f6 100644 --- a/src/libshared/include/shared/dropin.h +++ b/src/libshared/include/shared/dropin.h @@ -19,10 +19,10 @@ along with systemd; If not, see <http://www.gnu.org/licenses/>. ***/ -#include "hashmap.h" -#include "macro.h" -#include "set.h" -#include "unit-name.h" +#include "basic/hashmap.h" +#include "basic/macro.h" +#include "basic/set.h" +#include "basic/unit-name.h" int drop_in_file(const char *dir, const char *unit, unsigned level, const char *name, char **_p, char **_q); diff --git a/src/libshared/include/shared/efivars.h b/src/libshared/include/shared/efivars.h index 243151f922..547b161367 100644 --- a/src/libshared/include/shared/efivars.h +++ b/src/libshared/include/shared/efivars.h @@ -25,7 +25,7 @@ #include <systemd/sd-id128.h> -#include "time-util.h" +#include "basic/time-util.h" #define EFI_VENDOR_LOADER SD_ID128_MAKE(4a,67,b0,82,0a,4c,41,cf,b6,c7,44,0b,29,bb,8c,4f) #define EFI_VENDOR_GLOBAL SD_ID128_MAKE(8b,e4,df,61,93,ca,11,d2,aa,0d,00,e0,98,03,2b,8c) diff --git a/src/libshared/include/shared/fstab-util.h b/src/libshared/include/shared/fstab-util.h index 679f6902f7..3d9e7ab907 100644 --- a/src/libshared/include/shared/fstab-util.h +++ b/src/libshared/include/shared/fstab-util.h @@ -22,7 +22,7 @@ #include <stdbool.h> #include <stddef.h> -#include "macro.h" +#include "basic/macro.h" bool fstab_is_mount_point(const char *mount); diff --git a/src/libshared/include/shared/import-util.h b/src/libshared/include/shared/import-util.h index 77b17d91f3..353fa9045c 100644 --- a/src/libshared/include/shared/import-util.h +++ b/src/libshared/include/shared/import-util.h @@ -21,7 +21,7 @@ #include <stdbool.h> -#include "macro.h" +#include "basic/macro.h" typedef enum ImportVerify { IMPORT_VERIFY_NO, diff --git a/src/libshared/include/shared/install-printf.h b/src/libshared/include/shared/install-printf.h index 8a570fc265..56099f464d 100644 --- a/src/libshared/include/shared/install-printf.h +++ b/src/libshared/include/shared/install-printf.h @@ -19,6 +19,6 @@ along with systemd; If not, see <http://www.gnu.org/licenses/>. ***/ -#include "install.h" +#include "shared/install.h" int install_full_printf(UnitFileInstallInfo *i, const char *format, char **ret); diff --git a/src/libshared/include/shared/install.h b/src/libshared/include/shared/install.h index c6aa4f6ef1..2f9b15a1c8 100644 --- a/src/libshared/include/shared/install.h +++ b/src/libshared/include/shared/install.h @@ -30,11 +30,11 @@ typedef struct UnitFileInstallInfo UnitFileInstallInfo; #include <stdbool.h> -#include "hashmap.h" -#include "macro.h" -#include "path-lookup.h" -#include "strv.h" -#include "unit-name.h" +#include "basic/hashmap.h" +#include "basic/macro.h" +#include "shared/path-lookup.h" +#include "basic/strv.h" +#include "basic/unit-name.h" enum UnitFileScope { UNIT_FILE_SYSTEM, diff --git a/src/libshared/include/shared/logs-show.h b/src/libshared/include/shared/logs-show.h index 15fe5b6e5c..8f3cadd0e3 100644 --- a/src/libshared/include/shared/logs-show.h +++ b/src/libshared/include/shared/logs-show.h @@ -26,10 +26,10 @@ #include <systemd/sd-journal.h> -#include "macro.h" -#include "output-mode.h" -#include "time-util.h" -#include "util.h" +#include "basic/macro.h" +#include "shared/output-mode.h" +#include "basic/time-util.h" +#include "basic/util.h" int output_journal( FILE *f, diff --git a/src/libshared/include/shared/machine-image.h b/src/libshared/include/shared/machine-image.h index 7410168c4f..30a005e114 100644 --- a/src/libshared/include/shared/machine-image.h +++ b/src/libshared/include/shared/machine-image.h @@ -22,12 +22,12 @@ #include <stdbool.h> #include <stdint.h> -#include "hashmap.h" -#include "lockfile-util.h" -#include "macro.h" -#include "path-util.h" -#include "string-util.h" -#include "time-util.h" +#include "basic/hashmap.h" +#include "basic/lockfile-util.h" +#include "basic/macro.h" +#include "basic/path-util.h" +#include "basic/string-util.h" +#include "basic/time-util.h" typedef enum ImageType { IMAGE_DIRECTORY, diff --git a/src/libshared/include/shared/output-mode.h b/src/libshared/include/shared/output-mode.h index f37189e57f..9a8d8127d3 100644 --- a/src/libshared/include/shared/output-mode.h +++ b/src/libshared/include/shared/output-mode.h @@ -19,7 +19,7 @@ along with systemd; If not, see <http://www.gnu.org/licenses/>. ***/ -#include "macro.h" +#include "basic/macro.h" typedef enum OutputMode { OUTPUT_SHORT, diff --git a/src/libshared/include/shared/pager.h b/src/libshared/include/shared/pager.h index 893e1d2bb6..2a3cbe1721 100644 --- a/src/libshared/include/shared/pager.h +++ b/src/libshared/include/shared/pager.h @@ -21,7 +21,7 @@ #include <stdbool.h> -#include "macro.h" +#include "basic/macro.h" int pager_open(bool no_pager, bool jump_to_end); void pager_close(void); diff --git a/src/libshared/include/shared/path-lookup.h b/src/libshared/include/shared/path-lookup.h index f9bb2fe237..c3e0a10552 100644 --- a/src/libshared/include/shared/path-lookup.h +++ b/src/libshared/include/shared/path-lookup.h @@ -23,8 +23,8 @@ typedef struct LookupPaths LookupPaths; -#include "install.h" -#include "macro.h" +#include "shared/install.h" +#include "basic/macro.h" typedef enum LookupPathsFlags { LOOKUP_PATHS_EXCLUDE_GENERATED = 1, diff --git a/src/libshared/include/shared/ptyfwd.h b/src/libshared/include/shared/ptyfwd.h index 83c1f60970..8f32184433 100644 --- a/src/libshared/include/shared/ptyfwd.h +++ b/src/libshared/include/shared/ptyfwd.h @@ -23,7 +23,7 @@ #include <systemd/sd-event.h> -#include "macro.h" +#include "basic/macro.h" typedef struct PTYForward PTYForward; diff --git a/src/libshared/include/shared/resolve-util.h b/src/libshared/include/shared/resolve-util.h index 8636a6c134..8df46599ad 100644 --- a/src/libshared/include/shared/resolve-util.h +++ b/src/libshared/include/shared/resolve-util.h @@ -19,7 +19,7 @@ along with systemd; If not, see <http://www.gnu.org/licenses/>. ***/ -#include "macro.h" +#include "basic/macro.h" typedef enum ResolveSupport ResolveSupport; typedef enum DnssecMode DnssecMode; diff --git a/src/libshared/include/shared/udev-util.h b/src/libshared/include/shared/udev-util.h index ca0889f8a6..7765918a12 100644 --- a/src/libshared/include/shared/udev-util.h +++ b/src/libshared/include/shared/udev-util.h @@ -20,7 +20,7 @@ ***/ #include "udev.h" -#include "util.h" +#include "basic/util.h" DEFINE_TRIVIAL_CLEANUP_FUNC(struct udev*, udev_unref); DEFINE_TRIVIAL_CLEANUP_FUNC(struct udev_device*, udev_device_unref); diff --git a/src/libshared/include/shared/utmp-wtmp.h b/src/libshared/include/shared/utmp-wtmp.h index 438e270a26..50dde37b16 100644 --- a/src/libshared/include/shared/utmp-wtmp.h +++ b/src/libshared/include/shared/utmp-wtmp.h @@ -22,8 +22,8 @@ #include <stdbool.h> #include <sys/types.h> -#include "time-util.h" -#include "util.h" +#include "basic/time-util.h" +#include "basic/util.h" #ifdef HAVE_UTMP int utmp_get_runlevel(int *runlevel, int *previous); diff --git a/src/libshared/include/shared/watchdog.h b/src/libshared/include/shared/watchdog.h index f6ec178ea1..78e1406f5d 100644 --- a/src/libshared/include/shared/watchdog.h +++ b/src/libshared/include/shared/watchdog.h @@ -21,8 +21,8 @@ #include <stdbool.h> -#include "time-util.h" -#include "util.h" +#include "basic/time-util.h" +#include "basic/util.h" int watchdog_set_timeout(usec_t *usec); int watchdog_ping(void); diff --git a/src/libshared/src/Makefile b/src/libshared/src/Makefile index d808b55361..08de6a2ef5 100644 --- a/src/libshared/src/Makefile +++ b/src/libshared/src/Makefile @@ -134,10 +134,27 @@ libshared_la_CFLAGS = \ libshared_la_LIBADD = \ libsystemd-internal.la \ - libsystemd-journal-internal.la \ libudev-internal.la \ $(ACL_LIBS) \ $(LIBIDN_LIBS) \ $(SECCOMP_LIBS) +systemd.CPPFLAGS += $(addprefix -I,$(call at.path,$(srcdir)/../include $(srcdir)/../include/shared)) +systemd.CPPFLAGS += -DPKGSYSCONFDIR=\"$(pkgsysconfdir)\" +systemd.CPPFLAGS += -DSYSTEM_CONFIG_UNIT_PATH=\"$(pkgsysconfdir)/system\" +systemd.CPPFLAGS += -DSYSTEM_DATA_UNIT_PATH=\"$(systemunitdir)\" +systemd.CPPFLAGS += -DSYSTEM_SYSVINIT_PATH=\"$(SYSTEM_SYSVINIT_PATH)\" +systemd.CPPFLAGS += -DSYSTEM_SYSVRCND_PATH=\"$(SYSTEM_SYSVRCND_PATH)\" +systemd.CPPFLAGS += -DUSER_CONFIG_UNIT_PATH=\"$(pkgsysconfdir)/user\" +systemd.CPPFLAGS += -DUSER_DATA_UNIT_PATH=\"$(userunitdir)\" + +systemd.CPPFLAGS += -DSYSTEMD_FSCK_PATH=\"$(libexecdir)/systemd-fsck\" + +systemd.CPPFLAGS += -DSYSTEMD_TTY_ASK_PASSWORD_AGENT_BINARY_PATH=\"$(bindir)/systemd-tty-ask-password-agent\" + +systemd.CPPFLAGS += -DSYSTEM_GENERATOR_PATH=\"$(systemgeneratordir)\" +systemd.CPPFLAGS += -DUSER_GENERATOR_PATH=\"$(usergeneratordir)\" + +systemd.CPPFLAGS += -DPOLKIT_AGENT_BINARY_PATH=\"$(bindir)/pkttyagent\" + include $(topsrcdir)/build-aux/Makefile.tail.mk diff --git a/src/libshared/src/acl-util.c b/src/libshared/src/acl-util.c index 2aa951fce9..fb19394e02 100644 --- a/src/libshared/src/acl-util.c +++ b/src/libshared/src/acl-util.c @@ -20,12 +20,12 @@ #include <errno.h> #include <stdbool.h> -#include "acl-util.h" -#include "alloc-util.h" -#include "string-util.h" -#include "strv.h" -#include "user-util.h" -#include "util.h" +#include "shared/acl-util.h" +#include "basic/alloc-util.h" +#include "basic/string-util.h" +#include "basic/strv.h" +#include "basic/user-util.h" +#include "basic/util.h" int acl_find_uid(acl_t acl, uid_t uid, acl_entry_t *entry) { acl_entry_t i; diff --git a/src/libshared/src/acpi-fpdt.c b/src/libshared/src/acpi-fpdt.c index 6779691c28..a43bf3847a 100644 --- a/src/libshared/src/acpi-fpdt.c +++ b/src/libshared/src/acpi-fpdt.c @@ -24,11 +24,11 @@ #include <string.h> #include <unistd.h> -#include "acpi-fpdt.h" -#include "alloc-util.h" -#include "fd-util.h" -#include "fileio.h" -#include "time-util.h" +#include "shared/acpi-fpdt.h" +#include "basic/alloc-util.h" +#include "basic/fd-util.h" +#include "basic/fileio.h" +#include "basic/time-util.h" struct acpi_table_header { char signature[4]; diff --git a/src/libshared/src/apparmor-util.c b/src/libshared/src/apparmor-util.c index edd695fd23..7d638d0a28 100644 --- a/src/libshared/src/apparmor-util.c +++ b/src/libshared/src/apparmor-util.c @@ -19,10 +19,10 @@ #include <stddef.h> -#include "alloc-util.h" -#include "apparmor-util.h" -#include "fileio.h" -#include "parse-util.h" +#include "basic/alloc-util.h" +#include "shared/apparmor-util.h" +#include "basic/fileio.h" +#include "basic/parse-util.h" bool mac_apparmor_use(void) { static int cached_use = -1; diff --git a/src/libshared/src/ask-password-api.c b/src/libshared/src/ask-password-api.c index 4a4bd8d3b8..864c62ee9b 100644 --- a/src/libshared/src/ask-password-api.c +++ b/src/libshared/src/ask-password-api.c @@ -39,26 +39,26 @@ #include <termios.h> #include <unistd.h> -#include "alloc-util.h" -#include "ask-password-api.h" -#include "fd-util.h" -#include "fileio.h" -#include "formats-util.h" -#include "io-util.h" -#include "log.h" -#include "macro.h" -#include "missing.h" -#include "mkdir.h" -#include "random-util.h" -#include "signal-util.h" -#include "socket-util.h" -#include "string-util.h" -#include "strv.h" -#include "terminal-util.h" -#include "time-util.h" -#include "umask-util.h" -#include "utf8.h" -#include "util.h" +#include "basic/alloc-util.h" +#include "shared/ask-password-api.h" +#include "basic/fd-util.h" +#include "basic/fileio.h" +#include "basic/formats-util.h" +#include "basic/io-util.h" +#include "basic/log.h" +#include "basic/macro.h" +#include "basic/missing.h" +#include "basic/mkdir.h" +#include "basic/random-util.h" +#include "basic/signal-util.h" +#include "basic/socket-util.h" +#include "basic/string-util.h" +#include "basic/strv.h" +#include "basic/terminal-util.h" +#include "basic/time-util.h" +#include "basic/umask-util.h" +#include "basic/utf8.h" +#include "basic/util.h" #define KEYRING_TIMEOUT_USEC ((5 * USEC_PER_MINUTE) / 2) diff --git a/src/libshared/src/base-filesystem.c b/src/libshared/src/base-filesystem.c index 59a34a9d11..ac3a1bf6b9 100644 --- a/src/libshared/src/base-filesystem.c +++ b/src/libshared/src/base-filesystem.c @@ -25,15 +25,15 @@ #include <syslog.h> #include <unistd.h> -#include "alloc-util.h" -#include "base-filesystem.h" -#include "fd-util.h" -#include "log.h" -#include "macro.h" -#include "string-util.h" -#include "umask-util.h" -#include "user-util.h" -#include "util.h" +#include "basic/alloc-util.h" +#include "shared/base-filesystem.h" +#include "basic/fd-util.h" +#include "basic/log.h" +#include "basic/macro.h" +#include "basic/string-util.h" +#include "basic/umask-util.h" +#include "basic/user-util.h" +#include "basic/util.h" typedef struct BaseFilesystem { const char *dir; diff --git a/src/libshared/src/boot-timestamps.c b/src/libshared/src/boot-timestamps.c index 7e0152761c..4d2bad0492 100644 --- a/src/libshared/src/boot-timestamps.c +++ b/src/libshared/src/boot-timestamps.c @@ -18,11 +18,11 @@ along with systemd; If not, see <http://www.gnu.org/licenses/>. ***/ -#include "acpi-fpdt.h" -#include "boot-timestamps.h" -#include "efivars.h" -#include "macro.h" -#include "time-util.h" +#include "shared/acpi-fpdt.h" +#include "shared/boot-timestamps.h" +#include "shared/efivars.h" +#include "basic/macro.h" +#include "basic/time-util.h" int boot_timestamps(const dual_timestamp *n, dual_timestamp *firmware, dual_timestamp *loader) { usec_t x = 0, y = 0, a; diff --git a/src/libshared/src/bus-unit-util.c b/src/libshared/src/bus-unit-util.c index f68c4a41ac..9ae172c181 100644 --- a/src/libshared/src/bus-unit-util.c +++ b/src/libshared/src/bus-unit-util.c @@ -17,26 +17,26 @@ along with systemd; If not, see <http://www.gnu.org/licenses/>. ***/ -#include "alloc-util.h" -#include "bus-internal.h" -#include "bus-unit-util.h" -#include "bus-util.h" -#include "cgroup-util.h" -#include "env-util.h" -#include "escape.h" -#include "hashmap.h" -#include "list.h" -#include "locale-util.h" -#include "parse-util.h" -#include "path-util.h" -#include "process-util.h" -#include "rlimit-util.h" -#include "signal-util.h" -#include "string-util.h" -#include "syslog-util.h" -#include "terminal-util.h" -#include "utf8.h" -#include "util.h" +#include "basic/alloc-util.h" +#include "sd-bus/bus-internal.h" +#include "shared/bus-unit-util.h" +#include "shared/bus-util.h" +#include "basic/cgroup-util.h" +#include "basic/env-util.h" +#include "basic/escape.h" +#include "basic/hashmap.h" +#include "basic/list.h" +#include "basic/locale-util.h" +#include "basic/parse-util.h" +#include "basic/path-util.h" +#include "basic/process-util.h" +#include "basic/rlimit-util.h" +#include "basic/signal-util.h" +#include "basic/string-util.h" +#include "basic/syslog-util.h" +#include "basic/terminal-util.h" +#include "basic/utf8.h" +#include "basic/util.h" int bus_parse_unit_info(sd_bus_message *message, UnitInfo *u) { assert(message); diff --git a/src/libshared/src/bus-util.c b/src/libshared/src/bus-util.c index 62b5585e84..6163b40679 100644 --- a/src/libshared/src/bus-util.c +++ b/src/libshared/src/bus-util.c @@ -34,21 +34,21 @@ #include <systemd/sd-event.h> #include <systemd/sd-id128.h> -#include "alloc-util.h" -#include "bus-internal.h" -#include "bus-label.h" -#include "bus-message.h" -#include "bus-util.h" -#include "def.h" -#include "escape.h" -#include "fd-util.h" -#include "missing.h" -#include "parse-util.h" -#include "proc-cmdline.h" -#include "rlimit-util.h" -#include "stdio-util.h" -#include "strv.h" -#include "user-util.h" +#include "basic/alloc-util.h" +#include "sd-bus/bus-internal.h" +#include "basic/bus-label.h" +#include "sd-bus/bus-message.h" +#include "shared/bus-util.h" +#include "basic/def.h" +#include "basic/escape.h" +#include "basic/fd-util.h" +#include "basic/missing.h" +#include "basic/parse-util.h" +#include "basic/proc-cmdline.h" +#include "basic/rlimit-util.h" +#include "basic/stdio-util.h" +#include "basic/strv.h" +#include "basic/user-util.h" static int name_owner_change_callback(sd_bus_message *m, void *userdata, sd_bus_error *ret_error) { sd_event *e = userdata; diff --git a/src/libshared/src/cgroup-show.c b/src/libshared/src/cgroup-show.c index 3e451db715..6b1b8dba99 100644 --- a/src/libshared/src/cgroup-show.c +++ b/src/libshared/src/cgroup-show.c @@ -24,18 +24,18 @@ #include <stdlib.h> #include <string.h> -#include "alloc-util.h" -#include "cgroup-show.h" -#include "cgroup-util.h" -#include "fd-util.h" -#include "formats-util.h" -#include "locale-util.h" -#include "macro.h" -#include "output-mode.h" -#include "path-util.h" -#include "process-util.h" -#include "string-util.h" -#include "terminal-util.h" +#include "basic/alloc-util.h" +#include "shared/cgroup-show.h" +#include "basic/cgroup-util.h" +#include "basic/fd-util.h" +#include "basic/formats-util.h" +#include "basic/locale-util.h" +#include "basic/macro.h" +#include "shared/output-mode.h" +#include "basic/path-util.h" +#include "basic/process-util.h" +#include "basic/string-util.h" +#include "basic/terminal-util.h" static void show_pid_array( pid_t pids[], diff --git a/src/libshared/src/clean-ipc.c b/src/libshared/src/clean-ipc.c index a3ac7aeb82..326fa32a3a 100644 --- a/src/libshared/src/clean-ipc.c +++ b/src/libshared/src/clean-ipc.c @@ -32,15 +32,15 @@ #include <sys/stat.h> #include <unistd.h> -#include "clean-ipc.h" -#include "dirent-util.h" -#include "fd-util.h" -#include "fileio.h" -#include "formats-util.h" -#include "log.h" -#include "macro.h" -#include "string-util.h" -#include "strv.h" +#include "shared/clean-ipc.h" +#include "basic/dirent-util.h" +#include "basic/fd-util.h" +#include "basic/fileio.h" +#include "basic/formats-util.h" +#include "basic/log.h" +#include "basic/macro.h" +#include "basic/string-util.h" +#include "basic/strv.h" static int clean_sysvipc_shm(uid_t delete_uid) { _cleanup_fclose_ FILE *f = NULL; diff --git a/src/libshared/src/condition.c b/src/libshared/src/condition.c index 33ca6e029e..bb0346f416 100644 --- a/src/libshared/src/condition.c +++ b/src/libshared/src/condition.c @@ -29,30 +29,30 @@ #include <systemd/sd-id128.h> -#include "alloc-util.h" -#include "apparmor-util.h" -#include "architecture.h" -#include "audit-util.h" -#include "cap-list.h" -#include "condition.h" -#include "extract-word.h" -#include "fd-util.h" -#include "glob-util.h" -#include "hostname-util.h" -#include "ima-util.h" -#include "list.h" -#include "macro.h" -#include "mount-util.h" -#include "parse-util.h" -#include "path-util.h" -#include "proc-cmdline.h" -#include "selinux-util.h" -#include "smack-util.h" -#include "stat-util.h" -#include "string-table.h" -#include "string-util.h" -#include "util.h" -#include "virt.h" +#include "basic/alloc-util.h" +#include "shared/apparmor-util.h" +#include "basic/architecture.h" +#include "basic/audit-util.h" +#include "basic/cap-list.h" +#include "shared/condition.h" +#include "basic/extract-word.h" +#include "basic/fd-util.h" +#include "basic/glob-util.h" +#include "basic/hostname-util.h" +#include "shared/ima-util.h" +#include "basic/list.h" +#include "basic/macro.h" +#include "basic/mount-util.h" +#include "basic/parse-util.h" +#include "basic/path-util.h" +#include "basic/proc-cmdline.h" +#include "basic/selinux-util.h" +#include "basic/smack-util.h" +#include "basic/stat-util.h" +#include "basic/string-table.h" +#include "basic/string-util.h" +#include "basic/util.h" +#include "basic/virt.h" Condition* condition_new(ConditionType type, const char *parameter, bool trigger, bool negate) { Condition *c; diff --git a/src/libshared/src/conf-parser.c b/src/libshared/src/conf-parser.c index 83be79a4f5..ee1cb0f5d7 100644 --- a/src/libshared/src/conf-parser.c +++ b/src/libshared/src/conf-parser.c @@ -25,24 +25,24 @@ #include <string.h> #include <sys/types.h> -#include "alloc-util.h" -#include "conf-files.h" -#include "conf-parser.h" -#include "extract-word.h" -#include "fd-util.h" -#include "fs-util.h" -#include "log.h" -#include "macro.h" -#include "parse-util.h" -#include "path-util.h" -#include "process-util.h" -#include "signal-util.h" -#include "socket-util.h" -#include "string-util.h" -#include "strv.h" -#include "syslog-util.h" -#include "time-util.h" -#include "utf8.h" +#include "basic/alloc-util.h" +#include "basic/conf-files.h" +#include "shared/conf-parser.h" +#include "basic/extract-word.h" +#include "basic/fd-util.h" +#include "basic/fs-util.h" +#include "basic/log.h" +#include "basic/macro.h" +#include "basic/parse-util.h" +#include "basic/path-util.h" +#include "basic/process-util.h" +#include "basic/signal-util.h" +#include "basic/socket-util.h" +#include "basic/string-util.h" +#include "basic/strv.h" +#include "basic/syslog-util.h" +#include "basic/time-util.h" +#include "basic/utf8.h" int config_item_table_lookup( const void *table, diff --git a/src/libshared/src/dev-setup.c b/src/libshared/src/dev-setup.c index b2d464c117..57489ef6d9 100644 --- a/src/libshared/src/dev-setup.c +++ b/src/libshared/src/dev-setup.c @@ -21,13 +21,13 @@ #include <stdlib.h> #include <unistd.h> -#include "alloc-util.h" -#include "dev-setup.h" -#include "label.h" -#include "log.h" -#include "path-util.h" -#include "user-util.h" -#include "util.h" +#include "basic/alloc-util.h" +#include "shared/dev-setup.h" +#include "basic/label.h" +#include "basic/log.h" +#include "basic/path-util.h" +#include "basic/user-util.h" +#include "basic/util.h" int dev_setup(const char *prefix, uid_t uid, gid_t gid) { static const char symlinks[] = diff --git a/src/libshared/src/dns-domain.c b/src/libshared/src/dns-domain.c index 835557c6b2..63793edcfa 100644 --- a/src/libshared/src/dns-domain.c +++ b/src/libshared/src/dns-domain.c @@ -28,16 +28,16 @@ #include <string.h> #include <sys/socket.h> -#include "alloc-util.h" -#include "dns-domain.h" -#include "hashmap.h" -#include "hexdecoct.h" -#include "in-addr-util.h" -#include "macro.h" -#include "parse-util.h" -#include "string-util.h" -#include "strv.h" -#include "utf8.h" +#include "basic/alloc-util.h" +#include "shared/dns-domain.h" +#include "basic/hashmap.h" +#include "basic/hexdecoct.h" +#include "basic/in-addr-util.h" +#include "basic/macro.h" +#include "basic/parse-util.h" +#include "basic/string-util.h" +#include "basic/strv.h" +#include "basic/utf8.h" int dns_label_unescape(const char **name, char *dest, size_t sz) { const char *n; diff --git a/src/libshared/src/dropin.c b/src/libshared/src/dropin.c index b9cd952ac8..8a2cccb38f 100644 --- a/src/libshared/src/dropin.c +++ b/src/libshared/src/dropin.c @@ -23,21 +23,21 @@ #include <stdio.h> #include <stdlib.h> -#include "alloc-util.h" -#include "conf-files.h" -#include "dropin.h" -#include "escape.h" -#include "fd-util.h" -#include "fileio-label.h" -#include "hashmap.h" -#include "log.h" -#include "macro.h" -#include "mkdir.h" -#include "path-util.h" -#include "set.h" -#include "string-util.h" -#include "strv.h" -#include "unit-name.h" +#include "basic/alloc-util.h" +#include "basic/conf-files.h" +#include "shared/dropin.h" +#include "basic/escape.h" +#include "basic/fd-util.h" +#include "basic/fileio-label.h" +#include "basic/hashmap.h" +#include "basic/log.h" +#include "basic/macro.h" +#include "basic/mkdir.h" +#include "basic/path-util.h" +#include "basic/set.h" +#include "basic/string-util.h" +#include "basic/strv.h" +#include "basic/unit-name.h" int drop_in_file(const char *dir, const char *unit, unsigned level, const char *name, char **_p, char **_q) { diff --git a/src/libshared/src/efivars.c b/src/libshared/src/efivars.c index 5073c61740..28bf61c11a 100644 --- a/src/libshared/src/efivars.c +++ b/src/libshared/src/efivars.c @@ -29,18 +29,18 @@ #include <systemd/sd-id128.h> -#include "alloc-util.h" -#include "dirent-util.h" -#include "efivars.h" -#include "fd-util.h" -#include "io-util.h" -#include "macro.h" -#include "parse-util.h" -#include "stdio-util.h" -#include "time-util.h" -#include "utf8.h" -#include "util.h" -#include "virt.h" +#include "basic/alloc-util.h" +#include "basic/dirent-util.h" +#include "shared/efivars.h" +#include "basic/fd-util.h" +#include "basic/io-util.h" +#include "basic/macro.h" +#include "basic/parse-util.h" +#include "basic/stdio-util.h" +#include "basic/time-util.h" +#include "basic/utf8.h" +#include "basic/util.h" +#include "basic/virt.h" #ifdef ENABLE_EFI diff --git a/src/libshared/src/fstab-util.c b/src/libshared/src/fstab-util.c index a4e0cd3267..82a175bfd6 100644 --- a/src/libshared/src/fstab-util.c +++ b/src/libshared/src/fstab-util.c @@ -23,16 +23,16 @@ #include <stdlib.h> #include <string.h> -#include "alloc-util.h" -#include "device-nodes.h" -#include "fstab-util.h" -#include "macro.h" -#include "mount-util.h" -#include "parse-util.h" -#include "path-util.h" -#include "string-util.h" -#include "strv.h" -#include "util.h" +#include "basic/alloc-util.h" +#include "basic/device-nodes.h" +#include "shared/fstab-util.h" +#include "basic/macro.h" +#include "basic/mount-util.h" +#include "basic/parse-util.h" +#include "basic/path-util.h" +#include "basic/string-util.h" +#include "basic/strv.h" +#include "basic/util.h" bool fstab_is_mount_point(const char *mount) { _cleanup_endmntent_ FILE *f = NULL; diff --git a/src/libshared/src/gcrypt-util.c b/src/libshared/src/gcrypt-util.c index 39b544b6f0..f222de6b4f 100644 --- a/src/libshared/src/gcrypt-util.c +++ b/src/libshared/src/gcrypt-util.c @@ -23,7 +23,7 @@ #include <gcrypt.h> #include "gcrypt-util.h" -#include "hexdecoct.h" +#include "basic/hexdecoct.h" void initialize_libgcrypt(bool secmem) { const char *p; diff --git a/src/libshared/src/generator.c b/src/libshared/src/generator.c index 70afc6a285..f7ced68f36 100644 --- a/src/libshared/src/generator.c +++ b/src/libshared/src/generator.c @@ -20,22 +20,22 @@ #include <errno.h> #include <unistd.h> -#include "alloc-util.h" -#include "dropin.h" -#include "escape.h" -#include "fd-util.h" -#include "fileio.h" -#include "fstab-util.h" -#include "generator.h" -#include "log.h" -#include "macro.h" -#include "mkdir.h" -#include "path-util.h" -#include "special.h" -#include "string-util.h" -#include "time-util.h" -#include "unit-name.h" -#include "util.h" +#include "basic/alloc-util.h" +#include "shared/dropin.h" +#include "basic/escape.h" +#include "basic/fd-util.h" +#include "basic/fileio.h" +#include "shared/fstab-util.h" +#include "shared/generator.h" +#include "basic/log.h" +#include "basic/macro.h" +#include "basic/mkdir.h" +#include "basic/path-util.h" +#include "basic/special.h" +#include "basic/string-util.h" +#include "basic/time-util.h" +#include "basic/unit-name.h" +#include "basic/util.h" static int write_fsck_sysroot_service(const char *dir, const char *what) { _cleanup_free_ char *device = NULL, *escaped = NULL; diff --git a/src/libshared/src/ima-util.c b/src/libshared/src/ima-util.c index 789064d653..74fa5e280d 100644 --- a/src/libshared/src/ima-util.c +++ b/src/libshared/src/ima-util.c @@ -19,7 +19,7 @@ #include <unistd.h> -#include "ima-util.h" +#include "shared/ima-util.h" static int use_ima_cached = -1; diff --git a/src/libshared/src/import-util.c b/src/libshared/src/import-util.c index ab701ad8b2..d587b596b2 100644 --- a/src/libshared/src/import-util.c +++ b/src/libshared/src/import-util.c @@ -20,15 +20,15 @@ #include <errno.h> #include <string.h> -#include "alloc-util.h" -#include "btrfs-util.h" -#include "import-util.h" -#include "log.h" -#include "macro.h" -#include "path-util.h" -#include "string-table.h" -#include "string-util.h" -#include "util.h" +#include "basic/alloc-util.h" +#include "basic/btrfs-util.h" +#include "shared/import-util.h" +#include "basic/log.h" +#include "basic/macro.h" +#include "basic/path-util.h" +#include "basic/string-table.h" +#include "basic/string-util.h" +#include "basic/util.h" int import_url_last_component(const char *url, char **ret) { const char *e, *p; diff --git a/src/libshared/src/install-printf.c b/src/libshared/src/install-printf.c index 88143361da..d22057d5aa 100644 --- a/src/libshared/src/install-printf.c +++ b/src/libshared/src/install-printf.c @@ -22,13 +22,13 @@ #include <string.h> #include <unistd.h> -#include "formats-util.h" -#include "install-printf.h" -#include "install.h" -#include "macro.h" -#include "specifier.h" -#include "unit-name.h" -#include "user-util.h" +#include "basic/formats-util.h" +#include "shared/install-printf.h" +#include "shared/install.h" +#include "basic/macro.h" +#include "shared/specifier.h" +#include "basic/unit-name.h" +#include "basic/user-util.h" static int specifier_prefix_and_instance(char specifier, void *data, void *userdata, char **ret) { UnitFileInstallInfo *i = userdata; diff --git a/src/libshared/src/install.c b/src/libshared/src/install.c index 64d66a45d3..d07ff0a652 100644 --- a/src/libshared/src/install.c +++ b/src/libshared/src/install.c @@ -29,31 +29,31 @@ #include <sys/stat.h> #include <unistd.h> -#include "alloc-util.h" -#include "conf-files.h" -#include "conf-parser.h" -#include "dirent-util.h" -#include "extract-word.h" -#include "fd-util.h" -#include "fileio.h" -#include "fs-util.h" -#include "hashmap.h" -#include "install-printf.h" -#include "install.h" -#include "locale-util.h" -#include "log.h" -#include "macro.h" -#include "mkdir.h" -#include "path-lookup.h" -#include "path-util.h" -#include "rm-rf.h" -#include "set.h" -#include "special.h" -#include "stat-util.h" -#include "string-table.h" -#include "string-util.h" -#include "strv.h" -#include "unit-name.h" +#include "basic/alloc-util.h" +#include "basic/conf-files.h" +#include "shared/conf-parser.h" +#include "basic/dirent-util.h" +#include "basic/extract-word.h" +#include "basic/fd-util.h" +#include "basic/fileio.h" +#include "basic/fs-util.h" +#include "basic/hashmap.h" +#include "shared/install-printf.h" +#include "shared/install.h" +#include "basic/locale-util.h" +#include "basic/log.h" +#include "basic/macro.h" +#include "basic/mkdir.h" +#include "shared/path-lookup.h" +#include "basic/path-util.h" +#include "basic/rm-rf.h" +#include "basic/set.h" +#include "basic/special.h" +#include "basic/stat-util.h" +#include "basic/string-table.h" +#include "basic/string-util.h" +#include "basic/strv.h" +#include "basic/unit-name.h" #define UNIT_FILE_FOLLOW_SYMLINK_MAX 64 diff --git a/src/libshared/src/logs-show.c b/src/libshared/src/logs-show.c index 294fa3bede..8956728414 100644 --- a/src/libshared/src/logs-show.c +++ b/src/libshared/src/logs-show.c @@ -31,26 +31,26 @@ #include <systemd/sd-id128.h> #include <systemd/sd-journal.h> -#include "alloc-util.h" -#include "fd-util.h" -#include "formats-util.h" -#include "hashmap.h" -#include "hostname-util.h" -#include "io-util.h" -#include "journal-internal.h" -#include "log.h" -#include "logs-show.h" -#include "macro.h" -#include "output-mode.h" -#include "parse-util.h" -#include "process-util.h" -#include "sparse-endian.h" -#include "string-table.h" -#include "string-util.h" -#include "terminal-util.h" -#include "time-util.h" -#include "utf8.h" -#include "util.h" +#include "basic/alloc-util.h" +#include "basic/fd-util.h" +#include "basic/formats-util.h" +#include "basic/hashmap.h" +#include "basic/hostname-util.h" +#include "basic/io-util.h" +#include "sd-journal/journal-internal.h" +#include "basic/log.h" +#include "shared/logs-show.h" +#include "basic/macro.h" +#include "shared/output-mode.h" +#include "basic/parse-util.h" +#include "basic/process-util.h" +#include "basic/sparse-endian.h" +#include "basic/string-table.h" +#include "basic/string-util.h" +#include "basic/terminal-util.h" +#include "basic/time-util.h" +#include "basic/utf8.h" +#include "basic/util.h" /* up to three lines (each up to 100 characters) or 300 characters, whichever is less */ #define PRINT_LINE_THRESHOLD 3 diff --git a/src/libshared/src/machine-image.c b/src/libshared/src/machine-image.c index 529d89ee2a..8f533d82ec 100644 --- a/src/libshared/src/machine-image.c +++ b/src/libshared/src/machine-image.c @@ -27,28 +27,28 @@ #include <sys/stat.h> #include <unistd.h> #include <linux/fs.h> -#include "alloc-util.h" -#include "btrfs-util.h" -#include "chattr-util.h" -#include "copy.h" -#include "dirent-util.h" -#include "fd-util.h" -#include "fs-util.h" -#include "hashmap.h" -#include "lockfile-util.h" -#include "log.h" -#include "macro.h" -#include "machine-image.h" -#include "mkdir.h" -#include "path-util.h" -#include "rm-rf.h" -#include "string-table.h" -#include "string-util.h" -#include "strv.h" -#include "time-util.h" -#include "utf8.h" -#include "util.h" -#include "xattr-util.h" +#include "basic/alloc-util.h" +#include "basic/btrfs-util.h" +#include "basic/chattr-util.h" +#include "basic/copy.h" +#include "basic/dirent-util.h" +#include "basic/fd-util.h" +#include "basic/fs-util.h" +#include "basic/hashmap.h" +#include "basic/lockfile-util.h" +#include "basic/log.h" +#include "basic/macro.h" +#include "shared/machine-image.h" +#include "basic/mkdir.h" +#include "basic/path-util.h" +#include "basic/rm-rf.h" +#include "basic/string-table.h" +#include "basic/string-util.h" +#include "basic/strv.h" +#include "basic/time-util.h" +#include "basic/utf8.h" +#include "basic/util.h" +#include "basic/xattr-util.h" static const char image_search_path[] = "/var/lib/machines\0" diff --git a/src/libshared/src/machine-pool.c b/src/libshared/src/machine-pool.c index c36efa0102..7ca3980ece 100644 --- a/src/libshared/src/machine-pool.c +++ b/src/libshared/src/machine-pool.c @@ -36,24 +36,24 @@ #include <systemd/sd-bus-protocol.h> #include <systemd/sd-bus.h> -#include "alloc-util.h" -#include "btrfs-util.h" -#include "fd-util.h" -#include "fileio.h" -#include "fs-util.h" -#include "lockfile-util.h" -#include "log.h" -#include "machine-pool.h" -#include "macro.h" -#include "missing.h" -#include "mkdir.h" -#include "mount-util.h" -#include "parse-util.h" -#include "path-util.h" -#include "process-util.h" -#include "signal-util.h" -#include "stat-util.h" -#include "string-util.h" +#include "basic/alloc-util.h" +#include "basic/btrfs-util.h" +#include "basic/fd-util.h" +#include "basic/fileio.h" +#include "basic/fs-util.h" +#include "basic/lockfile-util.h" +#include "basic/log.h" +#include "shared/machine-pool.h" +#include "basic/macro.h" +#include "basic/missing.h" +#include "basic/mkdir.h" +#include "basic/mount-util.h" +#include "basic/parse-util.h" +#include "basic/path-util.h" +#include "basic/process-util.h" +#include "basic/signal-util.h" +#include "basic/stat-util.h" +#include "basic/string-util.h" #define VAR_LIB_MACHINES_SIZE_START (1024UL*1024UL*500UL) #define VAR_LIB_MACHINES_FREE_MIN (1024UL*1024UL*750UL) diff --git a/src/libshared/src/output-mode.c b/src/libshared/src/output-mode.c index bec53ee0ae..b112ceb20f 100644 --- a/src/libshared/src/output-mode.c +++ b/src/libshared/src/output-mode.c @@ -17,8 +17,8 @@ along with systemd; If not, see <http://www.gnu.org/licenses/>. ***/ -#include "output-mode.h" -#include "string-table.h" +#include "shared/output-mode.h" +#include "basic/string-table.h" static const char *const output_mode_table[_OUTPUT_MODE_MAX] = { [OUTPUT_SHORT] = "short", diff --git a/src/libshared/src/pager.c b/src/libshared/src/pager.c index c16bc027be..611337bed3 100644 --- a/src/libshared/src/pager.c +++ b/src/libshared/src/pager.c @@ -27,16 +27,16 @@ #include <sys/prctl.h> #include <unistd.h> -#include "copy.h" -#include "fd-util.h" -#include "locale-util.h" -#include "log.h" -#include "macro.h" -#include "pager.h" -#include "process-util.h" -#include "signal-util.h" -#include "string-util.h" -#include "terminal-util.h" +#include "basic/copy.h" +#include "basic/fd-util.h" +#include "basic/locale-util.h" +#include "basic/log.h" +#include "basic/macro.h" +#include "shared/pager.h" +#include "basic/process-util.h" +#include "basic/signal-util.h" +#include "basic/string-util.h" +#include "basic/terminal-util.h" static pid_t pager_pid = 0; diff --git a/src/libshared/src/path-lookup.c b/src/libshared/src/path-lookup.c index ca593b6963..3e9a478075 100644 --- a/src/libshared/src/path-lookup.c +++ b/src/libshared/src/path-lookup.c @@ -22,18 +22,18 @@ #include <stdlib.h> #include <string.h> -#include "alloc-util.h" -#include "install.h" -#include "log.h" -#include "macro.h" -#include "mkdir.h" -#include "path-lookup.h" -#include "path-util.h" -#include "rm-rf.h" -#include "stat-util.h" -#include "string-util.h" -#include "strv.h" -#include "util.h" +#include "basic/alloc-util.h" +#include "shared/install.h" +#include "basic/log.h" +#include "basic/macro.h" +#include "basic/mkdir.h" +#include "shared/path-lookup.h" +#include "basic/path-util.h" +#include "basic/rm-rf.h" +#include "basic/stat-util.h" +#include "basic/string-util.h" +#include "basic/strv.h" +#include "basic/util.h" static int user_runtime_dir(char **ret, const char *suffix) { const char *e; diff --git a/src/libshared/src/ptyfwd.c b/src/libshared/src/ptyfwd.c index 9629b50ed9..d8d8af6b4a 100644 --- a/src/libshared/src/ptyfwd.c +++ b/src/libshared/src/ptyfwd.c @@ -32,12 +32,12 @@ #include <systemd/sd-event.h> -#include "alloc-util.h" -#include "fd-util.h" -#include "log.h" -#include "macro.h" -#include "ptyfwd.h" -#include "time-util.h" +#include "basic/alloc-util.h" +#include "basic/fd-util.h" +#include "basic/log.h" +#include "basic/macro.h" +#include "shared/ptyfwd.h" +#include "basic/time-util.h" struct PTYForward { sd_event *event; diff --git a/src/libshared/src/resolve-util.c b/src/libshared/src/resolve-util.c index e2da81bab7..17d6188ba3 100644 --- a/src/libshared/src/resolve-util.c +++ b/src/libshared/src/resolve-util.c @@ -17,9 +17,9 @@ along with systemd; If not, see <http://www.gnu.org/licenses/>. ***/ -#include "conf-parser.h" -#include "resolve-util.h" -#include "string-table.h" +#include "shared/conf-parser.h" +#include "shared/resolve-util.h" +#include "basic/string-table.h" DEFINE_CONFIG_PARSE_ENUM(config_parse_resolve_support, resolve_support, ResolveSupport, "Failed to parse resolve support setting"); DEFINE_CONFIG_PARSE_ENUM(config_parse_dnssec_mode, dnssec_mode, DnssecMode, "Failed to parse DNSSEC mode setting"); diff --git a/src/libshared/src/seccomp-util.c b/src/libshared/src/seccomp-util.c index cebe0fce2a..2278a0e904 100644 --- a/src/libshared/src/seccomp-util.c +++ b/src/libshared/src/seccomp-util.c @@ -21,9 +21,9 @@ #include <seccomp.h> #include <stddef.h> -#include "macro.h" -#include "seccomp-util.h" -#include "string-util.h" +#include "basic/macro.h" +#include "shared/seccomp-util.h" +#include "basic/string-util.h" const char* seccomp_arch_to_string(uint32_t c) { diff --git a/src/libshared/src/sleep-config.c b/src/libshared/src/sleep-config.c index f00624d0f2..9525246fb3 100644 --- a/src/libshared/src/sleep-config.c +++ b/src/libshared/src/sleep-config.c @@ -25,18 +25,18 @@ #include <syslog.h> #include <unistd.h> -#include "alloc-util.h" -#include "conf-parser.h" -#include "def.h" -#include "env-util.h" -#include "fd-util.h" -#include "fileio.h" -#include "log.h" -#include "macro.h" -#include "parse-util.h" -#include "sleep-config.h" -#include "string-util.h" -#include "strv.h" +#include "basic/alloc-util.h" +#include "shared/conf-parser.h" +#include "basic/def.h" +#include "basic/env-util.h" +#include "basic/fd-util.h" +#include "basic/fileio.h" +#include "basic/log.h" +#include "basic/macro.h" +#include "basic/parse-util.h" +#include "shared/sleep-config.h" +#include "basic/string-util.h" +#include "basic/strv.h" #define USE(x, y) do { (x) = (y); (y) = NULL; } while (0) diff --git a/src/libshared/src/spawn-ask-password-agent.c b/src/libshared/src/spawn-ask-password-agent.c index a46b7525f0..bfd47d88dc 100644 --- a/src/libshared/src/spawn-ask-password-agent.c +++ b/src/libshared/src/spawn-ask-password-agent.c @@ -21,10 +21,10 @@ #include <stdlib.h> #include <unistd.h> -#include "log.h" -#include "process-util.h" -#include "spawn-ask-password-agent.h" -#include "util.h" +#include "basic/log.h" +#include "basic/process-util.h" +#include "shared/spawn-ask-password-agent.h" +#include "basic/util.h" static pid_t agent_pid = 0; diff --git a/src/libshared/src/spawn-polkit-agent.c b/src/libshared/src/spawn-polkit-agent.c index 7dae4d14fe..d5d129ccad 100644 --- a/src/libshared/src/spawn-polkit-agent.c +++ b/src/libshared/src/spawn-polkit-agent.c @@ -23,15 +23,15 @@ #include <stdlib.h> #include <unistd.h> -#include "fd-util.h" -#include "io-util.h" -#include "log.h" -#include "macro.h" -#include "process-util.h" -#include "spawn-polkit-agent.h" -#include "stdio-util.h" -#include "time-util.h" -#include "util.h" +#include "basic/fd-util.h" +#include "basic/io-util.h" +#include "basic/log.h" +#include "basic/macro.h" +#include "basic/process-util.h" +#include "shared/spawn-polkit-agent.h" +#include "basic/stdio-util.h" +#include "basic/time-util.h" +#include "basic/util.h" #ifdef ENABLE_POLKIT static pid_t agent_pid = 0; diff --git a/src/libshared/src/specifier.c b/src/libshared/src/specifier.c index 303ddf0401..195854f212 100644 --- a/src/libshared/src/specifier.c +++ b/src/libshared/src/specifier.c @@ -26,11 +26,11 @@ #include <systemd/sd-id128.h> -#include "alloc-util.h" -#include "hostname-util.h" -#include "macro.h" -#include "specifier.h" -#include "string-util.h" +#include "basic/alloc-util.h" +#include "basic/hostname-util.h" +#include "basic/macro.h" +#include "shared/specifier.h" +#include "basic/string-util.h" /* * Generic infrastructure for replacing %x style specifiers in diff --git a/src/libshared/src/switch-root.c b/src/libshared/src/switch-root.c index 47d3a5a1fa..42079ea70b 100644 --- a/src/libshared/src/switch-root.c +++ b/src/libshared/src/switch-root.c @@ -26,18 +26,18 @@ #include <sys/stat.h> #include <unistd.h> -#include "base-filesystem.h" -#include "fd-util.h" -#include "log.h" -#include "missing.h" -#include "mkdir.h" -#include "path-util.h" -#include "rm-rf.h" -#include "stdio-util.h" -#include "string-util.h" -#include "switch-root.h" -#include "user-util.h" -#include "util.h" +#include "shared/base-filesystem.h" +#include "basic/fd-util.h" +#include "basic/log.h" +#include "basic/missing.h" +#include "basic/mkdir.h" +#include "basic/path-util.h" +#include "basic/rm-rf.h" +#include "basic/stdio-util.h" +#include "basic/string-util.h" +#include "shared/switch-root.h" +#include "basic/user-util.h" +#include "basic/util.h" int switch_root(const char *new_root, const char *oldroot, bool detach_oldroot, unsigned long mountflags) { diff --git a/src/libshared/src/sysctl-util.c b/src/libshared/src/sysctl-util.c index e1ccb3294c..5dfe32a16b 100644 --- a/src/libshared/src/sysctl-util.c +++ b/src/libshared/src/sysctl-util.c @@ -20,11 +20,11 @@ #include <stdio.h> #include <string.h> -#include "fileio.h" -#include "log.h" -#include "macro.h" -#include "string-util.h" -#include "sysctl-util.h" +#include "basic/fileio.h" +#include "basic/log.h" +#include "basic/macro.h" +#include "basic/string-util.h" +#include "shared/sysctl-util.h" char *sysctl_normalize(char *s) { char *n; diff --git a/src/libshared/src/tests.c b/src/libshared/src/tests.c index 409116290d..37f57ca18c 100644 --- a/src/libshared/src/tests.c +++ b/src/libshared/src/tests.c @@ -18,9 +18,9 @@ ***/ #include <stdlib.h> -#include <util.h> -#include "tests.h" +#include "basic/util.h" +#include "shared/tests.h" char* setup_fake_runtime_dir(void) { char t[] = "/tmp/fake-xdg-runtime-XXXXXX", *p; diff --git a/src/libshared/src/uid-range.c b/src/libshared/src/uid-range.c index b6ec474390..3764198610 100644 --- a/src/libshared/src/uid-range.c +++ b/src/libshared/src/uid-range.c @@ -21,9 +21,9 @@ #include <stdlib.h> #include <string.h> -#include "macro.h" -#include "uid-range.h" -#include "user-util.h" +#include "basic/macro.h" +#include "shared/uid-range.h" +#include "basic/user-util.h" static bool uid_range_intersect(UidRange *range, uid_t start, uid_t nr) { assert(range); diff --git a/src/libshared/src/utmp-wtmp.c b/src/libshared/src/utmp-wtmp.c index 9750dcd817..f10d7e9008 100644 --- a/src/libshared/src/utmp-wtmp.c +++ b/src/libshared/src/utmp-wtmp.c @@ -29,17 +29,17 @@ #include <unistd.h> #include <utmpx.h> -#include "alloc-util.h" -#include "fd-util.h" -#include "hostname-util.h" -#include "macro.h" -#include "path-util.h" -#include "string-util.h" -#include "terminal-util.h" -#include "time-util.h" -#include "user-util.h" -#include "util.h" -#include "utmp-wtmp.h" +#include "basic/alloc-util.h" +#include "basic/fd-util.h" +#include "basic/hostname-util.h" +#include "basic/macro.h" +#include "basic/path-util.h" +#include "basic/string-util.h" +#include "basic/terminal-util.h" +#include "basic/time-util.h" +#include "basic/user-util.h" +#include "basic/util.h" +#include "shared/utmp-wtmp.h" int utmp_get_runlevel(int *runlevel, int *previous) { struct utmpx *found, lookup = { .ut_type = RUN_LVL }; diff --git a/src/libshared/src/watchdog.c b/src/libshared/src/watchdog.c index 4f3e0125f3..bc5c5f0503 100644 --- a/src/libshared/src/watchdog.c +++ b/src/libshared/src/watchdog.c @@ -24,10 +24,10 @@ #include <unistd.h> #include <linux/watchdog.h> -#include "fd-util.h" -#include "log.h" -#include "time-util.h" -#include "watchdog.h" +#include "basic/fd-util.h" +#include "basic/log.h" +#include "basic/time-util.h" +#include "shared/watchdog.h" static int watchdog_fd = -1; static usec_t watchdog_timeout = USEC_INFINITY; diff --git a/src/libsystemd-network/include/systemd-network/arp-util.h b/src/libsystemd-network/include/systemd-network/arp-util.h index 3ef56b002a..7540cce95f 100644 --- a/src/libsystemd-network/include/systemd-network/arp-util.h +++ b/src/libsystemd-network/include/systemd-network/arp-util.h @@ -21,8 +21,8 @@ #include <netinet/if_ether.h> -#include "socket-util.h" -#include "sparse-endian.h" +#include "basic/socket-util.h" +#include "basic/sparse-endian.h" int arp_network_bind_raw_socket(int index, be32_t address, const struct ether_addr *eth_mac); diff --git a/src/libsystemd-network/include/systemd-network/dhcp-identifier.h b/src/libsystemd-network/include/systemd-network/dhcp-identifier.h index 802a0d6bc2..5045dd9b3d 100644 --- a/src/libsystemd-network/include/systemd-network/dhcp-identifier.h +++ b/src/libsystemd-network/include/systemd-network/dhcp-identifier.h @@ -21,9 +21,9 @@ #include <systemd/sd-id128.h> -#include "macro.h" -#include "sparse-endian.h" -#include "unaligned.h" +#include "basic/macro.h" +#include "basic/sparse-endian.h" +#include "basic/unaligned.h" typedef enum DUIDType { DUID_TYPE_LLT = 1, diff --git a/src/libsystemd-network/include/systemd-network/dhcp-internal.h b/src/libsystemd-network/include/systemd-network/dhcp-internal.h index dda4c13919..4cfa831faf 100644 --- a/src/libsystemd-network/include/systemd-network/dhcp-internal.h +++ b/src/libsystemd-network/include/systemd-network/dhcp-internal.h @@ -28,7 +28,7 @@ #include <systemd/sd-dhcp-client.h> #include "dhcp-protocol.h" -#include "socket-util.h" +#include "basic/socket-util.h" int dhcp_network_bind_raw_socket(int index, union sockaddr_union *link, uint32_t xid, const uint8_t *mac_addr, diff --git a/src/libsystemd-network/include/systemd-network/dhcp-lease-internal.h b/src/libsystemd-network/include/systemd-network/dhcp-lease-internal.h index 646e612cee..dee424294a 100644 --- a/src/libsystemd-network/include/systemd-network/dhcp-lease-internal.h +++ b/src/libsystemd-network/include/systemd-network/dhcp-lease-internal.h @@ -26,8 +26,8 @@ #include <systemd/sd-dhcp-client.h> #include "dhcp-protocol.h" -#include "list.h" -#include "util.h" +#include "basic/list.h" +#include "basic/util.h" struct sd_dhcp_route { struct in_addr dst_addr; diff --git a/src/libsystemd-network/include/systemd-network/dhcp-protocol.h b/src/libsystemd-network/include/systemd-network/dhcp-protocol.h index 3e32484c1d..b4ca0b73a0 100644 --- a/src/libsystemd-network/include/systemd-network/dhcp-protocol.h +++ b/src/libsystemd-network/include/systemd-network/dhcp-protocol.h @@ -23,8 +23,8 @@ #include <netinet/udp.h> #include <stdint.h> -#include "macro.h" -#include "sparse-endian.h" +#include "basic/macro.h" +#include "basic/sparse-endian.h" struct DHCPMessage { uint8_t op; diff --git a/src/libsystemd-network/include/systemd-network/dhcp-server-internal.h b/src/libsystemd-network/include/systemd-network/dhcp-server-internal.h index 7ba1e72155..7591db43e9 100644 --- a/src/libsystemd-network/include/systemd-network/dhcp-server-internal.h +++ b/src/libsystemd-network/include/systemd-network/dhcp-server-internal.h @@ -24,9 +24,9 @@ #include <systemd/sd-event.h> #include "dhcp-internal.h" -#include "hashmap.h" -#include "log.h" -#include "util.h" +#include "basic/hashmap.h" +#include "basic/log.h" +#include "basic/util.h" typedef struct DHCPClientId { size_t length; diff --git a/src/libsystemd-network/include/systemd-network/dhcp6-internal.h b/src/libsystemd-network/include/systemd-network/dhcp6-internal.h index 4228053ade..34cdbed57a 100644 --- a/src/libsystemd-network/include/systemd-network/dhcp6-internal.h +++ b/src/libsystemd-network/include/systemd-network/dhcp6-internal.h @@ -24,9 +24,9 @@ #include <systemd/sd-event.h> -#include "list.h" -#include "macro.h" -#include "sparse-endian.h" +#include "basic/list.h" +#include "basic/macro.h" +#include "basic/sparse-endian.h" typedef struct DHCP6Address DHCP6Address; diff --git a/src/libsystemd-network/include/systemd-network/dhcp6-protocol.h b/src/libsystemd-network/include/systemd-network/dhcp6-protocol.h index 2487c470ab..f54f4ad618 100644 --- a/src/libsystemd-network/include/systemd-network/dhcp6-protocol.h +++ b/src/libsystemd-network/include/systemd-network/dhcp6-protocol.h @@ -22,8 +22,8 @@ #include <netinet/ip6.h> #include <netinet/udp.h> -#include "macro.h" -#include "sparse-endian.h" +#include "basic/macro.h" +#include "basic/sparse-endian.h" struct DHCP6Message { union { diff --git a/src/libsystemd-network/include/systemd-network/lldp-internal.h b/src/libsystemd-network/include/systemd-network/lldp-internal.h index a6be995e3b..44857d6f63 100644 --- a/src/libsystemd-network/include/systemd-network/lldp-internal.h +++ b/src/libsystemd-network/include/systemd-network/lldp-internal.h @@ -23,9 +23,9 @@ #include <systemd/sd-event.h> #include <systemd/sd-lldp.h> -#include "hashmap.h" -#include "log.h" -#include "prioq.h" +#include "basic/hashmap.h" +#include "basic/log.h" +#include "basic/prioq.h" struct sd_lldp { int ifindex; diff --git a/src/libsystemd-network/include/systemd-network/lldp-neighbor.h b/src/libsystemd-network/include/systemd-network/lldp-neighbor.h index 050159ab73..b45ebc2b04 100644 --- a/src/libsystemd-network/include/systemd-network/lldp-neighbor.h +++ b/src/libsystemd-network/include/systemd-network/lldp-neighbor.h @@ -25,9 +25,9 @@ #include <systemd/sd-lldp.h> -#include "hash-funcs.h" +#include "basic/hash-funcs.h" #include "lldp-internal.h" -#include "time-util.h" +#include "basic/time-util.h" typedef struct LLDPNeighborID { /* The spec calls this an "MSAP identifier" */ diff --git a/src/libsystemd-network/include/systemd-network/network-internal.h b/src/libsystemd-network/include/systemd-network/network-internal.h index 1cafb0747f..aa2d6c191c 100644 --- a/src/libsystemd-network/include/systemd-network/network-internal.h +++ b/src/libsystemd-network/include/systemd-network/network-internal.h @@ -23,7 +23,7 @@ #include <systemd/sd-dhcp-lease.h> -#include "condition.h" +#include "shared/condition.h" #include "udev.h" bool net_match_config(const struct ether_addr *match_mac, diff --git a/src/libsystemd-network/src/Makefile b/src/libsystemd-network/src/Makefile index 69a415c2bb..674d5d5273 100644 --- a/src/libsystemd-network/src/Makefile +++ b/src/libsystemd-network/src/Makefile @@ -78,4 +78,7 @@ libsystemd_network_la_SOURCES = \ libsystemd_network_la_LIBADD = \ $(KMOD_LIBS) +systemd.CPPFLAGS += $(libshared.CPPFLAGS) +systemd.CPPFLAGS += -I$(topsrcdir)/src/libudev/src + include $(topsrcdir)/build-aux/Makefile.tail.mk diff --git a/src/libsystemd-network/src/arp-util.c b/src/libsystemd-network/src/arp-util.c index 4660c7ea09..8de71764e1 100644 --- a/src/libsystemd-network/src/arp-util.c +++ b/src/libsystemd-network/src/arp-util.c @@ -22,8 +22,8 @@ #include <arpa/inet.h> #include "arp-util.h" -#include "fd-util.h" -#include "util.h" +#include "basic/fd-util.h" +#include "basic/util.h" int arp_network_bind_raw_socket(int ifindex, be32_t address, const struct ether_addr *eth_mac) { struct sock_filter filter[] = { diff --git a/src/libsystemd-network/src/dhcp-identifier.c b/src/libsystemd-network/src/dhcp-identifier.c index 906d960171..f263635040 100644 --- a/src/libsystemd-network/src/dhcp-identifier.c +++ b/src/libsystemd-network/src/dhcp-identifier.c @@ -23,10 +23,10 @@ #include "dhcp-identifier.h" #include "dhcp6-protocol.h" #include "network-internal.h" -#include "siphash24.h" -#include "sparse-endian.h" -#include "udev-util.h" -#include "virt.h" +#include "basic/siphash24.h" +#include "basic/sparse-endian.h" +#include "shared/udev-util.h" +#include "basic/virt.h" #define SYSTEMD_PEN 43793 #define HASH_KEY SD_ID128_MAKE(80,11,8c,c2,fe,4a,03,ee,3e,d6,0c,6f,36,39,14,09) diff --git a/src/libsystemd-network/src/dhcp-network.c b/src/libsystemd-network/src/dhcp-network.c index fac25e0fa2..4b08bf0ed8 100644 --- a/src/libsystemd-network/src/dhcp-network.c +++ b/src/libsystemd-network/src/dhcp-network.c @@ -28,8 +28,8 @@ #include <linux/if_packet.h> #include "dhcp-internal.h" -#include "fd-util.h" -#include "socket-util.h" +#include "basic/fd-util.h" +#include "basic/socket-util.h" static int _bind_raw_socket(int ifindex, union sockaddr_union *link, uint32_t xid, const uint8_t *mac_addr, diff --git a/src/libsystemd-network/src/dhcp-option.c b/src/libsystemd-network/src/dhcp-option.c index c105196334..d3f977cb17 100644 --- a/src/libsystemd-network/src/dhcp-option.c +++ b/src/libsystemd-network/src/dhcp-option.c @@ -22,8 +22,8 @@ #include <stdio.h> #include <string.h> -#include "alloc-util.h" -#include "utf8.h" +#include "basic/alloc-util.h" +#include "basic/utf8.h" #include "dhcp-internal.h" diff --git a/src/libsystemd-network/src/dhcp6-network.c b/src/libsystemd-network/src/dhcp6-network.c index fd2d60c9d5..db748a56e2 100644 --- a/src/libsystemd-network/src/dhcp6-network.c +++ b/src/libsystemd-network/src/dhcp6-network.c @@ -29,8 +29,8 @@ #include "dhcp6-internal.h" #include "dhcp6-protocol.h" -#include "fd-util.h" -#include "socket-util.h" +#include "basic/fd-util.h" +#include "basic/socket-util.h" int dhcp6_network_bind_udp_socket(int index, struct in6_addr *local_address) { union sockaddr_union src = { diff --git a/src/libsystemd-network/src/dhcp6-option.c b/src/libsystemd-network/src/dhcp6-option.c index 0ae381ad22..a90587295c 100644 --- a/src/libsystemd-network/src/dhcp6-option.c +++ b/src/libsystemd-network/src/dhcp6-option.c @@ -23,14 +23,14 @@ #include <systemd/sd-dhcp6-client.h> -#include "alloc-util.h" +#include "basic/alloc-util.h" #include "dhcp6-internal.h" #include "dhcp6-protocol.h" -#include "dns-domain.h" -#include "sparse-endian.h" -#include "strv.h" -#include "unaligned.h" -#include "util.h" +#include "shared/dns-domain.h" +#include "basic/sparse-endian.h" +#include "basic/strv.h" +#include "basic/unaligned.h" +#include "basic/util.h" #define DHCP6_OPTION_IA_NA_LEN 12 #define DHCP6_OPTION_IA_TA_LEN 4 diff --git a/src/libsystemd-network/src/icmp6-util.c b/src/libsystemd-network/src/icmp6-util.c index acad9d7d6a..9978bf8af9 100644 --- a/src/libsystemd-network/src/icmp6-util.c +++ b/src/libsystemd-network/src/icmp6-util.c @@ -28,9 +28,9 @@ #include <unistd.h> #include <linux/if_packet.h> -#include "fd-util.h" +#include "basic/fd-util.h" #include "icmp6-util.h" -#include "socket-util.h" +#include "basic/socket-util.h" #define IN6ADDR_ALL_ROUTERS_MULTICAST_INIT \ { { { 0xff, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ diff --git a/src/libsystemd-network/src/lldp-neighbor.c b/src/libsystemd-network/src/lldp-neighbor.c index 6a716430e3..bae1c64cb0 100644 --- a/src/libsystemd-network/src/lldp-neighbor.c +++ b/src/libsystemd-network/src/lldp-neighbor.c @@ -17,14 +17,14 @@ along with systemd; If not, see <http://www.gnu.org/licenses/>. ***/ -#include "alloc-util.h" -#include "escape.h" -#include "ether-addr-util.h" -#include "hexdecoct.h" -#include "in-addr-util.h" +#include "basic/alloc-util.h" +#include "basic/escape.h" +#include "basic/ether-addr-util.h" +#include "basic/hexdecoct.h" +#include "basic/in-addr-util.h" #include "lldp-internal.h" #include "lldp-neighbor.h" -#include "unaligned.h" +#include "basic/unaligned.h" static void lldp_neighbor_id_hash_func(const void *p, struct siphash *state) { const LLDPNeighborID *id = p; diff --git a/src/libsystemd-network/src/lldp-network.c b/src/libsystemd-network/src/lldp-network.c index f031760351..086a5c133e 100644 --- a/src/libsystemd-network/src/lldp-network.c +++ b/src/libsystemd-network/src/lldp-network.c @@ -21,9 +21,9 @@ #include <linux/filter.h> #include <netinet/if_ether.h> -#include "fd-util.h" +#include "basic/fd-util.h" #include "lldp-network.h" -#include "socket-util.h" +#include "basic/socket-util.h" int lldp_network_bind_raw_socket(int ifindex) { diff --git a/src/libsystemd-network/src/network-internal.c b/src/libsystemd-network/src/network-internal.c index d57baf8fff..e64f87a608 100644 --- a/src/libsystemd-network/src/network-internal.c +++ b/src/libsystemd-network/src/network-internal.c @@ -23,21 +23,21 @@ #include <systemd/sd-ndisc.h> -#include "alloc-util.h" -#include "condition.h" -#include "conf-parser.h" +#include "basic/alloc-util.h" +#include "shared/condition.h" +#include "shared/conf-parser.h" #include "dhcp-lease-internal.h" -#include "ether-addr-util.c" -#include "hexdecoct.h" -#include "log.h" +#include "basic/ether-addr-util.h" +#include "basic/hexdecoct.h" +#include "basic/log.h" #include "network-internal.h" -#include "parse-util.h" -#include "siphash24.h" -#include "socket-util.h" -#include "string-util.h" -#include "strv.h" -#include "utf8.h" -#include "util.h" +#include "basic/parse-util.h" +#include "basic/siphash24.h" +#include "basic/socket-util.h" +#include "basic/string-util.h" +#include "basic/strv.h" +#include "basic/utf8.h" +#include "basic/util.h" const char *net_get_name(struct udev_device *device) { const char *name, *field; diff --git a/src/libsystemd-network/src/sd-dhcp-client.c b/src/libsystemd-network/src/sd-dhcp-client.c index 193f31880f..bebf21689c 100644 --- a/src/libsystemd-network/src/sd-dhcp-client.c +++ b/src/libsystemd-network/src/sd-dhcp-client.c @@ -28,17 +28,17 @@ #include <systemd/sd-dhcp-client.h> -#include "alloc-util.h" -#include "async.h" +#include "basic/alloc-util.h" +#include "basic/async.h" #include "dhcp-identifier.h" #include "dhcp-internal.h" #include "dhcp-lease-internal.h" #include "dhcp-protocol.h" -#include "dns-domain.h" -#include "hostname-util.h" -#include "random-util.h" -#include "string-util.h" -#include "util.h" +#include "shared/dns-domain.h" +#include "basic/hostname-util.h" +#include "basic/random-util.h" +#include "basic/string-util.h" +#include "basic/util.h" #define MAX_CLIENT_ID_LEN (sizeof(uint32_t) + MAX_DUID_LEN) /* Arbitrary limit */ #define MAX_MAC_ADDR_LEN CONST_MAX(INFINIBAND_ALEN, ETH_ALEN) diff --git a/src/libsystemd-network/src/sd-dhcp-lease.c b/src/libsystemd-network/src/sd-dhcp-lease.c index d4c680d485..b8107faf6f 100644 --- a/src/libsystemd-network/src/sd-dhcp-lease.c +++ b/src/libsystemd-network/src/sd-dhcp-lease.c @@ -26,20 +26,20 @@ #include <systemd/sd-dhcp-lease.h> -#include "alloc-util.h" +#include "basic/alloc-util.h" #include "dhcp-lease-internal.h" #include "dhcp-protocol.h" -#include "dns-domain.h" -#include "fd-util.h" -#include "fileio.h" -#include "hexdecoct.h" -#include "hostname-util.h" -#include "in-addr-util.h" +#include "shared/dns-domain.h" +#include "basic/fd-util.h" +#include "basic/fileio.h" +#include "basic/hexdecoct.h" +#include "basic/hostname-util.h" +#include "basic/in-addr-util.h" #include "network-internal.h" -#include "parse-util.h" -#include "stdio-util.h" -#include "string-util.h" -#include "unaligned.h" +#include "basic/parse-util.h" +#include "basic/stdio-util.h" +#include "basic/string-util.h" +#include "basic/unaligned.h" int sd_dhcp_lease_get_address(sd_dhcp_lease *lease, struct in_addr *addr) { assert_return(lease, -EINVAL); diff --git a/src/libsystemd-network/src/sd-dhcp-server.c b/src/libsystemd-network/src/sd-dhcp-server.c index 5e8b4e4823..f64d19082a 100644 --- a/src/libsystemd-network/src/sd-dhcp-server.c +++ b/src/libsystemd-network/src/sd-dhcp-server.c @@ -22,13 +22,13 @@ #include <systemd/sd-dhcp-server.h> -#include "alloc-util.h" +#include "basic/alloc-util.h" #include "dhcp-internal.h" #include "dhcp-server-internal.h" -#include "fd-util.h" -#include "in-addr-util.h" -#include "siphash24.h" -#include "string-util.h" +#include "basic/fd-util.h" +#include "basic/in-addr-util.h" +#include "basic/siphash24.h" +#include "basic/string-util.h" #define DHCP_DEFAULT_LEASE_TIME_USEC USEC_PER_HOUR #define DHCP_MAX_LEASE_TIME_USEC (USEC_PER_HOUR*12) diff --git a/src/libsystemd-network/src/sd-dhcp6-client.c b/src/libsystemd-network/src/sd-dhcp6-client.c index 2760b039ba..33965671ea 100644 --- a/src/libsystemd-network/src/sd-dhcp6-client.c +++ b/src/libsystemd-network/src/sd-dhcp6-client.c @@ -24,18 +24,18 @@ #include <systemd/sd-dhcp6-client.h> -#include "alloc-util.h" +#include "basic/alloc-util.h" #include "dhcp-identifier.h" #include "dhcp6-internal.h" #include "dhcp6-lease-internal.h" #include "dhcp6-protocol.h" -#include "fd-util.h" -#include "in-addr-util.h" +#include "basic/fd-util.h" +#include "basic/in-addr-util.h" #include "network-internal.h" -#include "random-util.h" -#include "socket-util.h" -#include "string-table.h" -#include "util.h" +#include "basic/random-util.h" +#include "basic/socket-util.h" +#include "basic/string-table.h" +#include "basic/util.h" #define MAX_MAC_ADDR_LEN INFINIBAND_ALEN diff --git a/src/libsystemd-network/src/sd-dhcp6-lease.c b/src/libsystemd-network/src/sd-dhcp6-lease.c index 5c10a6326a..5d34c506ba 100644 --- a/src/libsystemd-network/src/sd-dhcp6-lease.c +++ b/src/libsystemd-network/src/sd-dhcp6-lease.c @@ -20,11 +20,11 @@ #include <errno.h> -#include "alloc-util.h" +#include "basic/alloc-util.h" #include "dhcp6-lease-internal.h" #include "dhcp6-protocol.h" -#include "strv.h" -#include "util.h" +#include "basic/strv.h" +#include "basic/util.h" int dhcp6_lease_clear_timers(DHCP6IA *ia) { assert_return(ia, -EINVAL); diff --git a/src/libsystemd-network/src/sd-ipv4acd.c b/src/libsystemd-network/src/sd-ipv4acd.c index f1ed7ca747..6032d0470c 100644 --- a/src/libsystemd-network/src/sd-ipv4acd.c +++ b/src/libsystemd-network/src/sd-ipv4acd.c @@ -26,15 +26,15 @@ #include <systemd/sd-ipv4acd.h> -#include "alloc-util.h" +#include "basic/alloc-util.h" #include "arp-util.h" -#include "fd-util.h" -#include "in-addr-util.h" -#include "list.h" -#include "random-util.h" -#include "refcnt.h" -#include "siphash24.h" -#include "util.h" +#include "basic/fd-util.h" +#include "basic/in-addr-util.h" +#include "basic/list.h" +#include "basic/random-util.h" +#include "basic/refcnt.h" +#include "basic/siphash24.h" +#include "basic/util.h" /* Constants from the RFC */ #define PROBE_WAIT 1 diff --git a/src/libsystemd-network/src/sd-ipv4ll.c b/src/libsystemd-network/src/sd-ipv4ll.c index fc27408989..2547821cef 100644 --- a/src/libsystemd-network/src/sd-ipv4ll.c +++ b/src/libsystemd-network/src/sd-ipv4ll.c @@ -27,14 +27,14 @@ #include <systemd/sd-ipv4acd.h> #include <systemd/sd-ipv4ll.h> -#include "alloc-util.h" -#include "in-addr-util.h" -#include "list.h" -#include "random-util.h" -#include "refcnt.h" -#include "siphash24.h" -#include "sparse-endian.h" -#include "util.h" +#include "basic/alloc-util.h" +#include "basic/in-addr-util.h" +#include "basic/list.h" +#include "basic/random-util.h" +#include "basic/refcnt.h" +#include "basic/siphash24.h" +#include "basic/sparse-endian.h" +#include "basic/util.h" #define IPV4LL_NETWORK 0xA9FE0000L #define IPV4LL_NETMASK 0xFFFF0000L diff --git a/src/libsystemd-network/src/sd-lldp.c b/src/libsystemd-network/src/sd-lldp.c index 5a7380cd3f..50a6e66169 100644 --- a/src/libsystemd-network/src/sd-lldp.c +++ b/src/libsystemd-network/src/sd-lldp.c @@ -22,13 +22,13 @@ #include <systemd/sd-lldp.h> -#include "alloc-util.h" -#include "fd-util.h" +#include "basic/alloc-util.h" +#include "basic/fd-util.h" #include "lldp-internal.h" #include "lldp-neighbor.h" #include "lldp-network.h" -#include "socket-util.h" -#include "ether-addr-util.h" +#include "basic/socket-util.h" +#include "basic/ether-addr-util.h" #define LLDP_DEFAULT_NEIGHBORS_MAX 128U diff --git a/src/libsystemd-network/src/sd-ndisc.c b/src/libsystemd-network/src/sd-ndisc.c index 1c0d300cb3..328c1ac15a 100644 --- a/src/libsystemd-network/src/sd-ndisc.c +++ b/src/libsystemd-network/src/sd-ndisc.c @@ -26,13 +26,13 @@ #include <systemd/sd-ndisc.h> -#include "alloc-util.h" -#include "async.h" +#include "basic/alloc-util.h" +#include "basic/async.h" #include "icmp6-util.h" -#include "in-addr-util.h" -#include "list.h" -#include "socket-util.h" -#include "string-util.h" +#include "basic/in-addr-util.h" +#include "basic/list.h" +#include "basic/socket-util.h" +#include "basic/string-util.h" #define NDISC_ROUTER_SOLICITATION_INTERVAL 4 * USEC_PER_SEC #define NDISC_MAX_ROUTER_SOLICITATIONS 3 diff --git a/src/libsystemd-network/test/test-acd.c b/src/libsystemd-network/test/test-acd.c index 53ddfc3b62..edbf27beb3 100644 --- a/src/libsystemd-network/test/test-acd.c +++ b/src/libsystemd-network/test/test-acd.c @@ -28,9 +28,9 @@ #include <systemd/sd-ipv4acd.h> #include <systemd/sd-netlink.h> -#include "in-addr-util.h" +#include "basic/in-addr-util.h" #include "netlink-util.h" -#include "util.h" +#include "basic/util.h" static void acd_handler(sd_ipv4acd *acd, int event, void *userdata) { assert_se(acd); diff --git a/src/libsystemd-network/test/test-dhcp-client.c b/src/libsystemd-network/test/test-dhcp-client.c index 478b370c4c..8436d6d93d 100644 --- a/src/libsystemd-network/test/test-dhcp-client.c +++ b/src/libsystemd-network/test/test-dhcp-client.c @@ -25,12 +25,12 @@ #include <systemd/sd-dhcp-client.h> #include <systemd/sd-event.h> -#include "alloc-util.h" +#include "basic/alloc-util.h" #include "dhcp-identifier.h" #include "dhcp-internal.h" #include "dhcp-protocol.h" -#include "fd-util.h" -#include "util.h" +#include "basic/fd-util.h" +#include "basic/util.h" static uint8_t mac_addr[] = {'A', 'B', 'C', '1', '2', '3'}; diff --git a/src/libsystemd-network/test/test-dhcp-option.c b/src/libsystemd-network/test/test-dhcp-option.c index d84859c053..5bd86e3956 100644 --- a/src/libsystemd-network/test/test-dhcp-option.c +++ b/src/libsystemd-network/test/test-dhcp-option.c @@ -3,11 +3,11 @@ #include <stdio.h> #include <string.h> -#include "alloc-util.h" +#include "basic/alloc-util.h" #include "dhcp-internal.h" #include "dhcp-protocol.h" -#include "macro.h" -#include "util.h" +#include "basic/macro.h" +#include "basic/util.h" struct option_desc { uint8_t sname[64]; diff --git a/src/libsystemd-network/test/test-dhcp6-client.c b/src/libsystemd-network/test/test-dhcp6-client.c index 0548e8381e..77b861d976 100644 --- a/src/libsystemd-network/test/test-dhcp6-client.c +++ b/src/libsystemd-network/test/test-dhcp6-client.c @@ -30,10 +30,10 @@ #include "dhcp6-internal.h" #include "dhcp6-lease-internal.h" #include "dhcp6-protocol.h" -#include "fd-util.h" -#include "macro.h" -#include "socket-util.h" -#include "virt.h" +#include "basic/fd-util.h" +#include "basic/macro.h" +#include "basic/socket-util.h" +#include "basic/virt.h" static struct ether_addr mac_addr = { .ether_addr_octet = {'A', 'B', 'C', '1', '2', '3'} diff --git a/src/libsystemd-network/test/test-ipv4ll-manual.c b/src/libsystemd-network/test/test-ipv4ll-manual.c index caa315b210..f7188595df 100644 --- a/src/libsystemd-network/test/test-ipv4ll-manual.c +++ b/src/libsystemd-network/test/test-ipv4ll-manual.c @@ -27,12 +27,12 @@ #include <systemd/sd-ipv4ll.h> #include <systemd/sd-netlink.h> -#include "alloc-util.h" -#include "in-addr-util.h" +#include "basic/alloc-util.h" +#include "basic/in-addr-util.h" #include "netlink-util.h" -#include "parse-util.h" -#include "string-util.h" -#include "util.h" +#include "basic/parse-util.h" +#include "basic/string-util.h" +#include "basic/util.h" static void ll_handler(sd_ipv4ll *ll, int event, void *userdata) { _cleanup_free_ char *address = NULL; diff --git a/src/libsystemd-network/test/test-ipv4ll.c b/src/libsystemd-network/test/test-ipv4ll.c index b7278834f2..28c1d96ccf 100644 --- a/src/libsystemd-network/test/test-ipv4ll.c +++ b/src/libsystemd-network/test/test-ipv4ll.c @@ -28,9 +28,9 @@ #include <systemd/sd-ipv4ll.h> #include "arp-util.h" -#include "fd-util.h" -#include "socket-util.h" -#include "util.h" +#include "basic/fd-util.h" +#include "basic/socket-util.h" +#include "basic/util.h" static bool verbose = false; static bool extended = false; diff --git a/src/libsystemd-network/test/test-lldp.c b/src/libsystemd-network/test/test-lldp.c index 8c6d214d6f..78e7bc6929 100644 --- a/src/libsystemd-network/test/test-lldp.c +++ b/src/libsystemd-network/test/test-lldp.c @@ -27,11 +27,11 @@ #include <systemd/sd-event.h> #include <systemd/sd-lldp.h> -#include "alloc-util.h" -#include "fd-util.h" +#include "basic/alloc-util.h" +#include "basic/fd-util.h" #include "lldp-network.h" -#include "macro.h" -#include "string-util.h" +#include "basic/macro.h" +#include "basic/string-util.h" #define TEST_LLDP_PORT "em1" #define TEST_LLDP_TYPE_SYSTEM_NAME "systemd-lldp" diff --git a/src/libsystemd-network/test/test-ndisc-rs.c b/src/libsystemd-network/test/test-ndisc-rs.c index 863a76637c..105a9cf987 100644 --- a/src/libsystemd-network/test/test-ndisc-rs.c +++ b/src/libsystemd-network/test/test-ndisc-rs.c @@ -22,7 +22,7 @@ #include <systemd/sd-ndisc.h> #include "icmp6-util.h" -#include "socket-util.h" +#include "basic/socket-util.h" static struct ether_addr mac_addr = { .ether_addr_octet = {'A', 'B', 'C', '1', '2', '3'} diff --git a/src/libsystemd/Makefile b/src/libsystemd/Makefile index 2c6505918b..a193f4592d 100644 --- a/src/libsystemd/Makefile +++ b/src/libsystemd/Makefile @@ -32,11 +32,11 @@ EXTRA_DIST += \ src/libsystemd/sd-bus/DIFFERENCES \ src/libsystemd/sd-bus/GVARIANT-SERIALIZATION -libsystemd_la_SOURCES = \ +_libsystemd_la_SOURCES = \ $(libsystemd_internal_la_SOURCES) \ $(libsystemd_journal_internal_la_SOURCES) -nodist_libsystemd_la_SOURCES = \ +_nodist_libsystemd_la_SOURCES = \ $(nodist_libsystemd_internal_la_SOURCES) libsystemd_la_CFLAGS = \ @@ -107,4 +107,8 @@ nodist_test_libsystemd_sym_SOURCES = \ test_libsystemd_sym_LDADD = \ libsystemd.la +$(outdir)/libsystemd.la: $(srcdir)/libsystemd.sym +at.subdirs += src +systemd.sed_files += libsystemd.pc + include $(topsrcdir)/build-aux/Makefile.tail.mk diff --git a/src/libsystemd/src/Makefile b/src/libsystemd/src/Makefile index dceadf81da..5ebeb9d7fa 100644 --- a/src/libsystemd/src/Makefile +++ b/src/libsystemd/src/Makefile @@ -23,7 +23,7 @@ include $(dir $(lastword $(MAKEFILE_LIST)))/../../../config.mk include $(topsrcdir)/build-aux/Makefile.head.mk -libsystemd_internal_la_SOURCES = \ +_libsystemd_internal_la_SOURCES = \ src/systemd/sd-bus.h \ src/systemd/sd-bus-protocol.h \ src/systemd/sd-bus-vtable.h \ @@ -255,7 +255,7 @@ pkginclude_HEADERS += \ src/systemd/sd-messages.h \ src/systemd/_sd-common.h -libsystemd_journal_internal_la_SOURCES = \ +_libsystemd_journal_internal_la_SOURCES = \ src/journal/sd-journal.c \ src/systemd/sd-journal.h \ src/systemd/_sd-common.h \ @@ -309,7 +309,7 @@ libsystemd_journal_internal_la_LIBADD += \ endif # HAVE_LZ4 ifneq ($(HAVE_GCRYPT),) -libsystemd_journal_internal_la_SOURCES += \ +_libsystemd_journal_internal_la_SOURCES += \ src/journal/journal-authenticate.c \ src/journal/journal-authenticate.h \ src/journal/fsprg.c \ @@ -324,6 +324,17 @@ libsystemd_journal_internal_la_CFLAGS += \ -Wno-pointer-arith endif # HAVE_GCRYPT -noinst_LTLIBRARIES += \ +_noinst_LTLIBRARIES += \ libsystemd-journal-internal.la + +libsystemd_internal_la_CFLAGS += $(libsystemd_journal_internal_la_CFLAGS) +libsystemd_internal_la_LIBADD += $(libsystemd_journal_internal_la_LIBADD) +libsystemd_internal_la_LDADD += $(libsystemd_journal_internal_la_LDADD) + +libsystemd-internal.la.SOURCES = +libsystemd-internal.la.SOURCES += $(patsubst src/libsystemd/%,%,$(filter %.c,$(_libsystemd_internal_la_SOURCES))) +libsystemd-internal.la.SOURCES += $(addprefix sd-journal/,$(notdir $(filter %.c,$(_libsystemd_journal_internal_la_SOURCES)))) +libsystemd-internal.la.DEPENDS = $(addprefix $(outdir)/,$(libsystemd-internal.la.SOURCES:.c=.lo)) +at.subdirs += $(sort $(dir $(libsystemd-internal.la.SOURCES))) + include $(topsrcdir)/build-aux/Makefile.tail.mk diff --git a/src/libsystemd/src/sd-bus/Makefile b/src/libsystemd/src/sd-bus/Makefile new file mode 120000 index 0000000000..71a1159ce0 --- /dev/null +++ b/src/libsystemd/src/sd-bus/Makefile @@ -0,0 +1 @@ +../subdir.mk
\ No newline at end of file diff --git a/src/libsystemd/src/sd-bus/bus-bloom.c b/src/libsystemd/src/sd-bus/bus-bloom.c index 112769fcb6..d8bc9172f2 100644 --- a/src/libsystemd/src/sd-bus/bus-bloom.c +++ b/src/libsystemd/src/sd-bus/bus-bloom.c @@ -18,8 +18,8 @@ ***/ #include "bus-bloom.h" -#include "siphash24.h" -#include "util.h" +#include "basic/siphash24.h" +#include "basic/util.h" static inline void set_bit(uint64_t filter[], unsigned long b) { filter[b >> 6] |= 1ULL << (b & 63); diff --git a/src/libsystemd/src/sd-bus/bus-container.c b/src/libsystemd/src/sd-bus/bus-container.c index 3191d27ded..8eb0ee31be 100644 --- a/src/libsystemd/src/sd-bus/bus-container.c +++ b/src/libsystemd/src/sd-bus/bus-container.c @@ -23,9 +23,9 @@ #include "bus-container.h" #include "bus-internal.h" #include "bus-socket.h" -#include "fd-util.h" -#include "process-util.h" -#include "util.h" +#include "basic/fd-util.h" +#include "basic/process-util.h" +#include "basic/util.h" int bus_container_connect_socket(sd_bus *b) { _cleanup_close_pair_ int pair[2] = { -1, -1 }; diff --git a/src/libsystemd/src/sd-bus/bus-control.c b/src/libsystemd/src/sd-bus/bus-control.c index 00de530d58..5582a17aae 100644 --- a/src/libsystemd/src/sd-bus/bus-control.c +++ b/src/libsystemd/src/sd-bus/bus-control.c @@ -26,17 +26,17 @@ #include <systemd/sd-bus.h> -#include "alloc-util.h" +#include "basic/alloc-util.h" #include "bus-bloom.h" #include "bus-control.h" #include "bus-internal.h" #include "bus-message.h" -#include "bus-util.h" -#include "capability-util.h" -#include "stdio-util.h" -#include "string-util.h" -#include "strv.h" -#include "user-util.h" +#include "shared/bus-util.h" +#include "basic/capability-util.h" +#include "basic/stdio-util.h" +#include "basic/string-util.h" +#include "basic/strv.h" +#include "basic/user-util.h" _public_ int sd_bus_get_unique_name(sd_bus *bus, const char **unique) { int r; diff --git a/src/libsystemd/src/sd-bus/bus-convenience.c b/src/libsystemd/src/sd-bus/bus-convenience.c index 2d06bf541f..12fcc89d92 100644 --- a/src/libsystemd/src/sd-bus/bus-convenience.c +++ b/src/libsystemd/src/sd-bus/bus-convenience.c @@ -21,8 +21,8 @@ #include "bus-message.h" #include "bus-signature.h" #include "bus-type.h" -#include "bus-util.h" -#include "string-util.h" +#include "shared/bus-util.h" +#include "basic/string-util.h" _public_ int sd_bus_emit_signal( sd_bus *bus, diff --git a/src/libsystemd/src/sd-bus/bus-creds.c b/src/libsystemd/src/sd-bus/bus-creds.c index c4f693dee9..30b80d88e0 100644 --- a/src/libsystemd/src/sd-bus/bus-creds.c +++ b/src/libsystemd/src/sd-bus/bus-creds.c @@ -20,25 +20,25 @@ #include <linux/capability.h> #include <stdlib.h> -#include "alloc-util.h" -#include "audit-util.h" +#include "basic/alloc-util.h" +#include "basic/audit-util.h" #include "bus-creds.h" -#include "bus-label.h" +#include "basic/bus-label.h" #include "bus-message.h" -#include "bus-util.h" -#include "capability-util.h" -#include "cgroup-util.h" -#include "fd-util.h" -#include "fileio.h" -#include "formats-util.h" -#include "hexdecoct.h" -#include "parse-util.h" -#include "process-util.h" -#include "string-util.h" -#include "strv.h" -#include "terminal-util.h" -#include "user-util.h" -#include "util.h" +#include "shared/bus-util.h" +#include "basic/capability-util.h" +#include "basic/cgroup-util.h" +#include "basic/fd-util.h" +#include "basic/fileio.h" +#include "basic/formats-util.h" +#include "basic/hexdecoct.h" +#include "basic/parse-util.h" +#include "basic/process-util.h" +#include "basic/string-util.h" +#include "basic/strv.h" +#include "basic/terminal-util.h" +#include "basic/user-util.h" +#include "basic/util.h" enum { CAP_OFFSET_INHERITABLE = 0, diff --git a/src/libsystemd/src/sd-bus/bus-dump.c b/src/libsystemd/src/sd-bus/bus-dump.c index 21a6b20a11..ed24e48495 100644 --- a/src/libsystemd/src/sd-bus/bus-dump.c +++ b/src/libsystemd/src/sd-bus/bus-dump.c @@ -17,21 +17,21 @@ along with systemd; If not, see <http://www.gnu.org/licenses/>. ***/ -#include "alloc-util.h" +#include "basic/alloc-util.h" #include "bus-dump.h" #include "bus-internal.h" #include "bus-message.h" #include "bus-type.h" -#include "cap-list.h" -#include "capability-util.h" -#include "fileio.h" -#include "formats-util.h" -#include "locale-util.h" -#include "macro.h" -#include "string-util.h" -#include "strv.h" -#include "terminal-util.h" -#include "util.h" +#include "basic/cap-list.h" +#include "basic/capability-util.h" +#include "basic/fileio.h" +#include "basic/formats-util.h" +#include "basic/locale-util.h" +#include "basic/macro.h" +#include "basic/string-util.h" +#include "basic/strv.h" +#include "basic/terminal-util.h" +#include "basic/util.h" static char *indent(unsigned level, unsigned flags) { char *p; diff --git a/src/libsystemd/src/sd-bus/bus-error.c b/src/libsystemd/src/sd-bus/bus-error.c index b6bb0c4a83..69d14ba9ae 100644 --- a/src/libsystemd/src/sd-bus/bus-error.c +++ b/src/libsystemd/src/sd-bus/bus-error.c @@ -26,11 +26,11 @@ #include <systemd/sd-bus.h> -#include "alloc-util.h" +#include "basic/alloc-util.h" #include "bus-error.h" -#include "errno-list.h" -#include "string-util.h" -#include "util.h" +#include "basic/errno-list.h" +#include "basic/string-util.h" +#include "basic/util.h" BUS_ERROR_MAP_ELF_REGISTER const sd_bus_error_map bus_standard_errors[] = { SD_BUS_ERROR_MAP("org.freedesktop.DBus.Error.Failed", EACCES), diff --git a/src/libsystemd/src/sd-bus/bus-error.h b/src/libsystemd/src/sd-bus/bus-error.h index b7aedf406d..0693d9c68c 100644 --- a/src/libsystemd/src/sd-bus/bus-error.h +++ b/src/libsystemd/src/sd-bus/bus-error.h @@ -23,7 +23,7 @@ #include <systemd/sd-bus.h> -#include "macro.h" +#include "basic/macro.h" bool bus_error_is_dirty(sd_bus_error *e); diff --git a/src/libsystemd/src/sd-bus/bus-gvariant.h b/src/libsystemd/src/sd-bus/bus-gvariant.h index 6da637fb05..d9468ee9a8 100644 --- a/src/libsystemd/src/sd-bus/bus-gvariant.h +++ b/src/libsystemd/src/sd-bus/bus-gvariant.h @@ -19,7 +19,7 @@ along with systemd; If not, see <http://www.gnu.org/licenses/>. ***/ -#include "macro.h" +#include "basic/macro.h" int bus_gvariant_get_size(const char *signature) _pure_; int bus_gvariant_get_alignment(const char *signature) _pure_; diff --git a/src/libsystemd/src/sd-bus/bus-internal.c b/src/libsystemd/src/sd-bus/bus-internal.c index caca679086..0dc1db607e 100644 --- a/src/libsystemd/src/sd-bus/bus-internal.c +++ b/src/libsystemd/src/sd-bus/bus-internal.c @@ -17,11 +17,11 @@ along with systemd; If not, see <http://www.gnu.org/licenses/>. ***/ -#include "alloc-util.h" +#include "basic/alloc-util.h" #include "bus-internal.h" #include "bus-message.h" -#include "hexdecoct.h" -#include "string-util.h" +#include "basic/hexdecoct.h" +#include "basic/string-util.h" bool object_path_is_valid(const char *p) { const char *q; diff --git a/src/libsystemd/src/sd-bus/bus-internal.h b/src/libsystemd/src/sd-bus/bus-internal.h index 8c4c6fa772..7cf0925876 100644 --- a/src/libsystemd/src/sd-bus/bus-internal.h +++ b/src/libsystemd/src/sd-bus/bus-internal.h @@ -27,13 +27,13 @@ #include "bus-error.h" #include "bus-kernel.h" #include "bus-match.h" -#include "hashmap.h" +#include "basic/hashmap.h" #include "kdbus.h" -#include "list.h" -#include "prioq.h" -#include "refcnt.h" -#include "socket-util.h" -#include "util.h" +#include "basic/list.h" +#include "basic/prioq.h" +#include "basic/refcnt.h" +#include "basic/socket-util.h" +#include "basic/util.h" struct reply_callback { sd_bus_message_handler_t callback; diff --git a/src/libsystemd/src/sd-bus/bus-introspect.c b/src/libsystemd/src/sd-bus/bus-introspect.c index 8f93edb8da..63499d8a19 100644 --- a/src/libsystemd/src/sd-bus/bus-introspect.c +++ b/src/libsystemd/src/sd-bus/bus-introspect.c @@ -21,10 +21,10 @@ #include "bus-introspect.h" #include "bus-protocol.h" #include "bus-signature.h" -#include "fd-util.h" -#include "fileio.h" -#include "string-util.h" -#include "util.h" +#include "basic/fd-util.h" +#include "basic/fileio.h" +#include "basic/string-util.h" +#include "basic/util.h" int introspect_begin(struct introspect *i, bool trusted) { assert(i); diff --git a/src/libsystemd/src/sd-bus/bus-introspect.h b/src/libsystemd/src/sd-bus/bus-introspect.h index 87ac03b26a..af4ae10682 100644 --- a/src/libsystemd/src/sd-bus/bus-introspect.h +++ b/src/libsystemd/src/sd-bus/bus-introspect.h @@ -23,7 +23,7 @@ #include <systemd/sd-bus.h> -#include "set.h" +#include "basic/set.h" struct introspect { FILE *f; diff --git a/src/libsystemd/src/sd-bus/bus-kernel.c b/src/libsystemd/src/sd-bus/bus-kernel.c index 59398b841d..ef9fb87ee5 100644 --- a/src/libsystemd/src/sd-bus/bus-kernel.c +++ b/src/libsystemd/src/sd-bus/bus-kernel.c @@ -32,24 +32,24 @@ #include <libgen.h> #undef basename -#include "alloc-util.h" +#include "basic/alloc-util.h" #include "bus-bloom.h" #include "bus-internal.h" #include "bus-kernel.h" -#include "bus-label.h" +#include "basic/bus-label.h" #include "bus-message.h" -#include "bus-util.h" -#include "capability-util.h" -#include "fd-util.h" -#include "fileio.h" -#include "formats-util.h" -#include "memfd-util.h" -#include "parse-util.h" -#include "stdio-util.h" -#include "string-util.h" -#include "strv.h" -#include "user-util.h" -#include "util.h" +#include "shared/bus-util.h" +#include "basic/capability-util.h" +#include "basic/fd-util.h" +#include "basic/fileio.h" +#include "basic/formats-util.h" +#include "basic/memfd-util.h" +#include "basic/parse-util.h" +#include "basic/stdio-util.h" +#include "basic/string-util.h" +#include "basic/strv.h" +#include "basic/user-util.h" +#include "basic/util.h" #define UNIQUE_NAME_MAX (3+DECIMAL_STR_MAX(uint64_t)) diff --git a/src/libsystemd/src/sd-bus/bus-match.c b/src/libsystemd/src/sd-bus/bus-match.c index 397baf6f33..be5a0975e3 100644 --- a/src/libsystemd/src/sd-bus/bus-match.c +++ b/src/libsystemd/src/sd-bus/bus-match.c @@ -17,16 +17,16 @@ along with systemd; If not, see <http://www.gnu.org/licenses/>. ***/ -#include "alloc-util.h" +#include "basic/alloc-util.h" #include "bus-internal.h" #include "bus-match.h" #include "bus-message.h" -#include "bus-util.h" -#include "fd-util.h" -#include "fileio.h" -#include "hexdecoct.h" -#include "string-util.h" -#include "strv.h" +#include "shared/bus-util.h" +#include "basic/fd-util.h" +#include "basic/fileio.h" +#include "basic/hexdecoct.h" +#include "basic/string-util.h" +#include "basic/strv.h" /* Example: * diff --git a/src/libsystemd/src/sd-bus/bus-match.h b/src/libsystemd/src/sd-bus/bus-match.h index 3f71720185..a85abcb377 100644 --- a/src/libsystemd/src/sd-bus/bus-match.h +++ b/src/libsystemd/src/sd-bus/bus-match.h @@ -21,7 +21,7 @@ #include <systemd/sd-bus.h> -#include "hashmap.h" +#include "basic/hashmap.h" enum bus_match_node_type { BUS_MATCH_ROOT, diff --git a/src/libsystemd/src/sd-bus/bus-message.c b/src/libsystemd/src/sd-bus/bus-message.c index a9359c1528..96f4213416 100644 --- a/src/libsystemd/src/sd-bus/bus-message.c +++ b/src/libsystemd/src/sd-bus/bus-message.c @@ -23,21 +23,21 @@ #include <systemd/sd-bus.h> -#include "alloc-util.h" +#include "basic/alloc-util.h" #include "bus-gvariant.h" #include "bus-internal.h" #include "bus-message.h" #include "bus-signature.h" #include "bus-type.h" -#include "bus-util.h" -#include "fd-util.h" -#include "io-util.h" -#include "memfd-util.h" -#include "string-util.h" -#include "strv.h" -#include "time-util.h" -#include "utf8.h" -#include "util.h" +#include "shared/bus-util.h" +#include "basic/fd-util.h" +#include "basic/io-util.h" +#include "basic/memfd-util.h" +#include "basic/string-util.h" +#include "basic/strv.h" +#include "basic/time-util.h" +#include "basic/utf8.h" +#include "basic/util.h" static int message_append_basic(sd_bus_message *m, char type, const void *p, const void **stored); diff --git a/src/libsystemd/src/sd-bus/bus-message.h b/src/libsystemd/src/sd-bus/bus-message.h index 6a2c2d533c..6c33343753 100644 --- a/src/libsystemd/src/sd-bus/bus-message.h +++ b/src/libsystemd/src/sd-bus/bus-message.h @@ -27,8 +27,8 @@ #include "bus-creds.h" #include "bus-protocol.h" -#include "macro.h" -#include "time-util.h" +#include "basic/macro.h" +#include "basic/time-util.h" struct bus_container { char enclosing; diff --git a/src/libsystemd/src/sd-bus/bus-objects.c b/src/libsystemd/src/sd-bus/bus-objects.c index 9bd07ffcab..f0e80017c5 100644 --- a/src/libsystemd/src/sd-bus/bus-objects.c +++ b/src/libsystemd/src/sd-bus/bus-objects.c @@ -17,7 +17,7 @@ along with systemd; If not, see <http://www.gnu.org/licenses/>. ***/ -#include "alloc-util.h" +#include "basic/alloc-util.h" #include "bus-internal.h" #include "bus-introspect.h" #include "bus-message.h" @@ -25,10 +25,10 @@ #include "bus-signature.h" #include "bus-slot.h" #include "bus-type.h" -#include "bus-util.h" -#include "set.h" -#include "string-util.h" -#include "strv.h" +#include "shared/bus-util.h" +#include "basic/set.h" +#include "basic/string-util.h" +#include "basic/strv.h" static int node_vtable_get_userdata( sd_bus *bus, diff --git a/src/libsystemd/src/sd-bus/bus-protocol.h b/src/libsystemd/src/sd-bus/bus-protocol.h index 9d180cb284..931dc21c46 100644 --- a/src/libsystemd/src/sd-bus/bus-protocol.h +++ b/src/libsystemd/src/sd-bus/bus-protocol.h @@ -21,7 +21,7 @@ #include <endian.h> -#include "macro.h" +#include "basic/macro.h" /* Packet header */ diff --git a/src/libsystemd/src/sd-bus/bus-signature.c b/src/libsystemd/src/sd-bus/bus-signature.c index 7bc243494a..c11b113186 100644 --- a/src/libsystemd/src/sd-bus/bus-signature.c +++ b/src/libsystemd/src/sd-bus/bus-signature.c @@ -17,7 +17,7 @@ along with systemd; If not, see <http://www.gnu.org/licenses/>. ***/ -#include <util.h> +#include "basic/util.h" #include "bus-signature.h" #include "bus-type.h" diff --git a/src/libsystemd/src/sd-bus/bus-slot.c b/src/libsystemd/src/sd-bus/bus-slot.c index 75c1692bf5..96fc3f82c4 100644 --- a/src/libsystemd/src/sd-bus/bus-slot.c +++ b/src/libsystemd/src/sd-bus/bus-slot.c @@ -19,11 +19,11 @@ #include <systemd/sd-bus.h> -#include "alloc-util.h" +#include "basic/alloc-util.h" #include "bus-control.h" #include "bus-objects.h" #include "bus-slot.h" -#include "string-util.h" +#include "basic/string-util.h" sd_bus_slot *bus_slot_allocate( sd_bus *bus, diff --git a/src/libsystemd/src/sd-bus/bus-socket.c b/src/libsystemd/src/sd-bus/bus-socket.c index 1486d7cd55..e05f6d1b04 100644 --- a/src/libsystemd/src/sd-bus/bus-socket.c +++ b/src/libsystemd/src/sd-bus/bus-socket.c @@ -25,22 +25,22 @@ #include <systemd/sd-bus.h> #include <systemd/sd-daemon.h> -#include "alloc-util.h" +#include "basic/alloc-util.h" #include "bus-internal.h" #include "bus-message.h" #include "bus-socket.h" -#include "fd-util.h" -#include "formats-util.h" -#include "hexdecoct.h" -#include "macro.h" -#include "missing.h" -#include "selinux-util.h" -#include "signal-util.h" -#include "stdio-util.h" -#include "string-util.h" -#include "user-util.h" -#include "utf8.h" -#include "util.h" +#include "basic/fd-util.h" +#include "basic/formats-util.h" +#include "basic/hexdecoct.h" +#include "basic/macro.h" +#include "basic/missing.h" +#include "basic/selinux-util.h" +#include "basic/signal-util.h" +#include "basic/stdio-util.h" +#include "basic/string-util.h" +#include "basic/user-util.h" +#include "basic/utf8.h" +#include "basic/util.h" #define SNDBUF_SIZE (8*1024*1024) diff --git a/src/libsystemd/src/sd-bus/bus-track.c b/src/libsystemd/src/sd-bus/bus-track.c index 81e6d22816..997afd9dc9 100644 --- a/src/libsystemd/src/sd-bus/bus-track.c +++ b/src/libsystemd/src/sd-bus/bus-track.c @@ -19,10 +19,10 @@ #include <systemd/sd-bus.h> -#include "alloc-util.h" +#include "basic/alloc-util.h" #include "bus-internal.h" #include "bus-track.h" -#include "bus-util.h" +#include "shared/bus-util.h" struct sd_bus_track { unsigned n_ref; diff --git a/src/libsystemd/src/sd-bus/bus-type.h b/src/libsystemd/src/sd-bus/bus-type.h index 7169b0f765..d81aa20df3 100644 --- a/src/libsystemd/src/sd-bus/bus-type.h +++ b/src/libsystemd/src/sd-bus/bus-type.h @@ -23,7 +23,7 @@ #include <systemd/sd-bus.h> -#include "macro.h" +#include "basic/macro.h" bool bus_type_is_valid(char c) _const_; bool bus_type_is_valid_in_signature(char c) _const_; diff --git a/src/libsystemd/src/sd-bus/sd-bus.c b/src/libsystemd/src/sd-bus/sd-bus.c index d3c194e135..748b46413d 100644 --- a/src/libsystemd/src/sd-bus/sd-bus.c +++ b/src/libsystemd/src/sd-bus/sd-bus.c @@ -27,12 +27,12 @@ #include <systemd/sd-bus.h> -#include "alloc-util.h" +#include "basic/alloc-util.h" #include "bus-container.h" #include "bus-control.h" #include "bus-internal.h" #include "bus-kernel.h" -#include "bus-label.h" +#include "basic/bus-label.h" #include "bus-message.h" #include "bus-objects.h" #include "bus-protocol.h" @@ -40,18 +40,18 @@ #include "bus-socket.h" #include "bus-track.h" #include "bus-type.h" -#include "bus-util.h" -#include "cgroup-util.h" -#include "def.h" -#include "fd-util.h" -#include "hexdecoct.h" -#include "hostname-util.h" -#include "macro.h" -#include "missing.h" -#include "parse-util.h" -#include "string-util.h" -#include "strv.h" -#include "util.h" +#include "shared/bus-util.h" +#include "basic/cgroup-util.h" +#include "basic/def.h" +#include "basic/fd-util.h" +#include "basic/hexdecoct.h" +#include "basic/hostname-util.h" +#include "basic/macro.h" +#include "basic/missing.h" +#include "basic/parse-util.h" +#include "basic/string-util.h" +#include "basic/strv.h" +#include "basic/util.h" #define log_debug_bus_message(m) \ do { \ diff --git a/src/libsystemd/src/sd-bus/test-bus-benchmark.c b/src/libsystemd/src/sd-bus/test-bus-benchmark.c index a222d36bb4..08186870cb 100644 --- a/src/libsystemd/src/sd-bus/test-bus-benchmark.c +++ b/src/libsystemd/src/sd-bus/test-bus-benchmark.c @@ -21,14 +21,14 @@ #include <systemd/sd-bus.h> -#include "alloc-util.h" +#include "basic/alloc-util.h" #include "bus-internal.h" #include "bus-kernel.h" -#include "bus-util.h" -#include "def.h" -#include "fd-util.h" -#include "time-util.h" -#include "util.h" +#include "shared/bus-util.h" +#include "basic/def.h" +#include "basic/fd-util.h" +#include "basic/time-util.h" +#include "basic/util.h" #define MAX_SIZE (2*1024*1024) diff --git a/src/libsystemd/src/sd-bus/test-bus-chat.c b/src/libsystemd/src/sd-bus/test-bus-chat.c index 1f028d2b23..353edc9c7c 100644 --- a/src/libsystemd/src/sd-bus/test-bus-chat.c +++ b/src/libsystemd/src/sd-bus/test-bus-chat.c @@ -24,16 +24,16 @@ #include <systemd/sd-bus.h> -#include "alloc-util.h" +#include "basic/alloc-util.h" #include "bus-error.h" #include "bus-internal.h" #include "bus-match.h" -#include "bus-util.h" -#include "fd-util.h" -#include "formats-util.h" -#include "log.h" -#include "macro.h" -#include "util.h" +#include "shared/bus-util.h" +#include "basic/fd-util.h" +#include "basic/formats-util.h" +#include "basic/log.h" +#include "basic/macro.h" +#include "basic/util.h" static int match_callback(sd_bus_message *m, void *userdata, sd_bus_error *ret_error) { log_info("Match triggered! interface=%s member=%s", strna(sd_bus_message_get_interface(m)), strna(sd_bus_message_get_member(m))); diff --git a/src/libsystemd/src/sd-bus/test-bus-cleanup.c b/src/libsystemd/src/sd-bus/test-bus-cleanup.c index bd4a3fbf34..3a308453ed 100644 --- a/src/libsystemd/src/sd-bus/test-bus-cleanup.c +++ b/src/libsystemd/src/sd-bus/test-bus-cleanup.c @@ -23,8 +23,8 @@ #include "bus-internal.h" #include "bus-message.h" -#include "bus-util.h" -#include "refcnt.h" +#include "shared/bus-util.h" +#include "basic/refcnt.h" static void test_bus_new(void) { _cleanup_(sd_bus_unrefp) sd_bus *bus = NULL; diff --git a/src/libsystemd/src/sd-bus/test-bus-creds.c b/src/libsystemd/src/sd-bus/test-bus-creds.c index c58b76c258..22fe1fa759 100644 --- a/src/libsystemd/src/sd-bus/test-bus-creds.c +++ b/src/libsystemd/src/sd-bus/test-bus-creds.c @@ -20,8 +20,8 @@ #include <systemd/sd-bus.h> #include "bus-dump.h" -#include "bus-util.h" -#include "cgroup-util.h" +#include "shared/bus-util.h" +#include "basic/cgroup-util.h" int main(int argc, char *argv[]) { _cleanup_(sd_bus_creds_unrefp) sd_bus_creds *creds = NULL; diff --git a/src/libsystemd/src/sd-bus/test-bus-error.c b/src/libsystemd/src/sd-bus/test-bus-error.c index bce3cc31c9..348629c718 100644 --- a/src/libsystemd/src/sd-bus/test-bus-error.c +++ b/src/libsystemd/src/sd-bus/test-bus-error.c @@ -21,8 +21,8 @@ #include "bus-common-errors.h" #include "bus-error.h" -#include "bus-util.h" -#include "errno-list.h" +#include "shared/bus-util.h" +#include "basic/errno-list.h" static void test_error(void) { _cleanup_(sd_bus_error_free) sd_bus_error error = SD_BUS_ERROR_NULL, second = SD_BUS_ERROR_NULL; diff --git a/src/libsystemd/src/sd-bus/test-bus-gvariant.c b/src/libsystemd/src/sd-bus/test-bus-gvariant.c index 3c9ec9fef0..bffc7247c2 100644 --- a/src/libsystemd/src/sd-bus/test-bus-gvariant.c +++ b/src/libsystemd/src/sd-bus/test-bus-gvariant.c @@ -23,14 +23,14 @@ #include <systemd/sd-bus.h> -#include "alloc-util.h" +#include "basic/alloc-util.h" #include "bus-dump.h" #include "bus-gvariant.h" #include "bus-internal.h" #include "bus-message.h" -#include "bus-util.h" -#include "macro.h" -#include "util.h" +#include "shared/bus-util.h" +#include "basic/macro.h" +#include "basic/util.h" static void test_bus_gvariant_is_fixed_size(void) { assert_se(bus_gvariant_is_fixed_size("") > 0); diff --git a/src/libsystemd/src/sd-bus/test-bus-introspect.c b/src/libsystemd/src/sd-bus/test-bus-introspect.c index 4425cfae26..b7b2b79f95 100644 --- a/src/libsystemd/src/sd-bus/test-bus-introspect.c +++ b/src/libsystemd/src/sd-bus/test-bus-introspect.c @@ -18,7 +18,7 @@ ***/ #include "bus-introspect.h" -#include "log.h" +#include "basic/log.h" static int prop_get(sd_bus *bus, const char *path, const char *interface, const char *property, sd_bus_message *reply, void *userdata, sd_bus_error *error) { return -EINVAL; diff --git a/src/libsystemd/src/sd-bus/test-bus-kernel-bloom.c b/src/libsystemd/src/sd-bus/test-bus-kernel-bloom.c index f16e14a310..75874a6892 100644 --- a/src/libsystemd/src/sd-bus/test-bus-kernel-bloom.c +++ b/src/libsystemd/src/sd-bus/test-bus-kernel-bloom.c @@ -19,12 +19,12 @@ #include <systemd/sd-bus.h> -#include "alloc-util.h" +#include "basic/alloc-util.h" #include "bus-kernel.h" -#include "bus-util.h" -#include "fd-util.h" -#include "log.h" -#include "util.h" +#include "shared/bus-util.h" +#include "basic/fd-util.h" +#include "basic/log.h" +#include "basic/util.h" static int test_match(sd_bus_message *m, void *userdata, sd_bus_error *ret_error) { int *found = userdata; diff --git a/src/libsystemd/src/sd-bus/test-bus-kernel.c b/src/libsystemd/src/sd-bus/test-bus-kernel.c index 2a5ba60cc9..79ac9064d6 100644 --- a/src/libsystemd/src/sd-bus/test-bus-kernel.c +++ b/src/libsystemd/src/sd-bus/test-bus-kernel.c @@ -21,13 +21,13 @@ #include <systemd/sd-bus.h> -#include "alloc-util.h" +#include "basic/alloc-util.h" #include "bus-dump.h" #include "bus-kernel.h" -#include "bus-util.h" -#include "fd-util.h" -#include "log.h" -#include "util.h" +#include "shared/bus-util.h" +#include "basic/fd-util.h" +#include "basic/log.h" +#include "basic/util.h" int main(int argc, char *argv[]) { _cleanup_close_ int bus_ref = -1; diff --git a/src/libsystemd/src/sd-bus/test-bus-marshal.c b/src/libsystemd/src/sd-bus/test-bus-marshal.c index 45db4764a0..59a11718d9 100644 --- a/src/libsystemd/src/sd-bus/test-bus-marshal.c +++ b/src/libsystemd/src/sd-bus/test-bus-marshal.c @@ -30,15 +30,15 @@ #include <systemd/sd-bus.h> -#include "alloc-util.h" +#include "basic/alloc-util.h" #include "bus-dump.h" -#include "bus-label.h" +#include "basic/bus-label.h" #include "bus-message.h" -#include "bus-util.h" -#include "fd-util.h" -#include "hexdecoct.h" -#include "log.h" -#include "util.h" +#include "shared/bus-util.h" +#include "basic/fd-util.h" +#include "basic/hexdecoct.h" +#include "basic/log.h" +#include "basic/util.h" static void test_bus_path_encode_unique(void) { _cleanup_free_ char *a = NULL, *b = NULL, *c = NULL, *d = NULL, *e = NULL; diff --git a/src/libsystemd/src/sd-bus/test-bus-match.c b/src/libsystemd/src/sd-bus/test-bus-match.c index 29c4529f95..c73643ec37 100644 --- a/src/libsystemd/src/sd-bus/test-bus-match.c +++ b/src/libsystemd/src/sd-bus/test-bus-match.c @@ -20,9 +20,9 @@ #include "bus-match.h" #include "bus-message.h" #include "bus-slot.h" -#include "bus-util.h" -#include "log.h" -#include "macro.h" +#include "shared/bus-util.h" +#include "basic/log.h" +#include "basic/macro.h" static bool mask[32]; diff --git a/src/libsystemd/src/sd-bus/test-bus-objects.c b/src/libsystemd/src/sd-bus/test-bus-objects.c index e9bb655665..990dd196e2 100644 --- a/src/libsystemd/src/sd-bus/test-bus-objects.c +++ b/src/libsystemd/src/sd-bus/test-bus-objects.c @@ -22,15 +22,15 @@ #include <systemd/sd-bus.h> -#include "alloc-util.h" +#include "basic/alloc-util.h" #include "bus-dump.h" #include "bus-internal.h" #include "bus-message.h" -#include "bus-util.h" -#include "log.h" -#include "macro.h" -#include "strv.h" -#include "util.h" +#include "shared/bus-util.h" +#include "basic/log.h" +#include "basic/macro.h" +#include "basic/strv.h" +#include "basic/util.h" struct context { int fds[2]; diff --git a/src/libsystemd/src/sd-bus/test-bus-server.c b/src/libsystemd/src/sd-bus/test-bus-server.c index 190410674b..596529b7e4 100644 --- a/src/libsystemd/src/sd-bus/test-bus-server.c +++ b/src/libsystemd/src/sd-bus/test-bus-server.c @@ -23,10 +23,10 @@ #include <systemd/sd-bus.h> #include "bus-internal.h" -#include "bus-util.h" -#include "log.h" -#include "macro.h" -#include "util.h" +#include "shared/bus-util.h" +#include "basic/log.h" +#include "basic/macro.h" +#include "basic/util.h" struct context { int fds[2]; diff --git a/src/libsystemd/src/sd-bus/test-bus-signature.c b/src/libsystemd/src/sd-bus/test-bus-signature.c index 4f4fd093bf..b2651a1824 100644 --- a/src/libsystemd/src/sd-bus/test-bus-signature.c +++ b/src/libsystemd/src/sd-bus/test-bus-signature.c @@ -19,8 +19,8 @@ #include "bus-internal.h" #include "bus-signature.h" -#include "log.h" -#include "string-util.h" +#include "basic/log.h" +#include "basic/string-util.h" int main(int argc, char *argv[]) { char prefix[256]; diff --git a/src/libsystemd/src/sd-bus/test-bus-zero-copy.c b/src/libsystemd/src/sd-bus/test-bus-zero-copy.c index 9e20d67670..e43ce8bc33 100644 --- a/src/libsystemd/src/sd-bus/test-bus-zero-copy.c +++ b/src/libsystemd/src/sd-bus/test-bus-zero-copy.c @@ -21,15 +21,15 @@ #include <systemd/sd-bus.h> -#include "alloc-util.h" +#include "basic/alloc-util.h" #include "bus-dump.h" #include "bus-kernel.h" #include "bus-message.h" -#include "fd-util.h" -#include "log.h" -#include "memfd-util.h" -#include "string-util.h" -#include "util.h" +#include "basic/fd-util.h" +#include "basic/log.h" +#include "basic/memfd-util.h" +#include "basic/string-util.h" +#include "basic/util.h" #define FIRST_ARRAY 17 #define SECOND_ARRAY 33 diff --git a/src/libsystemd/src/sd-daemon/Makefile b/src/libsystemd/src/sd-daemon/Makefile new file mode 120000 index 0000000000..71a1159ce0 --- /dev/null +++ b/src/libsystemd/src/sd-daemon/Makefile @@ -0,0 +1 @@ +../subdir.mk
\ No newline at end of file diff --git a/src/libsystemd/src/sd-daemon/sd-daemon.c b/src/libsystemd/src/sd-daemon/sd-daemon.c index fa92199c43..863c47d2ba 100644 --- a/src/libsystemd/src/sd-daemon/sd-daemon.c +++ b/src/libsystemd/src/sd-daemon/sd-daemon.c @@ -33,14 +33,14 @@ #include <systemd/sd-daemon.h> -#include "alloc-util.h" -#include "fd-util.h" -#include "fs-util.h" -#include "parse-util.h" -#include "path-util.h" -#include "socket-util.h" -#include "strv.h" -#include "util.h" +#include "basic/alloc-util.h" +#include "basic/fd-util.h" +#include "basic/fs-util.h" +#include "basic/parse-util.h" +#include "basic/path-util.h" +#include "basic/socket-util.h" +#include "basic/strv.h" +#include "basic/util.h" #define SNDBUF_SIZE (8*1024*1024) diff --git a/src/libsystemd/src/sd-device/Makefile b/src/libsystemd/src/sd-device/Makefile new file mode 120000 index 0000000000..71a1159ce0 --- /dev/null +++ b/src/libsystemd/src/sd-device/Makefile @@ -0,0 +1 @@ +../subdir.mk
\ No newline at end of file diff --git a/src/libsystemd/src/sd-device/device-enumerator.c b/src/libsystemd/src/sd-device/device-enumerator.c index 796728ee0e..db3228d707 100644 --- a/src/libsystemd/src/sd-device/device-enumerator.c +++ b/src/libsystemd/src/sd-device/device-enumerator.c @@ -20,16 +20,16 @@ #include <systemd/sd-device.h> -#include "alloc-util.h" +#include "basic/alloc-util.h" #include "device-enumerator-private.h" #include "device-util.h" -#include "dirent-util.h" -#include "fd-util.h" -#include "prioq.h" -#include "set.h" -#include "string-util.h" -#include "strv.h" -#include "util.h" +#include "basic/dirent-util.h" +#include "basic/fd-util.h" +#include "basic/prioq.h" +#include "basic/set.h" +#include "basic/string-util.h" +#include "basic/strv.h" +#include "basic/util.h" #define DEVICE_ENUMERATE_MAX_DEPTH 256 diff --git a/src/libsystemd/src/sd-device/device-internal.h b/src/libsystemd/src/sd-device/device-internal.h index ab222e27de..5e5ae47339 100644 --- a/src/libsystemd/src/sd-device/device-internal.h +++ b/src/libsystemd/src/sd-device/device-internal.h @@ -20,8 +20,8 @@ along with systemd; If not, see <http://www.gnu.org/licenses/>. ***/ -#include "hashmap.h" -#include "set.h" +#include "basic/hashmap.h" +#include "basic/set.h" struct sd_device { uint64_t n_ref; diff --git a/src/libsystemd/src/sd-device/device-private.c b/src/libsystemd/src/sd-device/device-private.c index 51cabcb048..f1c2ada066 100644 --- a/src/libsystemd/src/sd-device/device-private.c +++ b/src/libsystemd/src/sd-device/device-private.c @@ -24,26 +24,26 @@ #include <systemd/sd-device.h> -#include "alloc-util.h" +#include "basic/alloc-util.h" #include "device-internal.h" #include "device-private.h" #include "device-util.h" -#include "fd-util.h" -#include "fileio.h" -#include "fs-util.h" -#include "hashmap.h" -#include "macro.h" -#include "mkdir.h" -#include "parse-util.h" -#include "path-util.h" -#include "refcnt.h" -#include "set.h" -#include "string-table.h" -#include "string-util.h" -#include "strv.h" -#include "strxcpyx.h" -#include "user-util.h" -#include "util.h" +#include "basic/fd-util.h" +#include "basic/fileio.h" +#include "basic/fs-util.h" +#include "basic/hashmap.h" +#include "basic/macro.h" +#include "basic/mkdir.h" +#include "basic/parse-util.h" +#include "basic/path-util.h" +#include "basic/refcnt.h" +#include "basic/set.h" +#include "basic/string-table.h" +#include "basic/string-util.h" +#include "basic/strv.h" +#include "basic/strxcpyx.h" +#include "basic/user-util.h" +#include "basic/util.h" int device_add_property(sd_device *device, const char *key, const char *value) { int r; diff --git a/src/libsystemd/src/sd-device/device-util.h b/src/libsystemd/src/sd-device/device-util.h index 5b42e11de6..a8aca6d8f4 100644 --- a/src/libsystemd/src/sd-device/device-util.h +++ b/src/libsystemd/src/sd-device/device-util.h @@ -19,7 +19,7 @@ along with systemd; If not, see <http://www.gnu.org/licenses/>. ***/ -#include "util.h" +#include "basic/util.h" #define FOREACH_DEVICE_PROPERTY(device, key, value) \ for (key = sd_device_get_property_first(device, &(value)); \ diff --git a/src/libsystemd/src/sd-device/sd-device.c b/src/libsystemd/src/sd-device/sd-device.c index d21a67cd4c..5a7e34a77b 100644 --- a/src/libsystemd/src/sd-device/sd-device.c +++ b/src/libsystemd/src/sd-device/sd-device.c @@ -24,23 +24,23 @@ #include <systemd/sd-device.h> -#include "alloc-util.h" +#include "basic/alloc-util.h" #include "device-internal.h" #include "device-private.h" #include "device-util.h" -#include "fd-util.h" -#include "fileio.h" -#include "fs-util.h" -#include "hashmap.h" -#include "macro.h" -#include "parse-util.h" -#include "path-util.h" -#include "set.h" -#include "stat-util.h" -#include "string-util.h" -#include "strv.h" -#include "strxcpyx.h" -#include "util.h" +#include "basic/fd-util.h" +#include "basic/fileio.h" +#include "basic/fs-util.h" +#include "basic/hashmap.h" +#include "basic/macro.h" +#include "basic/parse-util.h" +#include "basic/path-util.h" +#include "basic/set.h" +#include "basic/stat-util.h" +#include "basic/string-util.h" +#include "basic/strv.h" +#include "basic/strxcpyx.h" +#include "basic/util.h" int device_new_aux(sd_device **ret) { _cleanup_(sd_device_unrefp) sd_device *device = NULL; diff --git a/src/libsystemd/src/sd-event/Makefile b/src/libsystemd/src/sd-event/Makefile new file mode 120000 index 0000000000..71a1159ce0 --- /dev/null +++ b/src/libsystemd/src/sd-event/Makefile @@ -0,0 +1 @@ +../subdir.mk
\ No newline at end of file diff --git a/src/libsystemd/src/sd-event/sd-event.c b/src/libsystemd/src/sd-event/sd-event.c index 7f6f485353..daa1f55717 100644 --- a/src/libsystemd/src/sd-event/sd-event.c +++ b/src/libsystemd/src/sd-event/sd-event.c @@ -25,20 +25,20 @@ #include <systemd/sd-event.h> #include <systemd/sd-id128.h> -#include "alloc-util.h" -#include "fd-util.h" -#include "hashmap.h" -#include "list.h" -#include "macro.h" -#include "missing.h" -#include "prioq.h" -#include "process-util.h" -#include "set.h" -#include "signal-util.h" -#include "string-table.h" -#include "string-util.h" -#include "time-util.h" -#include "util.h" +#include "basic/alloc-util.h" +#include "basic/fd-util.h" +#include "basic/hashmap.h" +#include "basic/list.h" +#include "basic/macro.h" +#include "basic/missing.h" +#include "basic/prioq.h" +#include "basic/process-util.h" +#include "basic/set.h" +#include "basic/signal-util.h" +#include "basic/string-table.h" +#include "basic/string-util.h" +#include "basic/time-util.h" +#include "basic/util.h" #define DEFAULT_ACCURACY_USEC (250 * USEC_PER_MSEC) diff --git a/src/libsystemd/src/sd-event/test-event.c b/src/libsystemd/src/sd-event/test-event.c index 324ad7ee02..10395f155f 100644 --- a/src/libsystemd/src/sd-event/test-event.c +++ b/src/libsystemd/src/sd-event/test-event.c @@ -19,11 +19,11 @@ #include <systemd/sd-event.h> -#include "fd-util.h" -#include "log.h" -#include "macro.h" -#include "signal-util.h" -#include "util.h" +#include "basic/fd-util.h" +#include "basic/log.h" +#include "basic/macro.h" +#include "basic/signal-util.h" +#include "basic/util.h" static int prepare_handler(sd_event_source *s, void *userdata) { log_info("preparing %c", PTR_TO_INT(userdata)); diff --git a/src/libsystemd/src/sd-hwdb/Makefile b/src/libsystemd/src/sd-hwdb/Makefile new file mode 120000 index 0000000000..71a1159ce0 --- /dev/null +++ b/src/libsystemd/src/sd-hwdb/Makefile @@ -0,0 +1 @@ +../subdir.mk
\ No newline at end of file diff --git a/src/libsystemd/src/sd-hwdb/hwdb-internal.h b/src/libsystemd/src/sd-hwdb/hwdb-internal.h index 8ffb5e5c74..7b32bbd11d 100644 --- a/src/libsystemd/src/sd-hwdb/hwdb-internal.h +++ b/src/libsystemd/src/sd-hwdb/hwdb-internal.h @@ -19,8 +19,8 @@ along with systemd; If not, see <http://www.gnu.org/licenses/>. ***/ -#include "sparse-endian.h" -#include "util.h" +#include "basic/sparse-endian.h" +#include "basic/util.h" #define HWDB_SIG { 'K', 'S', 'L', 'P', 'H', 'H', 'R', 'H' } diff --git a/src/libsystemd/src/sd-hwdb/hwdb-util.h b/src/libsystemd/src/sd-hwdb/hwdb-util.h index 05dc47962b..c3cba2e9a0 100644 --- a/src/libsystemd/src/sd-hwdb/hwdb-util.h +++ b/src/libsystemd/src/sd-hwdb/hwdb-util.h @@ -21,6 +21,6 @@ #include <systemd/sd-hwdb.h> -#include "util.h" +#include "basic/util.h" bool hwdb_validate(sd_hwdb *hwdb); diff --git a/src/libsystemd/src/sd-hwdb/sd-hwdb.c b/src/libsystemd/src/sd-hwdb/sd-hwdb.c index 7dcfe95b87..8127b7c5c6 100644 --- a/src/libsystemd/src/sd-hwdb/sd-hwdb.c +++ b/src/libsystemd/src/sd-hwdb/sd-hwdb.c @@ -29,13 +29,13 @@ #include <systemd/sd-hwdb.h> -#include "alloc-util.h" -#include "fd-util.h" -#include "hashmap.h" +#include "basic/alloc-util.h" +#include "basic/fd-util.h" +#include "basic/hashmap.h" #include "hwdb-internal.h" #include "hwdb-util.h" -#include "refcnt.h" -#include "string-util.h" +#include "basic/refcnt.h" +#include "basic/string-util.h" struct sd_hwdb { RefCount n_ref; diff --git a/src/libsystemd/src/sd-id128/Makefile b/src/libsystemd/src/sd-id128/Makefile new file mode 120000 index 0000000000..71a1159ce0 --- /dev/null +++ b/src/libsystemd/src/sd-id128/Makefile @@ -0,0 +1 @@ +../subdir.mk
\ No newline at end of file diff --git a/src/libsystemd/src/sd-id128/sd-id128.c b/src/libsystemd/src/sd-id128/sd-id128.c index cda3e9f0df..4a227ab6c0 100644 --- a/src/libsystemd/src/sd-id128/sd-id128.c +++ b/src/libsystemd/src/sd-id128/sd-id128.c @@ -23,12 +23,12 @@ #include <systemd/sd-id128.h> -#include "fd-util.h" -#include "hexdecoct.h" -#include "io-util.h" -#include "macro.h" -#include "random-util.h" -#include "util.h" +#include "basic/fd-util.h" +#include "basic/hexdecoct.h" +#include "basic/io-util.h" +#include "basic/macro.h" +#include "basic/random-util.h" +#include "basic/util.h" _public_ char *sd_id128_to_string(sd_id128_t id, char s[SD_ID128_STRING_MAX]) { unsigned n; diff --git a/src/libsystemd/src/sd-journal/Makefile b/src/libsystemd/src/sd-journal/Makefile index 4a237512be..7ecfe2b7c8 100644 --- a/src/libsystemd/src/sd-journal/Makefile +++ b/src/libsystemd/src/sd-journal/Makefile @@ -23,15 +23,19 @@ include $(dir $(lastword $(MAKEFILE_LIST)))/../../../../config.mk include $(topsrcdir)/build-aux/Makefile.head.mk -audit_list_includes = -include linux/audit.h -include missing.h +audit_list_includes = -include linux/audit.h -include $(topsrcdir)/src/libbasic/include/basic/missing.h ifneq ($(HAVE_AUDIT),) audit_list_includes += -include libaudit.h endif # HAVE_AUDIT -$(outdir)/audit_type-list.txt: +$(outdir)/audit_type-list.txt: $(call at.path,$(topsrcdir)/src/libbasic/include/basic/missing.h) $(AM_V_GEN)$(CPP) $(ALL_CPPFLAGS) -dM $(audit_list_includes) - </dev/null | grep -vE 'AUDIT_.*(FIRST|LAST)_' | $(SED) -r -n 's/^#define\s+AUDIT_(\w+)\s+([0-9]{4})\s*$$/\1\t\2/p' | sort -k2 >$@ $(outdir)/audit_type-to-name.h: $(outdir)/audit_type-list.txt $(AM_V_GEN)$(AWK) 'BEGIN{ print "const char *audit_type_to_string(int type) {\n\tswitch(type) {" } {printf " case AUDIT_%s: return \"%s\";\n", $$1, $$1 } END{ print " default: return NULL;\n\t}\n}\n" }' <$< >$@ +systemd.CPPFLAGS += $(libbasic.CPPFLAGS) +systemd.CPPFLAGS += -DCATALOG_DATABASE=\"$(catalogstatedir)/database\" +$(outdir)/audit-type.lo: $(outdir)/audit_type-to-name.h + include $(topsrcdir)/build-aux/Makefile.tail.mk diff --git a/src/libsystemd/src/sd-journal/audit-type.c b/src/libsystemd/src/sd-journal/audit-type.c index 71e8790ca8..330e0b5d9d 100644 --- a/src/libsystemd/src/sd-journal/audit-type.c +++ b/src/libsystemd/src/sd-journal/audit-type.c @@ -23,7 +23,7 @@ # include <libaudit.h> #endif -#include "missing.h" +#include "basic/missing.h" #include "audit-type.h" #include "audit_type-to-name.h" -#include "macro.h" +#include "basic/macro.h" diff --git a/src/libsystemd/src/sd-journal/audit-type.h b/src/libsystemd/src/sd-journal/audit-type.h index 1dd2163707..8b96e2e466 100644 --- a/src/libsystemd/src/sd-journal/audit-type.h +++ b/src/libsystemd/src/sd-journal/audit-type.h @@ -19,7 +19,7 @@ along with systemd; If not, see <http://www.gnu.org/licenses/>. ***/ -#include "macro.h" +#include "basic/macro.h" const char *audit_type_to_string(int type); int audit_type_from_string(const char *s); diff --git a/src/libsystemd/src/sd-journal/catalog.c b/src/libsystemd/src/sd-journal/catalog.c index 70838d958c..173f320f40 100644 --- a/src/libsystemd/src/sd-journal/catalog.c +++ b/src/libsystemd/src/sd-journal/catalog.c @@ -27,21 +27,21 @@ #include <systemd/sd-id128.h> -#include "alloc-util.h" +#include "basic/alloc-util.h" #include "catalog.h" -#include "conf-files.h" -#include "fd-util.h" -#include "fileio.h" -#include "hashmap.h" -#include "log.h" -#include "mkdir.h" -#include "path-util.h" -#include "siphash24.h" -#include "sparse-endian.h" -#include "strbuf.h" -#include "string-util.h" -#include "strv.h" -#include "util.h" +#include "basic/conf-files.h" +#include "basic/fd-util.h" +#include "basic/fileio.h" +#include "basic/hashmap.h" +#include "basic/log.h" +#include "basic/mkdir.h" +#include "basic/path-util.h" +#include "basic/siphash24.h" +#include "basic/sparse-endian.h" +#include "basic/strbuf.h" +#include "basic/string-util.h" +#include "basic/strv.h" +#include "basic/util.h" const char * const catalog_file_dirs[] = { "/usr/local/lib/systemd/catalog/", diff --git a/src/libsystemd/src/sd-journal/catalog.h b/src/libsystemd/src/sd-journal/catalog.h index b621de3068..fa60757723 100644 --- a/src/libsystemd/src/sd-journal/catalog.h +++ b/src/libsystemd/src/sd-journal/catalog.h @@ -23,8 +23,8 @@ #include <systemd/sd-id128.h> -#include "hashmap.h" -#include "strbuf.h" +#include "basic/hashmap.h" +#include "basic/strbuf.h" int catalog_import_file(Hashmap *h, const char *path); int catalog_update(const char* database, const char* root, const char* const* dirs); diff --git a/src/libsystemd/src/sd-journal/compress.c b/src/libsystemd/src/sd-journal/compress.c index ba734b5561..f763ceeac8 100644 --- a/src/libsystemd/src/sd-journal/compress.c +++ b/src/libsystemd/src/sd-journal/compress.c @@ -32,16 +32,16 @@ #include <lz4frame.h> #endif -#include "alloc-util.h" +#include "basic/alloc-util.h" #include "compress.h" -#include "fd-util.h" -#include "io-util.h" +#include "basic/fd-util.h" +#include "basic/io-util.h" #include "journal-def.h" -#include "macro.h" -#include "sparse-endian.h" -#include "string-table.h" -#include "string-util.h" -#include "util.h" +#include "basic/macro.h" +#include "basic/sparse-endian.h" +#include "basic/string-table.h" +#include "basic/string-util.h" +#include "basic/util.h" #ifdef HAVE_LZ4 DEFINE_TRIVIAL_CLEANUP_FUNC(LZ4F_compressionContext_t, LZ4F_freeCompressionContext); diff --git a/src/libsystemd/src/sd-journal/fsprg.h b/src/libsystemd/src/sd-journal/fsprg.h index 829b56e240..ef6d34fb4e 100644 --- a/src/libsystemd/src/sd-journal/fsprg.h +++ b/src/libsystemd/src/sd-journal/fsprg.h @@ -26,8 +26,8 @@ #include <inttypes.h> #include <sys/types.h> -#include "macro.h" -#include "util.h" +#include "basic/macro.h" +#include "basic/util.h" #ifdef __cplusplus extern "C" { diff --git a/src/libsystemd/src/sd-journal/gcrypt-util.c b/src/libsystemd/src/sd-journal/gcrypt-util.c new file mode 120000 index 0000000000..56bb2382a6 --- /dev/null +++ b/src/libsystemd/src/sd-journal/gcrypt-util.c @@ -0,0 +1 @@ +../../../libshared/src/gcrypt-util.c
\ No newline at end of file diff --git a/src/libsystemd/src/sd-journal/gcrypt-util.h b/src/libsystemd/src/sd-journal/gcrypt-util.h new file mode 120000 index 0000000000..c1168ad265 --- /dev/null +++ b/src/libsystemd/src/sd-journal/gcrypt-util.h @@ -0,0 +1 @@ +../../../libshared/include/shared/gcrypt-util.h
\ No newline at end of file diff --git a/src/libsystemd/src/sd-journal/journal-authenticate.c b/src/libsystemd/src/sd-journal/journal-authenticate.c index d8af113d3f..ecdbdb08b5 100644 --- a/src/libsystemd/src/sd-journal/journal-authenticate.c +++ b/src/libsystemd/src/sd-journal/journal-authenticate.c @@ -20,10 +20,10 @@ #include <fcntl.h> #include <sys/mman.h> -#include "fd-util.h" +#include "basic/fd-util.h" #include "fsprg.h" #include "gcrypt-util.h" -#include "hexdecoct.h" +#include "basic/hexdecoct.h" #include "journal-authenticate.h" #include "journal-def.h" #include "journal-file.h" diff --git a/src/libsystemd/src/sd-journal/journal-def.h b/src/libsystemd/src/sd-journal/journal-def.h index a0a052ce4f..86c843905a 100644 --- a/src/libsystemd/src/sd-journal/journal-def.h +++ b/src/libsystemd/src/sd-journal/journal-def.h @@ -21,8 +21,8 @@ #include <systemd/sd-id128.h> -#include "macro.h" -#include "sparse-endian.h" +#include "basic/macro.h" +#include "basic/sparse-endian.h" /* * If you change this file you probably should also change its documentation: diff --git a/src/libsystemd/src/sd-journal/journal-file.c b/src/libsystemd/src/sd-journal/journal-file.c index 13db5c53de..f626ea0ee9 100644 --- a/src/libsystemd/src/sd-journal/journal-file.c +++ b/src/libsystemd/src/sd-journal/journal-file.c @@ -27,22 +27,22 @@ #include <sys/uio.h> #include <unistd.h> -#include "alloc-util.h" -#include "btrfs-util.h" -#include "chattr-util.h" +#include "basic/alloc-util.h" +#include "basic/btrfs-util.h" +#include "basic/chattr-util.h" #include "compress.h" -#include "fd-util.h" +#include "basic/fd-util.h" #include "journal-authenticate.h" #include "journal-def.h" #include "journal-file.h" #include "lookup3.h" -#include "parse-util.h" -#include "path-util.h" -#include "random-util.h" +#include "basic/parse-util.h" +#include "basic/path-util.h" +#include "basic/random-util.h" #include <systemd/sd-event.h> -#include "set.h" -#include "string-util.h" -#include "xattr-util.h" +#include "basic/set.h" +#include "basic/string-util.h" +#include "basic/xattr-util.h" #define DEFAULT_DATA_HASH_TABLE_SIZE (2047ULL*sizeof(HashItem)) #define DEFAULT_FIELD_HASH_TABLE_SIZE (333ULL*sizeof(HashItem)) diff --git a/src/libsystemd/src/sd-journal/journal-file.h b/src/libsystemd/src/sd-journal/journal-file.h index e48e98f424..366d168166 100644 --- a/src/libsystemd/src/sd-journal/journal-file.h +++ b/src/libsystemd/src/sd-journal/journal-file.h @@ -27,12 +27,12 @@ #include <systemd/sd-id128.h> -#include "hashmap.h" +#include "basic/hashmap.h" #include "journal-def.h" -#include "macro.h" +#include "basic/macro.h" #include "mmap-cache.h" #include <systemd/sd-event.h> -#include "sparse-endian.h" +#include "basic/sparse-endian.h" typedef struct JournalMetrics { /* For all these: -1 means "pick automatically", and 0 means "no limit enforced" */ diff --git a/src/libsystemd/src/sd-journal/journal-internal.h b/src/libsystemd/src/sd-journal/journal-internal.h index d8eb11ad06..ff6bf6f2b4 100644 --- a/src/libsystemd/src/sd-journal/journal-internal.h +++ b/src/libsystemd/src/sd-journal/journal-internal.h @@ -26,11 +26,11 @@ #include <systemd/sd-id128.h> #include <systemd/sd-journal.h> -#include "hashmap.h" +#include "basic/hashmap.h" #include "journal-def.h" #include "journal-file.h" -#include "list.h" -#include "set.h" +#include "basic/list.h" +#include "basic/set.h" typedef struct Match Match; typedef struct Location Location; diff --git a/src/libsystemd/src/sd-journal/journal-send.c b/src/libsystemd/src/sd-journal/journal-send.c index 5a49211f85..7197758289 100644 --- a/src/libsystemd/src/sd-journal/journal-send.c +++ b/src/libsystemd/src/sd-journal/journal-send.c @@ -29,15 +29,15 @@ #include <systemd/sd-journal.h> -#include "alloc-util.h" -#include "fd-util.h" -#include "fileio.h" -#include "io-util.h" -#include "memfd-util.h" -#include "socket-util.h" -#include "stdio-util.h" -#include "string-util.h" -#include "util.h" +#include "basic/alloc-util.h" +#include "basic/fd-util.h" +#include "basic/fileio.h" +#include "basic/io-util.h" +#include "basic/memfd-util.h" +#include "basic/socket-util.h" +#include "basic/stdio-util.h" +#include "basic/string-util.h" +#include "basic/util.h" #define SNDBUF_SIZE (8*1024*1024) diff --git a/src/libsystemd/src/sd-journal/journal-vacuum.c b/src/libsystemd/src/sd-journal/journal-vacuum.c index cd2676ab63..3ce00bec7d 100644 --- a/src/libsystemd/src/sd-journal/journal-vacuum.c +++ b/src/libsystemd/src/sd-journal/journal-vacuum.c @@ -23,16 +23,16 @@ #include <systemd/sd-id128.h> -#include "alloc-util.h" -#include "dirent-util.h" -#include "fd-util.h" +#include "basic/alloc-util.h" +#include "basic/dirent-util.h" +#include "basic/fd-util.h" #include "journal-def.h" #include "journal-file.h" #include "journal-vacuum.h" -#include "parse-util.h" -#include "string-util.h" -#include "util.h" -#include "xattr-util.h" +#include "basic/parse-util.h" +#include "basic/string-util.h" +#include "basic/util.h" +#include "basic/xattr-util.h" struct vacuum_info { uint64_t usage; diff --git a/src/libsystemd/src/sd-journal/journal-vacuum.h b/src/libsystemd/src/sd-journal/journal-vacuum.h index 1e750a2170..c7b38e2da9 100644 --- a/src/libsystemd/src/sd-journal/journal-vacuum.h +++ b/src/libsystemd/src/sd-journal/journal-vacuum.h @@ -22,6 +22,6 @@ #include <inttypes.h> #include <stdbool.h> -#include "time-util.h" +#include "basic/time-util.h" int journal_directory_vacuum(const char *directory, uint64_t max_use, uint64_t n_max_files, usec_t max_retention_usec, usec_t *oldest_usec, bool verbose); diff --git a/src/libsystemd/src/sd-journal/journal-verify.c b/src/libsystemd/src/sd-journal/journal-verify.c index 26572ddd76..3fcae64f92 100644 --- a/src/libsystemd/src/sd-journal/journal-verify.c +++ b/src/libsystemd/src/sd-journal/journal-verify.c @@ -22,18 +22,18 @@ #include <sys/mman.h> #include <unistd.h> -#include "alloc-util.h" +#include "basic/alloc-util.h" #include "compress.h" -#include "fd-util.h" -#include "fileio.h" +#include "basic/fd-util.h" +#include "basic/fileio.h" #include "journal-authenticate.h" #include "journal-def.h" #include "journal-file.h" #include "journal-verify.h" #include "lookup3.h" -#include "macro.h" -#include "terminal-util.h" -#include "util.h" +#include "basic/macro.h" +#include "basic/terminal-util.h" +#include "basic/util.h" static void draw_progress(uint64_t p, usec_t *last_usec) { unsigned n, i, j, k; diff --git a/src/libsystemd/src/sd-journal/lookup3.h b/src/libsystemd/src/sd-journal/lookup3.h index 787921ffbf..28ab5ca4f5 100644 --- a/src/libsystemd/src/sd-journal/lookup3.h +++ b/src/libsystemd/src/sd-journal/lookup3.h @@ -3,7 +3,7 @@ #include <inttypes.h> #include <sys/types.h> -#include "macro.h" +#include "basic/macro.h" uint32_t jenkins_hashword(const uint32_t *k, size_t length, uint32_t initval) _pure_; void jenkins_hashword2(const uint32_t *k, size_t length, uint32_t *pc, uint32_t *pb); diff --git a/src/libsystemd/src/sd-journal/mmap-cache.c b/src/libsystemd/src/sd-journal/mmap-cache.c index 6bcd9b6ac8..e488755e67 100644 --- a/src/libsystemd/src/sd-journal/mmap-cache.c +++ b/src/libsystemd/src/sd-journal/mmap-cache.c @@ -21,15 +21,15 @@ #include <stdlib.h> #include <sys/mman.h> -#include "alloc-util.h" -#include "fd-util.h" -#include "hashmap.h" -#include "list.h" -#include "log.h" -#include "macro.h" +#include "basic/alloc-util.h" +#include "basic/fd-util.h" +#include "basic/hashmap.h" +#include "basic/list.h" +#include "basic/log.h" +#include "basic/macro.h" #include "mmap-cache.h" -#include "sigbus.h" -#include "util.h" +#include "basic/sigbus.h" +#include "basic/util.h" typedef struct Window Window; typedef struct Context Context; diff --git a/src/libsystemd/src/sd-journal/sd-journal.c b/src/libsystemd/src/sd-journal/sd-journal.c index 930486d65f..aada73f8ec 100644 --- a/src/libsystemd/src/sd-journal/sd-journal.c +++ b/src/libsystemd/src/sd-journal/sd-journal.c @@ -29,29 +29,29 @@ #include <systemd/sd-journal.h> -#include "alloc-util.h" +#include "basic/alloc-util.h" #include "catalog.h" #include "compress.h" -#include "dirent-util.h" -#include "fd-util.h" -#include "fileio.h" -#include "formats-util.h" -#include "fs-util.h" -#include "hashmap.h" -#include "hostname-util.h" -#include "io-util.h" +#include "basic/dirent-util.h" +#include "basic/fd-util.h" +#include "basic/fileio.h" +#include "basic/formats-util.h" +#include "basic/fs-util.h" +#include "basic/hashmap.h" +#include "basic/hostname-util.h" +#include "basic/io-util.h" #include "journal-def.h" #include "journal-file.h" #include "journal-internal.h" -#include "list.h" +#include "basic/list.h" #include "lookup3.h" -#include "missing.h" -#include "path-util.h" -#include "replace-var.h" -#include "stat-util.h" -#include "stdio-util.h" -#include "string-util.h" -#include "strv.h" +#include "basic/missing.h" +#include "basic/path-util.h" +#include "basic/replace-var.h" +#include "basic/stat-util.h" +#include "basic/stdio-util.h" +#include "basic/string-util.h" +#include "basic/strv.h" #define JOURNAL_FILES_MAX 7168 diff --git a/src/libsystemd/src/sd-login/Makefile b/src/libsystemd/src/sd-login/Makefile new file mode 120000 index 0000000000..71a1159ce0 --- /dev/null +++ b/src/libsystemd/src/sd-login/Makefile @@ -0,0 +1 @@ +../subdir.mk
\ No newline at end of file diff --git a/src/libsystemd/src/sd-login/sd-login.c b/src/libsystemd/src/sd-login/sd-login.c index 84831d5e95..11686bc90d 100644 --- a/src/libsystemd/src/sd-login/sd-login.c +++ b/src/libsystemd/src/sd-login/sd-login.c @@ -25,25 +25,25 @@ #include <systemd/sd-login.h> -#include "alloc-util.h" -#include "cgroup-util.h" -#include "dirent-util.h" -#include "escape.h" -#include "fd-util.h" -#include "fileio.h" -#include "formats-util.h" -#include "fs-util.h" -#include "hostname-util.h" -#include "io-util.h" -#include "login-util.h" -#include "macro.h" -#include "parse-util.h" -#include "path-util.h" -#include "socket-util.h" -#include "string-util.h" -#include "strv.h" -#include "user-util.h" -#include "util.h" +#include "basic/alloc-util.h" +#include "basic/cgroup-util.h" +#include "basic/dirent-util.h" +#include "basic/escape.h" +#include "basic/fd-util.h" +#include "basic/fileio.h" +#include "basic/formats-util.h" +#include "basic/fs-util.h" +#include "basic/hostname-util.h" +#include "basic/io-util.h" +#include "basic/login-util.h" +#include "basic/macro.h" +#include "basic/parse-util.h" +#include "basic/path-util.h" +#include "basic/socket-util.h" +#include "basic/string-util.h" +#include "basic/strv.h" +#include "basic/user-util.h" +#include "basic/util.h" /* Error codes: * diff --git a/src/libsystemd/src/sd-login/test-login.c b/src/libsystemd/src/sd-login/test-login.c index 994c76df4a..bec645242a 100644 --- a/src/libsystemd/src/sd-login/test-login.c +++ b/src/libsystemd/src/sd-login/test-login.c @@ -22,12 +22,12 @@ #include <systemd/sd-login.h> -#include "alloc-util.h" -#include "fd-util.h" -#include "formats-util.h" -#include "string-util.h" -#include "strv.h" -#include "util.h" +#include "basic/alloc-util.h" +#include "basic/fd-util.h" +#include "basic/formats-util.h" +#include "basic/string-util.h" +#include "basic/strv.h" +#include "basic/util.h" static void test_login(void) { _cleanup_close_pair_ int pair[2] = { -1, -1 }; diff --git a/src/libsystemd/src/sd-netlink/Makefile b/src/libsystemd/src/sd-netlink/Makefile new file mode 120000 index 0000000000..71a1159ce0 --- /dev/null +++ b/src/libsystemd/src/sd-netlink/Makefile @@ -0,0 +1 @@ +../subdir.mk
\ No newline at end of file diff --git a/src/libsystemd/src/sd-netlink/local-addresses.c b/src/libsystemd/src/sd-netlink/local-addresses.c index 1abce75b01..5ab5ba6ea6 100644 --- a/src/libsystemd/src/sd-netlink/local-addresses.c +++ b/src/libsystemd/src/sd-netlink/local-addresses.c @@ -20,10 +20,9 @@ #include <systemd/sd-netlink.h> -#include "alloc-util.h" +#include "basic/alloc-util.h" #include "local-addresses.h" -#include "macro.h" -#include "netlink-util.h" +#include "basic/macro.h" static int address_compare(const void *_a, const void *_b) { const struct local_address *a = _a, *b = _b; diff --git a/src/libsystemd/src/sd-netlink/local-addresses.h b/src/libsystemd/src/sd-netlink/local-addresses.h index 1ddc50ace5..7267940520 100644 --- a/src/libsystemd/src/sd-netlink/local-addresses.h +++ b/src/libsystemd/src/sd-netlink/local-addresses.h @@ -22,7 +22,7 @@ #include <systemd/sd-netlink.h> -#include "in-addr-util.h" +#include "basic/in-addr-util.h" struct local_address { int family, ifindex; diff --git a/src/libsystemd/src/sd-netlink/netlink-internal.h b/src/libsystemd/src/sd-netlink/netlink-internal.h index 1d29c3a369..ecb3a5eda7 100644 --- a/src/libsystemd/src/sd-netlink/netlink-internal.h +++ b/src/libsystemd/src/sd-netlink/netlink-internal.h @@ -23,10 +23,10 @@ #include <systemd/sd-netlink.h> -#include "list.h" +#include "basic/list.h" #include "netlink-types.h" -#include "prioq.h" -#include "refcnt.h" +#include "basic/prioq.h" +#include "basic/refcnt.h" #define RTNL_DEFAULT_TIMEOUT ((usec_t) (25 * USEC_PER_SEC)) diff --git a/src/libsystemd/src/sd-netlink/netlink-message.c b/src/libsystemd/src/sd-netlink/netlink-message.c index c00785ea41..115c6416ab 100644 --- a/src/libsystemd/src/sd-netlink/netlink-message.c +++ b/src/libsystemd/src/sd-netlink/netlink-message.c @@ -23,15 +23,15 @@ #include <systemd/sd-netlink.h> -#include "alloc-util.h" -#include "formats-util.h" -#include "missing.h" +#include "basic/alloc-util.h" +#include "basic/formats-util.h" +#include "basic/missing.h" #include "netlink-internal.h" #include "netlink-types.h" #include "netlink-util.h" -#include "refcnt.h" -#include "socket-util.h" -#include "util.h" +#include "basic/refcnt.h" +#include "basic/socket-util.h" +#include "basic/util.h" #define GET_CONTAINER(m, i) ((i) < (m)->n_containers ? (struct rtattr*)((uint8_t*)(m)->hdr + (m)->containers[i].offset) : NULL) #define PUSH_CONTAINER(m, new) (m)->container_offsets[(m)->n_containers++] = (uint8_t*)(new) - (uint8_t*)(m)->hdr; diff --git a/src/libsystemd/src/sd-netlink/netlink-socket.c b/src/libsystemd/src/sd-netlink/netlink-socket.c index d28a413c65..4b7037720d 100644 --- a/src/libsystemd/src/sd-netlink/netlink-socket.c +++ b/src/libsystemd/src/sd-netlink/netlink-socket.c @@ -23,15 +23,15 @@ #include <systemd/sd-netlink.h> -#include "alloc-util.h" -#include "formats-util.h" -#include "missing.h" +#include "basic/alloc-util.h" +#include "basic/formats-util.h" +#include "basic/missing.h" #include "netlink-internal.h" #include "netlink-types.h" #include "netlink-util.h" -#include "refcnt.h" -#include "socket-util.h" -#include "util.h" +#include "basic/refcnt.h" +#include "basic/socket-util.h" +#include "basic/util.h" int socket_open(int family) { int fd; diff --git a/src/libsystemd/src/sd-netlink/netlink-types.c b/src/libsystemd/src/sd-netlink/netlink-types.c index 3a4bac2ced..9f7ddf08d8 100644 --- a/src/libsystemd/src/sd-netlink/netlink-types.c +++ b/src/libsystemd/src/sd-netlink/netlink-types.c @@ -30,11 +30,11 @@ #include <linux/if_link.h> #include <linux/if_tunnel.h> -#include "macro.h" -#include "missing.h" +#include "basic/macro.h" +#include "basic/missing.h" #include "netlink-types.h" -#include "string-table.h" -#include "util.h" +#include "basic/string-table.h" +#include "basic/util.h" /* Maximum ARP IP target defined in kernel */ #define BOND_MAX_ARP_TARGETS 16 diff --git a/src/libsystemd/src/sd-netlink/netlink-types.h b/src/libsystemd/src/sd-netlink/netlink-types.h index ecb20bfcdc..53363cdbfa 100644 --- a/src/libsystemd/src/sd-netlink/netlink-types.h +++ b/src/libsystemd/src/sd-netlink/netlink-types.h @@ -19,7 +19,7 @@ along with systemd; If not, see <http://www.gnu.org/licenses/>. ***/ -#include "macro.h" +#include "basic/macro.h" enum { NETLINK_TYPE_UNSPEC, diff --git a/src/libsystemd/src/sd-netlink/netlink-util.h b/src/libsystemd/src/sd-netlink/netlink-util.h index e8f932549f..ad723b0f67 100644 --- a/src/libsystemd/src/sd-netlink/netlink-util.h +++ b/src/libsystemd/src/sd-netlink/netlink-util.h @@ -21,7 +21,7 @@ #include <systemd/sd-netlink.h> -#include "util.h" +#include "basic/util.h" int rtnl_message_new_synthetic_error(int error, uint32_t serial, sd_netlink_message **ret); uint32_t rtnl_message_get_serial(sd_netlink_message *m); diff --git a/src/libsystemd/src/sd-netlink/rtnl-message.c b/src/libsystemd/src/sd-netlink/rtnl-message.c index f6482a6157..18c2ad4945 100644 --- a/src/libsystemd/src/sd-netlink/rtnl-message.c +++ b/src/libsystemd/src/sd-netlink/rtnl-message.c @@ -23,14 +23,14 @@ #include <systemd/sd-netlink.h> -#include "formats-util.h" -#include "missing.h" +#include "basic/formats-util.h" +#include "basic/missing.h" #include "netlink-internal.h" #include "netlink-types.h" #include "netlink-util.h" -#include "refcnt.h" -#include "socket-util.h" -#include "util.h" +#include "basic/refcnt.h" +#include "basic/socket-util.h" +#include "basic/util.h" int sd_rtnl_message_route_set_dst_prefixlen(sd_netlink_message *m, unsigned char prefixlen) { struct rtmsg *rtm; diff --git a/src/libsystemd/src/sd-netlink/sd-netlink.c b/src/libsystemd/src/sd-netlink/sd-netlink.c index 3c7488463c..90745ec0c9 100644 --- a/src/libsystemd/src/sd-netlink/sd-netlink.c +++ b/src/libsystemd/src/sd-netlink/sd-netlink.c @@ -22,15 +22,15 @@ #include <systemd/sd-netlink.h> -#include "alloc-util.h" -#include "fd-util.h" -#include "hashmap.h" -#include "macro.h" -#include "missing.h" +#include "basic/alloc-util.h" +#include "basic/fd-util.h" +#include "basic/hashmap.h" +#include "basic/macro.h" +#include "basic/missing.h" #include "netlink-internal.h" #include "netlink-util.h" -#include "socket-util.h" -#include "util.h" +#include "basic/socket-util.h" +#include "basic/util.h" static int sd_netlink_new(sd_netlink **ret) { _cleanup_(sd_netlink_unrefp) sd_netlink *rtnl = NULL; diff --git a/src/libsystemd/src/sd-netlink/test-local-addresses.c b/src/libsystemd/src/sd-netlink/test-local-addresses.c index e0e28cc0cc..7582a331c8 100644 --- a/src/libsystemd/src/sd-netlink/test-local-addresses.c +++ b/src/libsystemd/src/sd-netlink/test-local-addresses.c @@ -17,9 +17,9 @@ along with systemd; If not, see <http://www.gnu.org/licenses/>. ***/ -#include "af-list.h" -#include "alloc-util.h" -#include "in-addr-util.h" +#include "basic/af-list.h" +#include "basic/alloc-util.h" +#include "basic/in-addr-util.h" #include "local-addresses.h" static void print_local_addresses(struct local_address *a, unsigned n) { diff --git a/src/libsystemd/src/sd-netlink/test-netlink.c b/src/libsystemd/src/sd-netlink/test-netlink.c index aadd0f06a8..704b5a83b2 100644 --- a/src/libsystemd/src/sd-netlink/test-netlink.c +++ b/src/libsystemd/src/sd-netlink/test-netlink.c @@ -22,13 +22,13 @@ #include <systemd/sd-netlink.h> -#include "ether-addr-util.h" -#include "macro.h" -#include "missing.h" +#include "basic/ether-addr-util.h" +#include "basic/macro.h" +#include "basic/missing.h" #include "netlink-util.h" -#include "socket-util.h" -#include "string-util.h" -#include "util.h" +#include "basic/socket-util.h" +#include "basic/string-util.h" +#include "basic/util.h" static void test_message_link_bridge(sd_netlink *rtnl) { _cleanup_(sd_netlink_message_unrefp) sd_netlink_message *message = NULL; diff --git a/src/libsystemd/src/sd-network/Makefile b/src/libsystemd/src/sd-network/Makefile new file mode 120000 index 0000000000..71a1159ce0 --- /dev/null +++ b/src/libsystemd/src/sd-network/Makefile @@ -0,0 +1 @@ +../subdir.mk
\ No newline at end of file diff --git a/src/libsystemd/src/sd-network/network-util.c b/src/libsystemd/src/sd-network/network-util.c index a0d9b5f1a4..ac488a0bf2 100644 --- a/src/libsystemd/src/sd-network/network-util.c +++ b/src/libsystemd/src/sd-network/network-util.c @@ -17,10 +17,10 @@ along with systemd; If not, see <http://www.gnu.org/licenses/>. ***/ -#include "alloc-util.h" -#include "fd-util.h" +#include "basic/alloc-util.h" +#include "basic/fd-util.h" #include "network-util.h" -#include "strv.h" +#include "basic/strv.h" bool network_is_online(void) { _cleanup_free_ char *state = NULL; diff --git a/src/libsystemd/src/sd-network/sd-network.c b/src/libsystemd/src/sd-network/sd-network.c index 70083213f9..5c0f9d05e3 100644 --- a/src/libsystemd/src/sd-network/sd-network.c +++ b/src/libsystemd/src/sd-network/sd-network.c @@ -25,16 +25,16 @@ #include <systemd/sd-network.h> -#include "alloc-util.h" -#include "fd-util.h" -#include "fileio.h" -#include "fs-util.h" -#include "macro.h" -#include "parse-util.h" -#include "stdio-util.h" -#include "string-util.h" -#include "strv.h" -#include "util.h" +#include "basic/alloc-util.h" +#include "basic/fd-util.h" +#include "basic/fileio.h" +#include "basic/fs-util.h" +#include "basic/macro.h" +#include "basic/parse-util.h" +#include "basic/stdio-util.h" +#include "basic/string-util.h" +#include "basic/strv.h" +#include "basic/util.h" _public_ int sd_network_get_operational_state(char **state) { _cleanup_free_ char *s = NULL; diff --git a/src/libsystemd/src/sd-path/Makefile b/src/libsystemd/src/sd-path/Makefile new file mode 120000 index 0000000000..71a1159ce0 --- /dev/null +++ b/src/libsystemd/src/sd-path/Makefile @@ -0,0 +1 @@ +../subdir.mk
\ No newline at end of file diff --git a/src/libsystemd/src/sd-path/sd-path.c b/src/libsystemd/src/sd-path/sd-path.c index 6d9f3e2a61..f18fd49719 100644 --- a/src/libsystemd/src/sd-path/sd-path.c +++ b/src/libsystemd/src/sd-path/sd-path.c @@ -19,16 +19,16 @@ #include <systemd/sd-path.h> -#include "alloc-util.h" -#include "architecture.h" -#include "fd-util.h" -#include "fileio.h" -#include "missing.h" -#include "path-util.h" -#include "string-util.h" -#include "strv.h" -#include "user-util.h" -#include "util.h" +#include "basic/alloc-util.h" +#include "basic/architecture.h" +#include "basic/fd-util.h" +#include "basic/fileio.h" +#include "basic/missing.h" +#include "basic/path-util.h" +#include "basic/string-util.h" +#include "basic/strv.h" +#include "basic/user-util.h" +#include "basic/util.h" static int from_environment(const char *envname, const char *fallback, const char **ret) { assert(ret); diff --git a/src/libsystemd/src/sd-resolve/Makefile b/src/libsystemd/src/sd-resolve/Makefile new file mode 120000 index 0000000000..71a1159ce0 --- /dev/null +++ b/src/libsystemd/src/sd-resolve/Makefile @@ -0,0 +1 @@ +../subdir.mk
\ No newline at end of file diff --git a/src/libsystemd/src/sd-resolve/sd-resolve.c b/src/libsystemd/src/sd-resolve/sd-resolve.c index 6eacf2b69a..6a1eae4d9f 100644 --- a/src/libsystemd/src/sd-resolve/sd-resolve.c +++ b/src/libsystemd/src/sd-resolve/sd-resolve.c @@ -31,13 +31,13 @@ #include <systemd/sd-resolve.h> -#include "alloc-util.h" -#include "fd-util.h" -#include "io-util.h" -#include "list.h" -#include "missing.h" -#include "socket-util.h" -#include "util.h" +#include "basic/alloc-util.h" +#include "basic/fd-util.h" +#include "basic/io-util.h" +#include "basic/list.h" +#include "basic/missing.h" +#include "basic/socket-util.h" +#include "basic/util.h" #define WORKERS_MIN 1U #define WORKERS_MAX 16U diff --git a/src/libsystemd/src/sd-resolve/test-resolve.c b/src/libsystemd/src/sd-resolve/test-resolve.c index 0209cc77e7..ac5cc0c28d 100644 --- a/src/libsystemd/src/sd-resolve/test-resolve.c +++ b/src/libsystemd/src/sd-resolve/test-resolve.c @@ -28,10 +28,10 @@ #include <systemd/sd-resolve.h> -#include "alloc-util.h" -#include "macro.h" -#include "socket-util.h" -#include "string-util.h" +#include "basic/alloc-util.h" +#include "basic/macro.h" +#include "basic/socket-util.h" +#include "basic/string-util.h" static int getaddrinfo_handler(sd_resolve_query *q, int ret, const struct addrinfo *ai, void *userdata) { const struct addrinfo *i; diff --git a/src/libsystemd/src/sd-utf8/Makefile b/src/libsystemd/src/sd-utf8/Makefile new file mode 120000 index 0000000000..71a1159ce0 --- /dev/null +++ b/src/libsystemd/src/sd-utf8/Makefile @@ -0,0 +1 @@ +../subdir.mk
\ No newline at end of file diff --git a/src/libsystemd/src/sd-utf8/sd-utf8.c b/src/libsystemd/src/sd-utf8/sd-utf8.c index 77be8e1996..58e4a88f07 100644 --- a/src/libsystemd/src/sd-utf8/sd-utf8.c +++ b/src/libsystemd/src/sd-utf8/sd-utf8.c @@ -19,8 +19,8 @@ #include <systemd/sd-utf8.h> -#include "utf8.h" -#include "util.h" +#include "basic/utf8.h" +#include "basic/util.h" _public_ const char *sd_utf8_is_valid(const char *s) { assert_return(s, NULL); diff --git a/src/libsystemd/src/subdir.mk b/src/libsystemd/src/subdir.mk index 35def00fdc..752ffa6aed 100644 --- a/src/libsystemd/src/subdir.mk +++ b/src/libsystemd/src/subdir.mk @@ -20,10 +20,15 @@ # # 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 $(dir $(lastword $(MAKEFILE_LIST)))/../../../../config.mk include $(topsrcdir)/build-aux/Makefile.head.mk +systemd.CPPFLAGS += $(libsystemd.CPPFLAGS) +systemd.CPPFLAGS += $(libbasic.CPPFLAGS) +systemd.CPPFLAGS += $(libshared.CPPFLAGS) systemd.CPPFLAGS += -DLIBDIR=\"$(libdir)\" systemd.CPPFLAGS += -DUDEVLIBEXECDIR=\"$(udevlibexecdir)\" +systemd.CPPFLAGS += -DROOTLIBDIR=\"$(rootlibdir)\" include $(topsrcdir)/build-aux/Makefile.tail.mk diff --git a/src/libudev/src/Makefile b/src/libudev/src/Makefile index ed606315e1..77fc1fe6aa 100644 --- a/src/libudev/src/Makefile +++ b/src/libudev/src/Makefile @@ -67,9 +67,9 @@ noinst_LTLIBRARIES += \ libudev_internal_la_SOURCES =\ $(libudev_la_SOURCES) -test-libudev-sym.c: \ - src/libudev/libudev.sym \ - src/udev/udev.h +$(outdir)/test-libudev-sym.c: \ + $(srcdir)/libudev.sym \ + $(srcdir)/udev.h $(generate-sym-test) nodist_test_libudev_sym_SOURCES = \ @@ -80,4 +80,6 @@ test_libudev_sym_CFLAGS = \ test_libudev_sym_LDADD = \ libudev.la +systemd.sed_files += libudev.pc + include $(topsrcdir)/build-aux/Makefile.tail.mk diff --git a/src/libudev/src/libudev-device-private.c b/src/libudev/src/libudev-device-private.c index 2aae0726c1..bd18d60c1e 100644 --- a/src/libudev/src/libudev-device-private.c +++ b/src/libudev/src/libudev-device-private.c @@ -20,7 +20,7 @@ #include "libudev.h" -#include "device-private.h" +#include "sd-device/device-private.h" #include "libudev-device-internal.h" #include "libudev-private.h" diff --git a/src/libudev/src/libudev-device.c b/src/libudev/src/libudev-device.c index 6536f4cfbb..3ad59176b3 100644 --- a/src/libudev/src/libudev-device.c +++ b/src/libudev/src/libudev-device.c @@ -37,12 +37,12 @@ #include "libudev.h" #include <systemd/sd-device.h> -#include "alloc-util.h" -#include "device-private.h" -#include "device-util.h" +#include "basic/alloc-util.h" +#include "sd-device/device-private.h" +#include "sd-device/device-util.h" #include "libudev-device-internal.h" #include "libudev-private.h" -#include "parse-util.h" +#include "basic/parse-util.h" /** * SECTION:libudev-device diff --git a/src/libudev/src/libudev-enumerate.c b/src/libudev/src/libudev-enumerate.c index 9910cea957..a58779866e 100644 --- a/src/libudev/src/libudev-enumerate.c +++ b/src/libudev/src/libudev-enumerate.c @@ -31,9 +31,9 @@ #include "libudev.h" #include <systemd/sd-device.h> -#include "alloc-util.h" -#include "device-enumerator-private.h" -#include "device-util.h" +#include "basic/alloc-util.h" +#include "sd-device/device-enumerator-private.h" +#include "sd-device/device-util.h" #include "libudev-device-internal.h" /** diff --git a/src/libudev/src/libudev-hwdb.c b/src/libudev/src/libudev-hwdb.c index 8c4b488086..436e2ccb67 100644 --- a/src/libudev/src/libudev-hwdb.c +++ b/src/libudev/src/libudev-hwdb.c @@ -19,8 +19,8 @@ #include <systemd/sd-hwdb.h> -#include "alloc-util.h" -#include "hwdb-util.h" +#include "basic/alloc-util.h" +#include "sd-hwdb/hwdb-util.h" #include "libudev-private.h" /** diff --git a/src/libudev/src/libudev-list.c b/src/libudev/src/libudev-list.c index da496ed456..ed40ab2600 100644 --- a/src/libudev/src/libudev-list.c +++ b/src/libudev/src/libudev-list.c @@ -22,7 +22,7 @@ #include <stdlib.h> #include <string.h> -#include "alloc-util.h" +#include "basic/alloc-util.h" #include "libudev-private.h" /** diff --git a/src/libudev/src/libudev-monitor.c b/src/libudev/src/libudev-monitor.c index f870eba9eb..b15869ea2e 100644 --- a/src/libudev/src/libudev-monitor.c +++ b/src/libudev/src/libudev-monitor.c @@ -30,15 +30,15 @@ #include "libudev.h" -#include "alloc-util.h" -#include "fd-util.h" -#include "fileio.h" -#include "formats-util.h" +#include "basic/alloc-util.h" +#include "basic/fd-util.h" +#include "basic/fileio.h" +#include "basic/formats-util.h" #include "libudev-private.h" -#include "missing.h" -#include "mount-util.h" -#include "socket-util.h" -#include "string-util.h" +#include "basic/missing.h" +#include "basic/mount-util.h" +#include "basic/socket-util.h" +#include "basic/string-util.h" /** * SECTION:libudev-monitor diff --git a/src/libudev/src/libudev-private.h b/src/libudev/src/libudev-private.h index 52c5075110..717601766c 100644 --- a/src/libudev/src/libudev-private.h +++ b/src/libudev/src/libudev-private.h @@ -26,10 +26,10 @@ #include "libudev.h" -#include "macro.h" -#include "mkdir.h" -#include "strxcpyx.h" -#include "util.h" +#include "basic/macro.h" +#include "basic/mkdir.h" +#include "basic/strxcpyx.h" +#include "basic/util.h" #define READ_END 0 #define WRITE_END 1 diff --git a/src/libudev/src/libudev-queue.c b/src/libudev/src/libudev-queue.c index e3dffa6925..31386282b7 100644 --- a/src/libudev/src/libudev-queue.c +++ b/src/libudev/src/libudev-queue.c @@ -24,9 +24,9 @@ #include <sys/inotify.h> #include <unistd.h> -#include "alloc-util.h" -#include "fd-util.h" -#include "io-util.h" +#include "basic/alloc-util.h" +#include "basic/fd-util.h" +#include "basic/io-util.h" #include "libudev-private.h" /** diff --git a/src/libudev/src/libudev-util.c b/src/libudev/src/libudev-util.c index 574cfeac85..be1b851aa4 100644 --- a/src/libudev/src/libudev-util.c +++ b/src/libudev/src/libudev-util.c @@ -26,11 +26,11 @@ #include "libudev.h" -#include "MurmurHash2.h" -#include "device-nodes.h" +#include "basic/MurmurHash2.h" +#include "basic/device-nodes.h" #include "libudev-private.h" -#include "syslog-util.h" -#include "utf8.h" +#include "basic/syslog-util.h" +#include "basic/utf8.h" /** * SECTION:libudev-util diff --git a/src/libudev/src/libudev.c b/src/libudev/src/libudev.c index 63fb05547d..bdb26d8873 100644 --- a/src/libudev/src/libudev.c +++ b/src/libudev/src/libudev.c @@ -26,11 +26,11 @@ #include "libudev.h" -#include "alloc-util.h" -#include "fd-util.h" +#include "basic/alloc-util.h" +#include "basic/fd-util.h" #include "libudev-private.h" -#include "missing.h" -#include "string-util.h" +#include "basic/missing.h" +#include "basic/string-util.h" /** * SECTION:libudev diff --git a/src/libudev/src/udev.h b/src/libudev/src/udev.h index 00de88972a..7b5a308e58 100644 --- a/src/libudev/src/udev.h +++ b/src/libudev/src/udev.h @@ -25,11 +25,11 @@ #include "libudev.h" #include <systemd/sd-netlink.h> -#include "label.h" +#include "basic/label.h" #include "libudev-private.h" -#include "macro.h" -#include "strv.h" -#include "util.h" +#include "basic/macro.h" +#include "basic/strv.h" +#include "basic/util.h" struct udev_event { struct udev *udev; diff --git a/src/nss-myhostname/Makefile b/src/nss-myhostname/Makefile index b5f6ff62aa..201dbde20a 100644 --- a/src/nss-myhostname/Makefile +++ b/src/nss-myhostname/Makefile @@ -44,4 +44,6 @@ lib_LTLIBRARIES += \ libnss_myhostname.la endif # HAVE_MYHOSTNAME +libnss_myhostname_la_LIBADD += libshared.la # oops, because I moved local-addresses.{c,h} into libshared + include $(topsrcdir)/build-aux/Makefile.tail.mk diff --git a/src/nss-myhostname/nss-myhostname.c b/src/nss-myhostname/nss-myhostname.c index 2b83d127b7..832ab62d36 100644 --- a/src/nss-myhostname/nss-myhostname.c +++ b/src/nss-myhostname/nss-myhostname.c @@ -24,14 +24,14 @@ #include <stdlib.h> #include <string.h> -#include "alloc-util.h" -#include "hostname-util.h" -#include "local-addresses.h" -#include "macro.h" -#include "nss-util.h" -#include "signal-util.h" -#include "string-util.h" -#include "util.h" +#include "basic/alloc-util.h" +#include "basic/hostname-util.h" +#include "sd-netlink/local-addresses.h" +#include "basic/macro.h" +#include "basic/nss-util.h" +#include "basic/signal-util.h" +#include "basic/string-util.h" +#include "basic/util.h" /* We use 127.0.0.2 as IPv4 address. This has the advantage over * 127.0.0.1 that it can be translated back to the local hostname. For diff --git a/src/systemd-ac-power/ac-power.c b/src/systemd-ac-power/ac-power.c index c5277884a8..945c318f66 100644 --- a/src/systemd-ac-power/ac-power.c +++ b/src/systemd-ac-power/ac-power.c @@ -17,7 +17,7 @@ along with systemd; If not, see <http://www.gnu.org/licenses/>. ***/ -#include "util.h" +#include "basic/util.h" int main(int argc, char *argv[]) { int r; diff --git a/src/systemd-activate/activate.c b/src/systemd-activate/activate.c index 89cc1ee813..2ad205af17 100644 --- a/src/systemd-activate/activate.c +++ b/src/systemd-activate/activate.c @@ -26,15 +26,15 @@ #include <systemd/sd-daemon.h> -#include "alloc-util.h" -#include "escape.h" -#include "fd-util.h" -#include "log.h" -#include "macro.h" -#include "signal-util.h" -#include "socket-util.h" -#include "string-util.h" -#include "strv.h" +#include "basic/alloc-util.h" +#include "basic/escape.h" +#include "basic/fd-util.h" +#include "basic/log.h" +#include "basic/macro.h" +#include "basic/signal-util.h" +#include "basic/socket-util.h" +#include "basic/string-util.h" +#include "basic/strv.h" static char** arg_listen = NULL; static bool arg_accept = false; diff --git a/src/systemd-analyze/analyze-verify.c b/src/systemd-analyze/analyze-verify.c index 5fd3ee49eb..7553574f53 100644 --- a/src/systemd-analyze/analyze-verify.c +++ b/src/systemd-analyze/analyze-verify.c @@ -19,16 +19,16 @@ #include <stdlib.h> -#include "alloc-util.h" +#include "basic/alloc-util.h" #include "analyze-verify.h" -#include "bus-error.h" -#include "bus-util.h" -#include "log.h" +#include "sd-bus/bus-error.h" +#include "shared/bus-util.h" +#include "basic/log.h" #include "manager.h" -#include "pager.h" -#include "path-util.h" -#include "strv.h" -#include "unit-name.h" +#include "shared/pager.h" +#include "basic/path-util.h" +#include "basic/strv.h" +#include "basic/unit-name.h" static int prepare_filename(const char *filename, char **ret) { int r; diff --git a/src/systemd-analyze/analyze-verify.h b/src/systemd-analyze/analyze-verify.h index d8204dc69c..7b89007fd0 100644 --- a/src/systemd-analyze/analyze-verify.h +++ b/src/systemd-analyze/analyze-verify.h @@ -21,6 +21,6 @@ #include <stdbool.h> -#include "path-lookup.h" +#include "shared/path-lookup.h" int verify_units(char **filenames, UnitFileScope scope, bool check_man); diff --git a/src/systemd-analyze/analyze.c b/src/systemd-analyze/analyze.c index 0e1eee16ec..1ce700ccba 100644 --- a/src/systemd-analyze/analyze.c +++ b/src/systemd-analyze/analyze.c @@ -25,23 +25,23 @@ #include <systemd/sd-bus.h> -#include "alloc-util.h" +#include "basic/alloc-util.h" #include "analyze-verify.h" -#include "bus-error.h" -#include "bus-unit-util.h" -#include "bus-util.h" -#include "glob-util.h" -#include "hashmap.h" -#include "locale-util.h" -#include "log.h" -#include "pager.h" -#include "parse-util.h" -#include "special.h" -#include "strv.h" -#include "strxcpyx.h" -#include "terminal-util.h" -#include "unit-name.h" -#include "util.h" +#include "sd-bus/bus-error.h" +#include "shared/bus-unit-util.h" +#include "shared/bus-util.h" +#include "basic/glob-util.h" +#include "basic/hashmap.h" +#include "basic/locale-util.h" +#include "basic/log.h" +#include "shared/pager.h" +#include "basic/parse-util.h" +#include "basic/special.h" +#include "basic/strv.h" +#include "basic/strxcpyx.h" +#include "basic/terminal-util.h" +#include "basic/unit-name.h" +#include "basic/util.h" #define SCALE_X (0.1 / 1000.0) /* pixels per us */ #define SCALE_Y (20.0) diff --git a/src/systemd-ask-password/ask-password.c b/src/systemd-ask-password/ask-password.c index 6d53dd982c..95951601c1 100644 --- a/src/systemd-ask-password/ask-password.c +++ b/src/systemd-ask-password/ask-password.c @@ -22,11 +22,11 @@ #include <stddef.h> #include <unistd.h> -#include "ask-password-api.h" -#include "def.h" -#include "log.h" -#include "macro.h" -#include "strv.h" +#include "shared/ask-password-api.h" +#include "basic/def.h" +#include "basic/log.h" +#include "basic/macro.h" +#include "basic/strv.h" static const char *arg_icon = NULL; static const char *arg_id = NULL; diff --git a/src/systemd-cgls/cgls.c b/src/systemd-cgls/cgls.c index ed2846ee57..8f1757924f 100644 --- a/src/systemd-cgls/cgls.c +++ b/src/systemd-cgls/cgls.c @@ -25,18 +25,18 @@ #include <systemd/sd-bus.h> -#include "alloc-util.h" -#include "bus-error.h" -#include "bus-util.h" -#include "cgroup-show.h" -#include "cgroup-util.h" -#include "fileio.h" -#include "log.h" -#include "output-mode.h" -#include "pager.h" -#include "path-util.h" -#include "unit-name.h" -#include "util.h" +#include "basic/alloc-util.h" +#include "sd-bus/bus-error.h" +#include "shared/bus-util.h" +#include "shared/cgroup-show.h" +#include "basic/cgroup-util.h" +#include "basic/fileio.h" +#include "basic/log.h" +#include "shared/output-mode.h" +#include "shared/pager.h" +#include "basic/path-util.h" +#include "basic/unit-name.h" +#include "basic/util.h" static bool arg_no_pager = false; static bool arg_kernel_threads = false; diff --git a/src/systemd-cgroups-agent/cgroups-agent.c b/src/systemd-cgroups-agent/cgroups-agent.c index d7c722ac3d..a09333d82c 100644 --- a/src/systemd-cgroups-agent/cgroups-agent.c +++ b/src/systemd-cgroups-agent/cgroups-agent.c @@ -20,9 +20,9 @@ #include <stdlib.h> #include <sys/socket.h> -#include "fd-util.h" -#include "log.h" -#include "socket-util.h" +#include "basic/fd-util.h" +#include "basic/log.h" +#include "basic/socket-util.h" int main(int argc, char *argv[]) { diff --git a/src/systemd-cgtop/cgtop.c b/src/systemd-cgtop/cgtop.c index 6cbea86070..78e9950a5b 100644 --- a/src/systemd-cgtop/cgtop.c +++ b/src/systemd-cgtop/cgtop.c @@ -28,20 +28,20 @@ #include <systemd/sd-bus.h> -#include "alloc-util.h" -#include "bus-error.h" -#include "bus-util.h" -#include "cgroup-util.h" -#include "fd-util.h" -#include "fileio.h" -#include "hashmap.h" -#include "parse-util.h" -#include "path-util.h" -#include "process-util.h" -#include "stdio-util.h" -#include "terminal-util.h" -#include "unit-name.h" -#include "util.h" +#include "basic/alloc-util.h" +#include "sd-bus/bus-error.h" +#include "shared/bus-util.h" +#include "basic/cgroup-util.h" +#include "basic/fd-util.h" +#include "basic/fileio.h" +#include "basic/hashmap.h" +#include "basic/parse-util.h" +#include "basic/path-util.h" +#include "basic/process-util.h" +#include "basic/stdio-util.h" +#include "basic/terminal-util.h" +#include "basic/unit-name.h" +#include "basic/util.h" typedef struct Group { char *path; diff --git a/src/systemd-cryptsetup/Makefile b/src/systemd-cryptsetup/Makefile index 73a46bf6da..116ffbc664 100644 --- a/src/systemd-cryptsetup/Makefile +++ b/src/systemd-cryptsetup/Makefile @@ -56,4 +56,6 @@ SYSINIT_TARGET_WANTS += \ endif # HAVE_LIBCRYPTSETUP +systemd.CPPFLAGS += -DSYSTEMD_CRYPTSETUP_PATH=\"$(rootlibexecdir)/systemd-cryptsetup\" + include $(topsrcdir)/build-aux/Makefile.tail.mk diff --git a/src/systemd-cryptsetup/cryptsetup-generator.c b/src/systemd-cryptsetup/cryptsetup-generator.c index 8ac5ab730a..69787fc719 100644 --- a/src/systemd-cryptsetup/cryptsetup-generator.c +++ b/src/systemd-cryptsetup/cryptsetup-generator.c @@ -19,22 +19,22 @@ #include <errno.h> -#include "alloc-util.h" -#include "dropin.h" -#include "fd-util.h" -#include "fileio.h" -#include "fstab-util.h" -#include "generator.h" -#include "hashmap.h" -#include "log.h" -#include "mkdir.h" -#include "parse-util.h" -#include "path-util.h" -#include "proc-cmdline.h" -#include "string-util.h" -#include "strv.h" -#include "unit-name.h" -#include "util.h" +#include "basic/alloc-util.h" +#include "shared/dropin.h" +#include "basic/fd-util.h" +#include "basic/fileio.h" +#include "shared/fstab-util.h" +#include "shared/generator.h" +#include "basic/hashmap.h" +#include "basic/log.h" +#include "basic/mkdir.h" +#include "basic/parse-util.h" +#include "basic/path-util.h" +#include "basic/proc-cmdline.h" +#include "basic/string-util.h" +#include "basic/strv.h" +#include "basic/unit-name.h" +#include "basic/util.h" typedef struct crypto_device { char *uuid; diff --git a/src/systemd-cryptsetup/cryptsetup.c b/src/systemd-cryptsetup/cryptsetup.c index 8024f80e36..fc0d7e0e9a 100644 --- a/src/systemd-cryptsetup/cryptsetup.c +++ b/src/systemd-cryptsetup/cryptsetup.c @@ -25,18 +25,18 @@ #include <systemd/sd-device.h> -#include "alloc-util.h" -#include "ask-password-api.h" -#include "device-util.h" -#include "escape.h" -#include "fileio.h" -#include "log.h" -#include "mount-util.h" -#include "parse-util.h" -#include "path-util.h" -#include "string-util.h" -#include "strv.h" -#include "util.h" +#include "basic/alloc-util.h" +#include "shared/ask-password-api.h" +#include "sd-device/device-util.h" +#include "basic/escape.h" +#include "basic/fileio.h" +#include "basic/log.h" +#include "basic/mount-util.h" +#include "basic/parse-util.h" +#include "basic/path-util.h" +#include "basic/string-util.h" +#include "basic/strv.h" +#include "basic/util.h" static const char *arg_type = NULL; /* CRYPT_LUKS1, CRYPT_TCRYPT or CRYPT_PLAIN */ static char *arg_cipher = NULL; diff --git a/src/systemd-dbus1-generator/Makefile b/src/systemd-dbus1-generator/Makefile index 1d7f0d1a81..a817b954e5 100644 --- a/src/systemd-dbus1-generator/Makefile +++ b/src/systemd-dbus1-generator/Makefile @@ -46,4 +46,7 @@ dist_xinitrc_SCRIPTS = \ INSTALL_EXEC_HOOKS += dbus1-generator-install-hook UNINSTALL_EXEC_HOOKS += dbus1-generator-uninstall-hook +systemd.CPPFLAGS += -DSYSTEM_DATA_UNIT_PATH=\"$(systemunitdir)\" +systemd.CPPFLAGS += -DUSER_DATA_UNIT_PATH=\"$(userunitdir)\" + include $(topsrcdir)/build-aux/Makefile.tail.mk diff --git a/src/systemd-dbus1-generator/dbus1-generator.c b/src/systemd-dbus1-generator/dbus1-generator.c index 717cb9558e..55bee9fd0d 100644 --- a/src/systemd-dbus1-generator/dbus1-generator.c +++ b/src/systemd-dbus1-generator/dbus1-generator.c @@ -17,18 +17,18 @@ along with systemd; If not, see <http://www.gnu.org/licenses/>. ***/ -#include "alloc-util.h" -#include "bus-internal.h" -#include "bus-util.h" -#include "cgroup-util.h" -#include "conf-parser.h" -#include "dirent-util.h" -#include "fd-util.h" -#include "fileio.h" -#include "mkdir.h" -#include "special.h" -#include "unit-name.h" -#include "util.h" +#include "basic/alloc-util.h" +#include "sd-bus/bus-internal.h" +#include "shared/bus-util.h" +#include "basic/cgroup-util.h" +#include "shared/conf-parser.h" +#include "basic/dirent-util.h" +#include "basic/fd-util.h" +#include "basic/fileio.h" +#include "basic/mkdir.h" +#include "basic/special.h" +#include "basic/unit-name.h" +#include "basic/util.h" static const char *arg_dest_late = "/tmp", *arg_dest = "/tmp"; diff --git a/src/systemd-debug-generator/Makefile b/src/systemd-debug-generator/Makefile index bba46c2905..6d087d7f37 100644 --- a/src/systemd-debug-generator/Makefile +++ b/src/systemd-debug-generator/Makefile @@ -31,4 +31,6 @@ systemd_debug_generator_SOURCES = \ systemd_debug_generator_LDADD = \ libshared.la +systemd.CPPFLAGS += -DSYSTEM_DATA_UNIT_PATH=\"$(systemunitdir)\" + include $(topsrcdir)/build-aux/Makefile.tail.mk diff --git a/src/systemd-debug-generator/debug-generator.c b/src/systemd-debug-generator/debug-generator.c index 7e80af78e7..2db31e5de6 100644 --- a/src/systemd-debug-generator/debug-generator.c +++ b/src/systemd-debug-generator/debug-generator.c @@ -17,15 +17,15 @@ along with systemd; If not, see <http://www.gnu.org/licenses/>. ***/ -#include "alloc-util.h" -#include "mkdir.h" -#include "parse-util.h" -#include "proc-cmdline.h" -#include "special.h" -#include "string-util.h" -#include "strv.h" -#include "unit-name.h" -#include "util.h" +#include "basic/alloc-util.h" +#include "basic/mkdir.h" +#include "basic/parse-util.h" +#include "basic/proc-cmdline.h" +#include "basic/special.h" +#include "basic/string-util.h" +#include "basic/strv.h" +#include "basic/unit-name.h" +#include "basic/util.h" static char *arg_default_unit = NULL; static const char *arg_dest = "/tmp"; diff --git a/src/systemd-delta/delta.c b/src/systemd-delta/delta.c index f32744def2..dd571e7195 100644 --- a/src/systemd-delta/delta.c +++ b/src/systemd-delta/delta.c @@ -24,23 +24,23 @@ #include <sys/prctl.h> #include <unistd.h> -#include "alloc-util.h" -#include "dirent-util.h" -#include "fd-util.h" -#include "fs-util.h" -#include "hashmap.h" -#include "locale-util.h" -#include "log.h" -#include "pager.h" -#include "parse-util.h" -#include "path-util.h" -#include "process-util.h" -#include "signal-util.h" -#include "stat-util.h" -#include "string-util.h" -#include "strv.h" -#include "terminal-util.h" -#include "util.h" +#include "basic/alloc-util.h" +#include "basic/dirent-util.h" +#include "basic/fd-util.h" +#include "basic/fs-util.h" +#include "basic/hashmap.h" +#include "basic/locale-util.h" +#include "basic/log.h" +#include "shared/pager.h" +#include "basic/parse-util.h" +#include "basic/path-util.h" +#include "basic/process-util.h" +#include "basic/signal-util.h" +#include "basic/stat-util.h" +#include "basic/string-util.h" +#include "basic/strv.h" +#include "basic/terminal-util.h" +#include "basic/util.h" static const char prefixes[] = "/etc\0" diff --git a/src/systemd-escape/escape.c b/src/systemd-escape/escape.c index 9f39049577..479ea0e87c 100644 --- a/src/systemd-escape/escape.c +++ b/src/systemd-escape/escape.c @@ -21,11 +21,11 @@ #include <stdio.h> #include <stdlib.h> -#include "alloc-util.h" -#include "log.h" -#include "string-util.h" -#include "strv.h" -#include "unit-name.h" +#include "basic/alloc-util.h" +#include "basic/log.h" +#include "basic/string-util.h" +#include "basic/strv.h" +#include "basic/unit-name.h" static enum { ACTION_ESCAPE, diff --git a/src/systemd-firstboot/firstboot.c b/src/systemd-firstboot/firstboot.c index 1e1a592b7c..46e82a2a7b 100644 --- a/src/systemd-firstboot/firstboot.c +++ b/src/systemd-firstboot/firstboot.c @@ -22,24 +22,24 @@ #include <shadow.h> #include <unistd.h> -#include "alloc-util.h" -#include "ask-password-api.h" -#include "copy.h" -#include "fd-util.h" -#include "fileio.h" -#include "fs-util.h" -#include "hostname-util.h" -#include "locale-util.h" -#include "mkdir.h" -#include "parse-util.h" -#include "path-util.h" -#include "random-util.h" -#include "string-util.h" -#include "strv.h" -#include "terminal-util.h" -#include "time-util.h" -#include "umask-util.h" -#include "user-util.h" +#include "basic/alloc-util.h" +#include "shared/ask-password-api.h" +#include "basic/copy.h" +#include "basic/fd-util.h" +#include "basic/fileio.h" +#include "basic/fs-util.h" +#include "basic/hostname-util.h" +#include "basic/locale-util.h" +#include "basic/mkdir.h" +#include "basic/parse-util.h" +#include "basic/path-util.h" +#include "basic/random-util.h" +#include "basic/string-util.h" +#include "basic/strv.h" +#include "basic/terminal-util.h" +#include "basic/time-util.h" +#include "basic/umask-util.h" +#include "basic/user-util.h" static char *arg_root = NULL; static char *arg_locale = NULL; /* $LANG */ diff --git a/src/systemd-fsck/fsck.c b/src/systemd-fsck/fsck.c index d7f0829ffc..f6e5309cd5 100644 --- a/src/systemd-fsck/fsck.c +++ b/src/systemd-fsck/fsck.c @@ -30,22 +30,22 @@ #include <systemd/sd-bus.h> #include <systemd/sd-device.h> -#include "alloc-util.h" -#include "bus-common-errors.h" -#include "bus-error.h" -#include "bus-util.h" -#include "device-util.h" -#include "fd-util.h" -#include "fs-util.h" -#include "parse-util.h" -#include "path-util.h" -#include "proc-cmdline.h" -#include "process-util.h" -#include "signal-util.h" -#include "socket-util.h" -#include "special.h" -#include "stdio-util.h" -#include "util.h" +#include "basic/alloc-util.h" +#include "sd-bus/bus-common-errors.h" +#include "sd-bus/bus-error.h" +#include "shared/bus-util.h" +#include "sd-device/device-util.h" +#include "basic/fd-util.h" +#include "basic/fs-util.h" +#include "basic/parse-util.h" +#include "basic/path-util.h" +#include "basic/proc-cmdline.h" +#include "basic/process-util.h" +#include "basic/signal-util.h" +#include "basic/socket-util.h" +#include "basic/special.h" +#include "basic/stdio-util.h" +#include "basic/util.h" /* exit codes as defined in fsck(8) */ enum { diff --git a/src/systemd-fstab-generator/fstab-generator.c b/src/systemd-fstab-generator/fstab-generator.c index 108522873e..bedf469f93 100644 --- a/src/systemd-fstab-generator/fstab-generator.c +++ b/src/systemd-fstab-generator/fstab-generator.c @@ -23,25 +23,25 @@ #include <string.h> #include <unistd.h> -#include "alloc-util.h" -#include "fd-util.h" -#include "fileio.h" -#include "fstab-util.h" -#include "generator.h" -#include "log.h" -#include "mkdir.h" +#include "basic/alloc-util.h" +#include "basic/fd-util.h" +#include "basic/fileio.h" +#include "shared/fstab-util.h" +#include "shared/generator.h" +#include "basic/log.h" +#include "basic/mkdir.h" #include "mount-setup.h" -#include "mount-util.h" -#include "parse-util.h" -#include "path-util.h" -#include "proc-cmdline.h" -#include "special.h" -#include "stat-util.h" -#include "string-util.h" -#include "strv.h" -#include "unit-name.h" -#include "util.h" -#include "virt.h" +#include "basic/mount-util.h" +#include "basic/parse-util.h" +#include "basic/path-util.h" +#include "basic/proc-cmdline.h" +#include "basic/special.h" +#include "basic/stat-util.h" +#include "basic/string-util.h" +#include "basic/strv.h" +#include "basic/unit-name.h" +#include "basic/util.h" +#include "basic/virt.h" static const char *arg_dest = "/tmp"; static bool arg_fstab_enabled = true; diff --git a/src/systemd-fstab-generator/mount-setup.c b/src/systemd-fstab-generator/mount-setup.c new file mode 120000 index 0000000000..a4ab487157 --- /dev/null +++ b/src/systemd-fstab-generator/mount-setup.c @@ -0,0 +1 @@ +../libcore/mount-setup.c
\ No newline at end of file diff --git a/src/systemd-fstab-generator/mount-setup.h b/src/systemd-fstab-generator/mount-setup.h new file mode 120000 index 0000000000..1f984851f8 --- /dev/null +++ b/src/systemd-fstab-generator/mount-setup.h @@ -0,0 +1 @@ +../libcore/mount-setup.h
\ No newline at end of file diff --git a/src/systemd-getty-generator/Makefile b/src/systemd-getty-generator/Makefile index 14f7d02a86..cfca8e1e1f 100644 --- a/src/systemd-getty-generator/Makefile +++ b/src/systemd-getty-generator/Makefile @@ -30,4 +30,6 @@ systemd_getty_generator_SOURCES = \ systemd_getty_generator_LDADD = \ libshared.la +systemd.CPPFLAGS += -DSYSTEM_DATA_UNIT_PATH=\"$(systemunitdir)\" + include $(topsrcdir)/build-aux/Makefile.tail.mk diff --git a/src/systemd-getty-generator/getty-generator.c b/src/systemd-getty-generator/getty-generator.c index b15c76b5b8..c78fac7694 100644 --- a/src/systemd-getty-generator/getty-generator.c +++ b/src/systemd-getty-generator/getty-generator.c @@ -22,18 +22,18 @@ #include <string.h> #include <unistd.h> -#include "alloc-util.h" -#include "fd-util.h" -#include "fileio.h" -#include "log.h" -#include "mkdir.h" -#include "path-util.h" -#include "process-util.h" -#include "string-util.h" -#include "terminal-util.h" -#include "unit-name.h" -#include "util.h" -#include "virt.h" +#include "basic/alloc-util.h" +#include "basic/fd-util.h" +#include "basic/fileio.h" +#include "basic/log.h" +#include "basic/mkdir.h" +#include "basic/path-util.h" +#include "basic/process-util.h" +#include "basic/string-util.h" +#include "basic/terminal-util.h" +#include "basic/unit-name.h" +#include "basic/util.h" +#include "basic/virt.h" static const char *arg_dest = "/tmp"; diff --git a/src/systemd-gpt-auto-generator/Makefile b/src/systemd-gpt-auto-generator/Makefile index 177db8da7c..070d62ba83 100644 --- a/src/systemd-gpt-auto-generator/Makefile +++ b/src/systemd-gpt-auto-generator/Makefile @@ -40,4 +40,6 @@ systemd_gpt_auto_generator_CFLAGS = \ $(BLKID_CFLAGS) endif # HAVE_BLKID +systemd.CPPFLAGS += -DSYSTEMD_CRYPTSETUP_PATH=\"$(rootlibexecdir)/systemd-cryptsetup\" + include $(topsrcdir)/build-aux/Makefile.tail.mk diff --git a/src/systemd-gpt-auto-generator/gpt-auto-generator.c b/src/systemd-gpt-auto-generator/gpt-auto-generator.c index 73e32da751..b878d438b0 100644 --- a/src/systemd-gpt-auto-generator/gpt-auto-generator.c +++ b/src/systemd-gpt-auto-generator/gpt-auto-generator.c @@ -25,29 +25,29 @@ #include "libudev.h" #include <systemd/sd-id128.h> -#include "alloc-util.h" -#include "blkid-util.h" -#include "btrfs-util.h" -#include "dirent-util.h" -#include "efivars.h" -#include "fd-util.h" -#include "fileio.h" -#include "fstab-util.h" -#include "generator.h" -#include "gpt.h" -#include "missing.h" -#include "mkdir.h" -#include "mount-util.h" -#include "parse-util.h" -#include "path-util.h" -#include "proc-cmdline.h" -#include "special.h" -#include "stat-util.h" -#include "string-util.h" -#include "udev-util.h" -#include "unit-name.h" -#include "util.h" -#include "virt.h" +#include "basic/alloc-util.h" +#include "basic/blkid-util.h" +#include "basic/btrfs-util.h" +#include "basic/dirent-util.h" +#include "shared/efivars.h" +#include "basic/fd-util.h" +#include "basic/fileio.h" +#include "shared/fstab-util.h" +#include "shared/generator.h" +#include "shared/gpt.h" +#include "basic/missing.h" +#include "basic/mkdir.h" +#include "basic/mount-util.h" +#include "basic/parse-util.h" +#include "basic/path-util.h" +#include "basic/proc-cmdline.h" +#include "basic/special.h" +#include "basic/stat-util.h" +#include "basic/string-util.h" +#include "shared/udev-util.h" +#include "basic/unit-name.h" +#include "basic/util.h" +#include "basic/virt.h" static const char *arg_dest = "/tmp"; static bool arg_enabled = true; diff --git a/src/systemd-hibernate-resume/Makefile b/src/systemd-hibernate-resume/Makefile index 386f372f78..5a8a0b4ad1 100644 --- a/src/systemd-hibernate-resume/Makefile +++ b/src/systemd-hibernate-resume/Makefile @@ -57,4 +57,6 @@ EXTRA_DIST += \ units/systemd-hibernate-resume@.service.in \ units/systemd-hybrid-sleep.service.in +systemd.CPPFLAGS += -DSYSTEM_DATA_UNIT_PATH=\"$(systemunitdir)\" + include $(topsrcdir)/build-aux/Makefile.tail.mk diff --git a/src/systemd-hibernate-resume/hibernate-resume-generator.c b/src/systemd-hibernate-resume/hibernate-resume-generator.c index d7ee80d58f..08de7e1983 100644 --- a/src/systemd-hibernate-resume/hibernate-resume-generator.c +++ b/src/systemd-hibernate-resume/hibernate-resume-generator.c @@ -20,15 +20,15 @@ #include <errno.h> #include <stdio.h> -#include "alloc-util.h" -#include "fstab-util.h" -#include "log.h" -#include "mkdir.h" -#include "proc-cmdline.h" -#include "special.h" -#include "string-util.h" -#include "unit-name.h" -#include "util.h" +#include "basic/alloc-util.h" +#include "shared/fstab-util.h" +#include "basic/log.h" +#include "basic/mkdir.h" +#include "basic/proc-cmdline.h" +#include "basic/special.h" +#include "basic/string-util.h" +#include "basic/unit-name.h" +#include "basic/util.h" static const char *arg_dest = "/tmp"; static char *arg_resume_dev = NULL; diff --git a/src/systemd-hibernate-resume/hibernate-resume.c b/src/systemd-hibernate-resume/hibernate-resume.c index 21df3c4461..64d14bf64b 100644 --- a/src/systemd-hibernate-resume/hibernate-resume.c +++ b/src/systemd-hibernate-resume/hibernate-resume.c @@ -21,10 +21,10 @@ #include <stdio.h> #include <sys/stat.h> -#include "alloc-util.h" -#include "fileio.h" -#include "log.h" -#include "util.h" +#include "basic/alloc-util.h" +#include "basic/fileio.h" +#include "basic/log.h" +#include "basic/util.h" int main(int argc, char *argv[]) { struct stat st; diff --git a/src/systemd-hwdb/Makefile b/src/systemd-hwdb/Makefile index ce10c46e99..bf14199ffe 100644 --- a/src/systemd-hwdb/Makefile +++ b/src/systemd-hwdb/Makefile @@ -73,4 +73,6 @@ EXTRA_DIST += \ hwdb/ids-update.pl \ hwdb/sdio.ids +systemd.CPPFLAGS += -DUDEVLIBEXECDIR=\"$(udevlibexecdir)\" + include $(topsrcdir)/build-aux/Makefile.tail.mk diff --git a/src/systemd-hwdb/hwdb.c b/src/systemd-hwdb/hwdb.c index 1160dacdf1..5ec2ba6169 100644 --- a/src/systemd-hwdb/hwdb.c +++ b/src/systemd-hwdb/hwdb.c @@ -22,19 +22,19 @@ #include <stdlib.h> #include <string.h> -#include "alloc-util.h" -#include "conf-files.h" -#include "fd-util.h" -#include "fileio.h" -#include "fs-util.h" -#include "hwdb-internal.h" -#include "hwdb-util.h" -#include "mkdir.h" -#include "strbuf.h" -#include "string-util.h" -#include "strv.h" -#include "util.h" -#include "verbs.h" +#include "basic/alloc-util.h" +#include "basic/conf-files.h" +#include "basic/fd-util.h" +#include "basic/fileio.h" +#include "basic/fs-util.h" +#include "sd-hwdb/hwdb-internal.h" +#include "sd-hwdb/hwdb-util.h" +#include "basic/mkdir.h" +#include "basic/strbuf.h" +#include "basic/string-util.h" +#include "basic/strv.h" +#include "basic/util.h" +#include "basic/verbs.h" /* * Generic udev properties, key/value database based on modalias strings. diff --git a/src/systemd-initctl/initctl.c b/src/systemd-initctl/initctl.c index 05285e3846..986c463389 100644 --- a/src/systemd-initctl/initctl.c +++ b/src/systemd-initctl/initctl.c @@ -26,17 +26,17 @@ #include <systemd/sd-bus.h> #include <systemd/sd-daemon.h> -#include "alloc-util.h" -#include "bus-error.h" -#include "bus-util.h" -#include "def.h" -#include "fd-util.h" -#include "formats-util.h" -#include "initreq.h" -#include "list.h" -#include "log.h" -#include "special.h" -#include "util.h" +#include "basic/alloc-util.h" +#include "sd-bus/bus-error.h" +#include "shared/bus-util.h" +#include "basic/def.h" +#include "basic/fd-util.h" +#include "basic/formats-util.h" +#include "shared/initreq.h" +#include "basic/list.h" +#include "basic/log.h" +#include "basic/special.h" +#include "basic/util.h" #define SERVER_FD_MAX 16 #define TIMEOUT_MSEC ((int) (DEFAULT_EXIT_USEC/USEC_PER_MSEC)) diff --git a/src/systemd-machine-id-setup/machine-id-setup-main.c b/src/systemd-machine-id-setup/machine-id-setup-main.c index 1d55fa04af..aca7d01129 100644 --- a/src/systemd-machine-id-setup/machine-id-setup-main.c +++ b/src/systemd-machine-id-setup/machine-id-setup-main.c @@ -22,10 +22,10 @@ #include <stdio.h> #include <stdlib.h> -#include "log.h" +#include "basic/log.h" #include "machine-id-setup.h" -#include "path-util.h" -#include "util.h" +#include "basic/path-util.h" +#include "basic/util.h" static char *arg_root = NULL; static bool arg_commit = false; diff --git a/src/systemd-machine-id-setup/machine-id-setup.c b/src/systemd-machine-id-setup/machine-id-setup.c new file mode 120000 index 0000000000..2f0f2d8cf1 --- /dev/null +++ b/src/systemd-machine-id-setup/machine-id-setup.c @@ -0,0 +1 @@ +../libcore/machine-id-setup.c
\ No newline at end of file diff --git a/src/systemd-machine-id-setup/machine-id-setup.h b/src/systemd-machine-id-setup/machine-id-setup.h new file mode 120000 index 0000000000..6b34cb74f4 --- /dev/null +++ b/src/systemd-machine-id-setup/machine-id-setup.h @@ -0,0 +1 @@ +../libcore/machine-id-setup.h
\ No newline at end of file diff --git a/src/systemd-modules-load/modules-load.c b/src/systemd-modules-load/modules-load.c index f75015d8c3..d7ea7886c6 100644 --- a/src/systemd-modules-load/modules-load.c +++ b/src/systemd-modules-load/modules-load.c @@ -24,15 +24,15 @@ #include <string.h> #include <sys/stat.h> -#include "conf-files.h" -#include "def.h" -#include "fd-util.h" -#include "fileio.h" -#include "log.h" -#include "proc-cmdline.h" -#include "string-util.h" -#include "strv.h" -#include "util.h" +#include "basic/conf-files.h" +#include "basic/def.h" +#include "basic/fd-util.h" +#include "basic/fileio.h" +#include "basic/log.h" +#include "basic/proc-cmdline.h" +#include "basic/string-util.h" +#include "basic/strv.h" +#include "basic/util.h" static char **arg_proc_cmdline_modules = NULL; diff --git a/src/systemd-notify/notify.c b/src/systemd-notify/notify.c index b18fb5938f..4db49508b3 100644 --- a/src/systemd-notify/notify.c +++ b/src/systemd-notify/notify.c @@ -25,14 +25,14 @@ #include <systemd/sd-daemon.h> -#include "alloc-util.h" -#include "env-util.h" -#include "formats-util.h" -#include "log.h" -#include "parse-util.h" -#include "string-util.h" -#include "strv.h" -#include "util.h" +#include "basic/alloc-util.h" +#include "basic/env-util.h" +#include "basic/formats-util.h" +#include "basic/log.h" +#include "basic/parse-util.h" +#include "basic/string-util.h" +#include "basic/strv.h" +#include "basic/util.h" static bool arg_ready = false; static pid_t arg_pid = 0; diff --git a/src/systemd-nspawn/Makefile b/src/systemd-nspawn/Makefile index d6f928ebd6..8ea5967add 100644 --- a/src/systemd-nspawn/Makefile +++ b/src/systemd-nspawn/Makefile @@ -82,4 +82,6 @@ test_patch_uid_LDADD = \ manual_tests += \ test-patch-uid +systemd.CPPFLAGS += -I$(topsrcdir)/src/libudev/src + include $(topsrcdir)/build-aux/Makefile.tail.mk diff --git a/src/systemd-nspawn/loopback-setup.c b/src/systemd-nspawn/loopback-setup.c new file mode 120000 index 0000000000..1078ace0bf --- /dev/null +++ b/src/systemd-nspawn/loopback-setup.c @@ -0,0 +1 @@ +../libcore/loopback-setup.c
\ No newline at end of file diff --git a/src/systemd-nspawn/loopback-setup.h b/src/systemd-nspawn/loopback-setup.h new file mode 120000 index 0000000000..18fc7663a2 --- /dev/null +++ b/src/systemd-nspawn/loopback-setup.h @@ -0,0 +1 @@ +../libcore/loopback-setup.h
\ No newline at end of file diff --git a/src/systemd-nspawn/machine-id-setup.c b/src/systemd-nspawn/machine-id-setup.c new file mode 120000 index 0000000000..2f0f2d8cf1 --- /dev/null +++ b/src/systemd-nspawn/machine-id-setup.c @@ -0,0 +1 @@ +../libcore/machine-id-setup.c
\ No newline at end of file diff --git a/src/systemd-nspawn/machine-id-setup.h b/src/systemd-nspawn/machine-id-setup.h new file mode 120000 index 0000000000..6b34cb74f4 --- /dev/null +++ b/src/systemd-nspawn/machine-id-setup.h @@ -0,0 +1 @@ +../libcore/machine-id-setup.h
\ No newline at end of file diff --git a/src/systemd-nspawn/mount-setup.c b/src/systemd-nspawn/mount-setup.c new file mode 120000 index 0000000000..a4ab487157 --- /dev/null +++ b/src/systemd-nspawn/mount-setup.c @@ -0,0 +1 @@ +../libcore/mount-setup.c
\ No newline at end of file diff --git a/src/systemd-nspawn/mount-setup.h b/src/systemd-nspawn/mount-setup.h new file mode 120000 index 0000000000..1f984851f8 --- /dev/null +++ b/src/systemd-nspawn/mount-setup.h @@ -0,0 +1 @@ +../libcore/mount-setup.h
\ No newline at end of file diff --git a/src/systemd-nspawn/nspawn-cgroup.c b/src/systemd-nspawn/nspawn-cgroup.c index f50f1ad6c2..67c86303e5 100644 --- a/src/systemd-nspawn/nspawn-cgroup.c +++ b/src/systemd-nspawn/nspawn-cgroup.c @@ -19,15 +19,15 @@ #include <sys/mount.h> -#include "alloc-util.h" -#include "cgroup-util.h" -#include "fd-util.h" -#include "fileio.h" -#include "mkdir.h" +#include "basic/alloc-util.h" +#include "basic/cgroup-util.h" +#include "basic/fd-util.h" +#include "basic/fileio.h" +#include "basic/mkdir.h" #include "nspawn-cgroup.h" -#include "string-util.h" -#include "strv.h" -#include "util.h" +#include "basic/string-util.h" +#include "basic/strv.h" +#include "basic/util.h" int chown_cgroup(pid_t pid, uid_t uid_shift) { _cleanup_free_ char *path = NULL, *fs = NULL; diff --git a/src/systemd-nspawn/nspawn-expose-ports.c b/src/systemd-nspawn/nspawn-expose-ports.c index 8122a14f7b..4da7ef744f 100644 --- a/src/systemd-nspawn/nspawn-expose-ports.c +++ b/src/systemd-nspawn/nspawn-expose-ports.c @@ -19,17 +19,16 @@ #include <systemd/sd-netlink.h> -#include "alloc-util.h" -#include "fd-util.h" +#include "basic/alloc-util.h" +#include "basic/fd-util.h" #include "firewall-util.h" -#include "in-addr-util.h" -#include "local-addresses.h" -#include "netlink-util.h" +#include "basic/in-addr-util.h" +#include "sd-netlink/local-addresses.h" #include "nspawn-expose-ports.h" -#include "parse-util.h" -#include "socket-util.h" -#include "string-util.h" -#include "util.h" +#include "basic/parse-util.h" +#include "basic/socket-util.h" +#include "basic/string-util.h" +#include "basic/util.h" int expose_port_parse(ExposePort **l, const char *s) { diff --git a/src/systemd-nspawn/nspawn-expose-ports.h b/src/systemd-nspawn/nspawn-expose-ports.h index 0e9f8f7e88..0003b74e62 100644 --- a/src/systemd-nspawn/nspawn-expose-ports.h +++ b/src/systemd-nspawn/nspawn-expose-ports.h @@ -24,8 +24,8 @@ #include <systemd/sd-event.h> #include <systemd/sd-netlink.h> -#include "in-addr-util.h" -#include "list.h" +#include "basic/in-addr-util.h" +#include "basic/list.h" typedef struct ExposePort { int protocol; diff --git a/src/systemd-nspawn/nspawn-gperf.gperf b/src/systemd-nspawn/nspawn-gperf.gperf index 2b5d452662..f814ed8863 100644 --- a/src/systemd-nspawn/nspawn-gperf.gperf +++ b/src/systemd-nspawn/nspawn-gperf.gperf @@ -1,6 +1,6 @@ %{ #include <stddef.h> -#include "conf-parser.h" +#include "shared/conf-parser.h" #include "nspawn-settings.h" #include "nspawn-expose-ports.h" %} diff --git a/src/systemd-nspawn/nspawn-mount.c b/src/systemd-nspawn/nspawn-mount.c index 8e2d2d543c..7e8bd936f2 100644 --- a/src/systemd-nspawn/nspawn-mount.c +++ b/src/systemd-nspawn/nspawn-mount.c @@ -20,23 +20,23 @@ #include <sys/mount.h> #include <linux/magic.h> -#include "alloc-util.h" -#include "cgroup-util.h" -#include "escape.h" -#include "fs-util.h" -#include "label.h" -#include "mkdir.h" -#include "mount-util.h" +#include "basic/alloc-util.h" +#include "basic/cgroup-util.h" +#include "basic/escape.h" +#include "basic/fs-util.h" +#include "basic/label.h" +#include "basic/mkdir.h" +#include "basic/mount-util.h" #include "nspawn-mount.h" -#include "parse-util.h" -#include "path-util.h" -#include "rm-rf.h" -#include "set.h" -#include "stat-util.h" -#include "string-util.h" -#include "strv.h" -#include "user-util.h" -#include "util.h" +#include "basic/parse-util.h" +#include "basic/path-util.h" +#include "basic/rm-rf.h" +#include "basic/set.h" +#include "basic/stat-util.h" +#include "basic/string-util.h" +#include "basic/strv.h" +#include "basic/user-util.h" +#include "basic/util.h" CustomMount* custom_mount_add(CustomMount **l, unsigned *n, CustomMountType t) { CustomMount *c, *ret; diff --git a/src/systemd-nspawn/nspawn-network.c b/src/systemd-nspawn/nspawn-network.c index 7052fb5804..98bb3e386f 100644 --- a/src/systemd-nspawn/nspawn-network.c +++ b/src/systemd-nspawn/nspawn-network.c @@ -24,17 +24,16 @@ #include <systemd/sd-id128.h> #include <systemd/sd-netlink.h> -#include "alloc-util.h" -#include "ether-addr-util.h" -#include "lockfile-util.h" -#include "netlink-util.h" +#include "basic/alloc-util.h" +#include "basic/ether-addr-util.h" +#include "basic/lockfile-util.h" #include "nspawn-network.h" -#include "siphash24.h" -#include "socket-util.h" -#include "stat-util.h" -#include "string-util.h" -#include "udev-util.h" -#include "util.h" +#include "basic/siphash24.h" +#include "basic/socket-util.h" +#include "basic/stat-util.h" +#include "basic/string-util.h" +#include "shared/udev-util.h" +#include "basic/util.h" #define HOST_HASH_KEY SD_ID128_MAKE(1a,37,6f,c7,46,ec,45,0b,ad,a3,d5,31,06,60,5d,b1) #define CONTAINER_HASH_KEY SD_ID128_MAKE(c3,c4,f9,19,b5,57,b2,1c,e6,cf,14,27,03,9c,ee,a2) diff --git a/src/systemd-nspawn/nspawn-patch-uid.c b/src/systemd-nspawn/nspawn-patch-uid.c index c7382d412d..737ffd246e 100644 --- a/src/systemd-nspawn/nspawn-patch-uid.c +++ b/src/systemd-nspawn/nspawn-patch-uid.c @@ -26,16 +26,16 @@ #include <sys/vfs.h> #include <unistd.h> -#include "acl-util.h" -#include "dirent-util.h" -#include "fd-util.h" -#include "missing.h" +#include "shared/acl-util.h" +#include "basic/dirent-util.h" +#include "basic/fd-util.h" +#include "basic/missing.h" #include "nspawn-patch-uid.h" -#include "stat-util.h" -#include "stdio-util.h" -#include "string-util.h" -#include "strv.h" -#include "user-util.h" +#include "basic/stat-util.h" +#include "basic/stdio-util.h" +#include "basic/string-util.h" +#include "basic/strv.h" +#include "basic/user-util.h" #ifdef HAVE_ACL diff --git a/src/systemd-nspawn/nspawn-register.c b/src/systemd-nspawn/nspawn-register.c index adef200cb5..29e60ca48a 100644 --- a/src/systemd-nspawn/nspawn-register.c +++ b/src/systemd-nspawn/nspawn-register.c @@ -19,13 +19,13 @@ #include <systemd/sd-bus.h> -#include "bus-error.h" -#include "bus-unit-util.h" -#include "bus-util.h" +#include "sd-bus/bus-error.h" /* for bus_error_message */ +#include "shared/bus-unit-util.h" +#include "shared/bus-util.h" #include "nspawn-register.h" -#include "stat-util.h" -#include "strv.h" -#include "util.h" +#include "basic/stat-util.h" +#include "basic/strv.h" +#include "basic/util.h" int register_machine( const char *machine_name, diff --git a/src/systemd-nspawn/nspawn-settings.c b/src/systemd-nspawn/nspawn-settings.c index 5f1522cfb6..e5cc385e07 100644 --- a/src/systemd-nspawn/nspawn-settings.c +++ b/src/systemd-nspawn/nspawn-settings.c @@ -17,18 +17,18 @@ along with systemd; If not, see <http://www.gnu.org/licenses/>. ***/ -#include "alloc-util.h" -#include "cap-list.h" -#include "conf-parser.h" +#include "basic/alloc-util.h" +#include "basic/cap-list.h" +#include "shared/conf-parser.h" #include "nspawn-network.h" #include "nspawn-settings.h" -#include "parse-util.h" -#include "process-util.h" -#include "socket-util.h" -#include "string-util.h" -#include "strv.h" -#include "user-util.h" -#include "util.h" +#include "basic/parse-util.h" +#include "basic/process-util.h" +#include "basic/socket-util.h" +#include "basic/string-util.h" +#include "basic/strv.h" +#include "basic/user-util.h" +#include "basic/util.h" int settings_load(FILE *f, const char *path, Settings **ret) { _cleanup_(settings_freep) Settings *s = NULL; diff --git a/src/systemd-nspawn/nspawn-settings.h b/src/systemd-nspawn/nspawn-settings.h index 1c47e37912..0abf4c9835 100644 --- a/src/systemd-nspawn/nspawn-settings.h +++ b/src/systemd-nspawn/nspawn-settings.h @@ -21,7 +21,7 @@ #include <stdio.h> -#include "macro.h" +#include "basic/macro.h" #include "nspawn-expose-ports.h" #include "nspawn-mount.h" diff --git a/src/systemd-nspawn/nspawn-setuid.c b/src/systemd-nspawn/nspawn-setuid.c index ee15a47e93..b42c4c2456 100644 --- a/src/systemd-nspawn/nspawn-setuid.c +++ b/src/systemd-nspawn/nspawn-setuid.c @@ -21,15 +21,15 @@ #include <sys/types.h> #include <unistd.h> -#include "alloc-util.h" -#include "fd-util.h" -#include "mkdir.h" +#include "basic/alloc-util.h" +#include "basic/fd-util.h" +#include "basic/mkdir.h" #include "nspawn-setuid.h" -#include "process-util.h" -#include "signal-util.h" -#include "string-util.h" -#include "user-util.h" -#include "util.h" +#include "basic/process-util.h" +#include "basic/signal-util.h" +#include "basic/string-util.h" +#include "basic/user-util.h" +#include "basic/util.h" static int spawn_getent(const char *database, const char *key, pid_t *rpid) { int pipe_fds[2]; diff --git a/src/systemd-nspawn/nspawn-stub-pid1.c b/src/systemd-nspawn/nspawn-stub-pid1.c index 2de87e3c63..47243ee082 100644 --- a/src/systemd-nspawn/nspawn-stub-pid1.c +++ b/src/systemd-nspawn/nspawn-stub-pid1.c @@ -21,13 +21,13 @@ #include <sys/unistd.h> #include <sys/wait.h> -#include "fd-util.h" -#include "log.h" +#include "basic/fd-util.h" +#include "basic/log.h" #include "nspawn-stub-pid1.h" -#include "process-util.h" -#include "signal-util.h" -#include "time-util.h" -#include "def.h" +#include "basic/process-util.h" +#include "basic/signal-util.h" +#include "basic/time-util.h" +#include "basic/def.h" int stub_pid1(void) { enum { diff --git a/src/systemd-nspawn/nspawn.c b/src/systemd-nspawn/nspawn.c index bdf054e5c6..fc913a2363 100644 --- a/src/systemd-nspawn/nspawn.c +++ b/src/systemd-nspawn/nspawn.c @@ -46,33 +46,32 @@ #include <systemd/sd-daemon.h> #include <systemd/sd-id128.h> -#include "alloc-util.h" -#include "barrier.h" -#include "base-filesystem.h" -#include "blkid-util.h" -#include "btrfs-util.h" -#include "cap-list.h" -#include "capability-util.h" -#include "cgroup-util.h" -#include "copy.h" -#include "dev-setup.h" -#include "env-util.h" -#include "fd-util.h" -#include "fdset.h" -#include "fileio.h" -#include "formats-util.h" -#include "fs-util.h" -#include "gpt.h" -#include "hostname-util.h" -#include "log.h" +#include "basic/alloc-util.h" +#include "basic/barrier.h" +#include "shared/base-filesystem.h" +#include "basic/blkid-util.h" +#include "basic/btrfs-util.h" +#include "basic/cap-list.h" +#include "basic/capability-util.h" +#include "basic/cgroup-util.h" +#include "basic/copy.h" +#include "shared/dev-setup.h" +#include "basic/env-util.h" +#include "basic/fd-util.h" +#include "basic/fdset.h" +#include "basic/fileio.h" +#include "basic/formats-util.h" +#include "basic/fs-util.h" +#include "shared/gpt.h" +#include "basic/hostname-util.h" +#include "basic/log.h" #include "loopback-setup.h" #include "machine-id-setup.h" -#include "machine-image.h" -#include "macro.h" -#include "missing.h" -#include "mkdir.h" -#include "mount-util.h" -#include "netlink-util.h" +#include "shared/machine-image.h" +#include "basic/macro.h" +#include "basic/missing.h" +#include "basic/mkdir.h" +#include "basic/mount-util.h" #include "nspawn-cgroup.h" #include "nspawn-expose-ports.h" #include "nspawn-mount.h" @@ -82,27 +81,27 @@ #include "nspawn-settings.h" #include "nspawn-setuid.h" #include "nspawn-stub-pid1.h" -#include "parse-util.h" -#include "path-util.h" -#include "process-util.h" -#include "ptyfwd.h" -#include "random-util.h" -#include "rm-rf.h" +#include "basic/parse-util.h" +#include "basic/path-util.h" +#include "basic/process-util.h" +#include "shared/ptyfwd.h" +#include "basic/random-util.h" +#include "basic/rm-rf.h" #ifdef HAVE_SECCOMP -#include "seccomp-util.h" +#include "shared/seccomp-util.h" #endif -#include "selinux-util.h" -#include "signal-util.h" -#include "socket-util.h" -#include "stat-util.h" -#include "stdio-util.h" -#include "string-util.h" -#include "strv.h" -#include "terminal-util.h" -#include "udev-util.h" -#include "umask-util.h" -#include "user-util.h" -#include "util.h" +#include "basic/selinux-util.h" +#include "basic/signal-util.h" +#include "basic/socket-util.h" +#include "basic/stat-util.h" +#include "basic/stdio-util.h" +#include "basic/string-util.h" +#include "basic/strv.h" +#include "basic/terminal-util.h" +#include "shared/udev-util.h" +#include "basic/umask-util.h" +#include "basic/user-util.h" +#include "basic/util.h" /* Note that devpts's gid= parameter parses GIDs as signed values, hence we stay away from the upper half of the 32bit * UID range here */ diff --git a/src/systemd-nspawn/test-patch-uid.c b/src/systemd-nspawn/test-patch-uid.c index 11c5321788..8b990da220 100644 --- a/src/systemd-nspawn/test-patch-uid.c +++ b/src/systemd-nspawn/test-patch-uid.c @@ -19,10 +19,10 @@ #include <stdlib.h> -#include "log.h" +#include "basic/log.h" #include "nspawn-patch-uid.h" -#include "user-util.h" -#include "util.h" +#include "basic/user-util.h" +#include "basic/util.h" int main(int argc, char *argv[]) { uid_t shift, range; diff --git a/src/systemd-path/path.c b/src/systemd-path/path.c index 80268ed874..0856f6b323 100644 --- a/src/systemd-path/path.c +++ b/src/systemd-path/path.c @@ -24,11 +24,11 @@ #include <systemd/sd-path.h> -#include "alloc-util.h" -#include "log.h" -#include "macro.h" -#include "string-util.h" -#include "util.h" +#include "basic/alloc-util.h" +#include "basic/log.h" +#include "basic/macro.h" +#include "basic/string-util.h" +#include "basic/util.h" static const char *arg_suffix = NULL; diff --git a/src/systemd-rc-local-generator/rc-local-generator.c b/src/systemd-rc-local-generator/rc-local-generator.c index 618bbe428d..2c2fbd21e1 100644 --- a/src/systemd-rc-local-generator/rc-local-generator.c +++ b/src/systemd-rc-local-generator/rc-local-generator.c @@ -22,11 +22,11 @@ #include <stdio.h> #include <unistd.h> -#include "alloc-util.h" -#include "log.h" -#include "mkdir.h" -#include "string-util.h" -#include "util.h" +#include "basic/alloc-util.h" +#include "basic/log.h" +#include "basic/mkdir.h" +#include "basic/string-util.h" +#include "basic/util.h" #ifndef RC_LOCAL_SCRIPT_PATH_START #define RC_LOCAL_SCRIPT_PATH_START "/etc/rc.d/rc.local" diff --git a/src/systemd-remount-fs/Makefile b/src/systemd-remount-fs/Makefile index 49b10a879a..29d110625a 100644 --- a/src/systemd-remount-fs/Makefile +++ b/src/systemd-remount-fs/Makefile @@ -32,4 +32,7 @@ systemd_remount_fs_SOURCES = \ systemd_remount_fs_LDADD = \ libshared.la +systemd.CPPFLAGS += -DMOUNT_PATH=\"$(MOUNT_PATH)\" +systemd.CPPFLAGS += -DUMOUNT_PATH=\"$(UMOUNT_PATH)\" + include $(topsrcdir)/build-aux/Makefile.tail.mk diff --git a/src/systemd-remount-fs/mount-setup.c b/src/systemd-remount-fs/mount-setup.c new file mode 120000 index 0000000000..a4ab487157 --- /dev/null +++ b/src/systemd-remount-fs/mount-setup.c @@ -0,0 +1 @@ +../libcore/mount-setup.c
\ No newline at end of file diff --git a/src/systemd-remount-fs/mount-setup.h b/src/systemd-remount-fs/mount-setup.h new file mode 120000 index 0000000000..1f984851f8 --- /dev/null +++ b/src/systemd-remount-fs/mount-setup.h @@ -0,0 +1 @@ +../libcore/mount-setup.h
\ No newline at end of file diff --git a/src/systemd-remount-fs/remount-fs.c b/src/systemd-remount-fs/remount-fs.c index 6468d1eecd..7d0d9f565a 100644 --- a/src/systemd-remount-fs/remount-fs.c +++ b/src/systemd-remount-fs/remount-fs.c @@ -25,15 +25,15 @@ #include <sys/wait.h> #include <unistd.h> -#include "exit-status.h" -#include "log.h" +#include "basic/exit-status.h" +#include "basic/log.h" #include "mount-setup.h" -#include "mount-util.h" -#include "path-util.h" -#include "process-util.h" -#include "signal-util.h" -#include "strv.h" -#include "util.h" +#include "basic/mount-util.h" +#include "basic/path-util.h" +#include "basic/process-util.h" +#include "basic/signal-util.h" +#include "basic/strv.h" +#include "basic/util.h" /* Goes through /etc/fstab and remounts all API file systems, applying * options that are in /etc/fstab that systemd might not have diff --git a/src/systemd-reply-password/reply-password.c b/src/systemd-reply-password/reply-password.c index 17eab9772e..7a5cea0e1e 100644 --- a/src/systemd-reply-password/reply-password.c +++ b/src/systemd-reply-password/reply-password.c @@ -23,12 +23,12 @@ #include <sys/socket.h> #include <sys/un.h> -#include "fd-util.h" -#include "log.h" -#include "macro.h" -#include "socket-util.h" -#include "string-util.h" -#include "util.h" +#include "basic/fd-util.h" +#include "basic/log.h" +#include "basic/macro.h" +#include "basic/socket-util.h" +#include "basic/string-util.h" +#include "basic/util.h" static int send_on_socket(int fd, const char *socket_name, const void *packet, size_t size) { union sockaddr_union sa = { diff --git a/src/systemd-run/run.c b/src/systemd-run/run.c index 29b5131f70..9ff2ba8003 100644 --- a/src/systemd-run/run.c +++ b/src/systemd-run/run.c @@ -23,23 +23,23 @@ #include <systemd/sd-bus.h> #include <systemd/sd-event.h> -#include "alloc-util.h" -#include "bus-error.h" -#include "bus-unit-util.h" -#include "bus-util.h" -#include "calendarspec.h" -#include "env-util.h" -#include "fd-util.h" -#include "formats-util.h" -#include "parse-util.h" -#include "path-util.h" -#include "ptyfwd.h" -#include "signal-util.h" -#include "spawn-polkit-agent.h" -#include "strv.h" -#include "terminal-util.h" -#include "unit-name.h" -#include "user-util.h" +#include "basic/alloc-util.h" +#include "sd-bus/bus-error.h" +#include "shared/bus-unit-util.h" +#include "shared/bus-util.h" +#include "basic/calendarspec.h" +#include "basic/env-util.h" +#include "basic/fd-util.h" +#include "basic/formats-util.h" +#include "basic/parse-util.h" +#include "basic/path-util.h" +#include "shared/ptyfwd.h" +#include "basic/signal-util.h" +#include "shared/spawn-polkit-agent.h" +#include "basic/strv.h" +#include "basic/terminal-util.h" +#include "basic/unit-name.h" +#include "basic/user-util.h" static bool arg_ask_password = true; static bool arg_scope = false; diff --git a/src/systemd-shutdown/Makefile b/src/systemd-shutdown/Makefile index 72047133ce..1017422b75 100644 --- a/src/systemd-shutdown/Makefile +++ b/src/systemd-shutdown/Makefile @@ -36,4 +36,7 @@ systemd_shutdown_SOURCES = \ systemd_shutdown_LDADD = \ libshared.la +systemd.CPPFLAGS += -DSYSTEM_SHUTDOWN_PATH=\"$(systemshutdowndir)\" +systemd.CPPFLAGS += -DKEXEC=\"$(KEXEC)\" + include $(topsrcdir)/build-aux/Makefile.tail.mk diff --git a/src/systemd-shutdown/killall.c b/src/systemd-shutdown/killall.c new file mode 120000 index 0000000000..5ddb36306b --- /dev/null +++ b/src/systemd-shutdown/killall.c @@ -0,0 +1 @@ +../libcore/killall.c
\ No newline at end of file diff --git a/src/systemd-shutdown/killall.h b/src/systemd-shutdown/killall.h new file mode 120000 index 0000000000..60b334fe91 --- /dev/null +++ b/src/systemd-shutdown/killall.h @@ -0,0 +1 @@ +../libcore/killall.h
\ No newline at end of file diff --git a/src/systemd-shutdown/mount-setup.c b/src/systemd-shutdown/mount-setup.c new file mode 120000 index 0000000000..a4ab487157 --- /dev/null +++ b/src/systemd-shutdown/mount-setup.c @@ -0,0 +1 @@ +../libcore/mount-setup.c
\ No newline at end of file diff --git a/src/systemd-shutdown/mount-setup.h b/src/systemd-shutdown/mount-setup.h new file mode 120000 index 0000000000..1f984851f8 --- /dev/null +++ b/src/systemd-shutdown/mount-setup.h @@ -0,0 +1 @@ +../libcore/mount-setup.h
\ No newline at end of file diff --git a/src/systemd-shutdown/shutdown.c b/src/systemd-shutdown/shutdown.c index e14755d84e..6281d99c1d 100644 --- a/src/systemd-shutdown/shutdown.c +++ b/src/systemd-shutdown/shutdown.c @@ -29,22 +29,22 @@ #include <sys/stat.h> #include <unistd.h> -#include "alloc-util.h" -#include "cgroup-util.h" -#include "def.h" -#include "fileio.h" +#include "basic/alloc-util.h" +#include "basic/cgroup-util.h" +#include "basic/def.h" +#include "basic/fileio.h" #include "killall.h" -#include "log.h" -#include "missing.h" -#include "parse-util.h" -#include "process-util.h" -#include "string-util.h" -#include "switch-root.h" -#include "terminal-util.h" +#include "basic/log.h" +#include "basic/missing.h" +#include "basic/parse-util.h" +#include "basic/process-util.h" +#include "basic/string-util.h" +#include "shared/switch-root.h" +#include "basic/terminal-util.h" #include "umount.h" -#include "util.h" -#include "virt.h" -#include "watchdog.h" +#include "basic/util.h" +#include "basic/virt.h" +#include "shared/watchdog.h" #define FINALIZE_ATTEMPTS 50 diff --git a/src/systemd-shutdown/umount.c b/src/systemd-shutdown/umount.c index c21a2be54e..2e032fb9d6 100644 --- a/src/systemd-shutdown/umount.c +++ b/src/systemd-shutdown/umount.c @@ -27,18 +27,18 @@ #include "libudev.h" -#include "alloc-util.h" -#include "escape.h" -#include "fd-util.h" -#include "fstab-util.h" -#include "list.h" +#include "basic/alloc-util.h" +#include "basic/escape.h" +#include "basic/fd-util.h" +#include "shared/fstab-util.h" +#include "basic/list.h" #include "mount-setup.h" -#include "path-util.h" -#include "string-util.h" -#include "udev-util.h" +#include "basic/path-util.h" +#include "basic/string-util.h" +#include "shared/udev-util.h" #include "umount.h" -#include "util.h" -#include "virt.h" +#include "basic/util.h" +#include "basic/virt.h" typedef struct MountPoint { char *path; diff --git a/src/systemd-socket-proxyd/socket-proxyd.c b/src/systemd-socket-proxyd/socket-proxyd.c index ce226c4d66..59141d20aa 100644 --- a/src/systemd-socket-proxyd/socket-proxyd.c +++ b/src/systemd-socket-proxyd/socket-proxyd.c @@ -32,14 +32,14 @@ #include <systemd/sd-event.h> #include <systemd/sd-resolve.h> -#include "alloc-util.h" -#include "fd-util.h" -#include "log.h" -#include "path-util.h" -#include "set.h" -#include "socket-util.h" -#include "string-util.h" -#include "util.h" +#include "basic/alloc-util.h" +#include "basic/fd-util.h" +#include "basic/log.h" +#include "basic/path-util.h" +#include "basic/set.h" +#include "basic/socket-util.h" +#include "basic/string-util.h" +#include "basic/util.h" #define BUFFER_SIZE (256 * 1024) #define CONNECTIONS_MAX 256 diff --git a/src/systemd-stdio-bridge/stdio-bridge.c b/src/systemd-stdio-bridge/stdio-bridge.c index dce959cae3..284af3dea9 100644 --- a/src/systemd-stdio-bridge/stdio-bridge.c +++ b/src/systemd-stdio-bridge/stdio-bridge.c @@ -27,11 +27,11 @@ #include <systemd/sd-bus.h> #include <systemd/sd-daemon.h> -#include "bus-internal.h" -#include "bus-util.h" -#include "build.h" -#include "log.h" -#include "util.h" +#include "sd-bus/bus-internal.h" +#include "shared/bus-util.h" +#include "basic/build.h" +#include "basic/log.h" +#include "basic/util.h" #define DEFAULT_BUS_PATH "unix:path=/run/dbus/system_bus_socket" diff --git a/src/systemd-sysctl/sysctl.c b/src/systemd-sysctl/sysctl.c index ce7c26e7d3..132420d95d 100644 --- a/src/systemd-sysctl/sysctl.c +++ b/src/systemd-sysctl/sysctl.c @@ -25,17 +25,17 @@ #include <stdlib.h> #include <string.h> -#include "conf-files.h" -#include "def.h" -#include "fd-util.h" -#include "fileio.h" -#include "hashmap.h" -#include "log.h" -#include "path-util.h" -#include "string-util.h" -#include "strv.h" -#include "sysctl-util.h" -#include "util.h" +#include "basic/conf-files.h" +#include "basic/def.h" +#include "basic/fd-util.h" +#include "basic/fileio.h" +#include "basic/hashmap.h" +#include "basic/log.h" +#include "basic/path-util.h" +#include "basic/string-util.h" +#include "basic/strv.h" +#include "shared/sysctl-util.h" +#include "basic/util.h" static char **arg_prefixes = NULL; diff --git a/src/systemd-system-update-generator/Makefile b/src/systemd-system-update-generator/Makefile index fd44aef359..535f072fa8 100644 --- a/src/systemd-system-update-generator/Makefile +++ b/src/systemd-system-update-generator/Makefile @@ -30,4 +30,6 @@ systemd_system_update_generator_SOURCES = \ systemd_system_update_generator_LDADD = \ libshared.la +systemd.CPPFLAGS += -DSYSTEM_DATA_UNIT_PATH=\"$(systemunitdir)\" + include $(topsrcdir)/build-aux/Makefile.tail.mk diff --git a/src/systemd-system-update-generator/system-update-generator.c b/src/systemd-system-update-generator/system-update-generator.c index a3d677f068..e95ab39bb5 100644 --- a/src/systemd-system-update-generator/system-update-generator.c +++ b/src/systemd-system-update-generator/system-update-generator.c @@ -20,10 +20,10 @@ #include <errno.h> #include <unistd.h> -#include "fs-util.h" -#include "log.h" -#include "string-util.h" -#include "util.h" +#include "basic/fs-util.h" +#include "basic/log.h" +#include "basic/string-util.h" +#include "basic/util.h" /* * Implements the logic described in diff --git a/src/systemd-sysusers/sysusers.c b/src/systemd-sysusers/sysusers.c index 4377f1b910..83e526c5ff 100644 --- a/src/systemd-sysusers/sysusers.c +++ b/src/systemd-sysusers/sysusers.c @@ -24,24 +24,24 @@ #include <shadow.h> #include <utmp.h> -#include "alloc-util.h" -#include "conf-files.h" -#include "copy.h" -#include "def.h" -#include "fd-util.h" -#include "fileio-label.h" -#include "formats-util.h" -#include "hashmap.h" -#include "path-util.h" -#include "selinux-util.h" -#include "smack-util.h" -#include "specifier.h" -#include "string-util.h" -#include "strv.h" -#include "uid-range.h" -#include "user-util.h" -#include "utf8.h" -#include "util.h" +#include "basic/alloc-util.h" +#include "basic/conf-files.h" +#include "basic/copy.h" +#include "basic/def.h" +#include "basic/fd-util.h" +#include "basic/fileio-label.h" +#include "basic/formats-util.h" +#include "basic/hashmap.h" +#include "basic/path-util.h" +#include "basic/selinux-util.h" +#include "basic/smack-util.h" +#include "shared/specifier.h" +#include "basic/string-util.h" +#include "basic/strv.h" +#include "shared/uid-range.h" +#include "basic/user-util.h" +#include "basic/utf8.h" +#include "basic/util.h" typedef enum ItemType { ADD_USER = 'u', diff --git a/src/systemd-sysv-generator/sysv-generator.c b/src/systemd-sysv-generator/sysv-generator.c index fe4bbeeb75..183f93e9e7 100644 --- a/src/systemd-sysv-generator/sysv-generator.c +++ b/src/systemd-sysv-generator/sysv-generator.c @@ -23,24 +23,24 @@ #include <stdio.h> #include <unistd.h> -#include "alloc-util.h" -#include "dirent-util.h" -#include "fd-util.h" -#include "fileio.h" -#include "hashmap.h" -#include "hexdecoct.h" -#include "install.h" -#include "log.h" -#include "mkdir.h" -#include "path-lookup.h" -#include "path-util.h" -#include "set.h" -#include "special.h" -#include "stat-util.h" -#include "string-util.h" -#include "strv.h" -#include "unit-name.h" -#include "util.h" +#include "basic/alloc-util.h" +#include "basic/dirent-util.h" +#include "basic/fd-util.h" +#include "basic/fileio.h" +#include "basic/hashmap.h" +#include "basic/hexdecoct.h" +#include "shared/install.h" +#include "basic/log.h" +#include "basic/mkdir.h" +#include "shared/path-lookup.h" +#include "basic/path-util.h" +#include "basic/set.h" +#include "basic/special.h" +#include "basic/stat-util.h" +#include "basic/string-util.h" +#include "basic/strv.h" +#include "basic/unit-name.h" +#include "basic/util.h" typedef enum RunlevelType { RUNLEVEL_UP, diff --git a/src/systemd-timesyncd/Makefile b/src/systemd-timesyncd/Makefile index c9289846c4..50333d0380 100644 --- a/src/systemd-timesyncd/Makefile +++ b/src/systemd-timesyncd/Makefile @@ -61,4 +61,6 @@ EXTRA_DIST += \ units/systemd-timesyncd.service.in \ src/timesync/timesyncd.conf.in +systemd.CPPFLAGS += -DPKGSYSCONFDIR=\"$(pkgsysconfdir)\" + include $(topsrcdir)/build-aux/Makefile.tail.mk diff --git a/src/systemd-timesyncd/timesyncd-conf.c b/src/systemd-timesyncd/timesyncd-conf.c index 20c64a3354..154b8e294b 100644 --- a/src/systemd-timesyncd/timesyncd-conf.c +++ b/src/systemd-timesyncd/timesyncd-conf.c @@ -17,10 +17,10 @@ along with systemd; If not, see <http://www.gnu.org/licenses/>. ***/ -#include "alloc-util.h" -#include "def.h" -#include "extract-word.h" -#include "string-util.h" +#include "basic/alloc-util.h" +#include "basic/def.h" +#include "basic/extract-word.h" +#include "basic/string-util.h" #include "timesyncd-conf.h" #include "timesyncd-manager.h" #include "timesyncd-server.h" diff --git a/src/systemd-timesyncd/timesyncd-conf.h b/src/systemd-timesyncd/timesyncd-conf.h index cba0724b1b..1c96bd066d 100644 --- a/src/systemd-timesyncd/timesyncd-conf.h +++ b/src/systemd-timesyncd/timesyncd-conf.h @@ -19,7 +19,7 @@ along with systemd; If not, see <http://www.gnu.org/licenses/>. ***/ -#include "conf-parser.h" +#include "shared/conf-parser.h" #include "timesyncd-manager.h" const struct ConfigPerfItem* timesyncd_gperf_lookup(const char *key, unsigned length); diff --git a/src/systemd-timesyncd/timesyncd-gperf.gperf b/src/systemd-timesyncd/timesyncd-gperf.gperf index 29a2cfeef6..b8af831105 100644 --- a/src/systemd-timesyncd/timesyncd-gperf.gperf +++ b/src/systemd-timesyncd/timesyncd-gperf.gperf @@ -1,6 +1,6 @@ %{ #include <stddef.h> -#include "conf-parser.h" +#include "shared/conf-parser.h" #include "timesyncd-conf.h" %} struct ConfigPerfItem; diff --git a/src/systemd-timesyncd/timesyncd-manager.c b/src/systemd-timesyncd/timesyncd-manager.c index 6a4b52af69..8464f38fab 100644 --- a/src/systemd-timesyncd/timesyncd-manager.c +++ b/src/systemd-timesyncd/timesyncd-manager.c @@ -31,22 +31,22 @@ #include <systemd/sd-daemon.h> -#include "alloc-util.h" -#include "fd-util.h" -#include "fs-util.h" -#include "list.h" -#include "log.h" -#include "missing.h" -#include "network-util.h" -#include "ratelimit.h" -#include "socket-util.h" -#include "sparse-endian.h" -#include "string-util.h" -#include "strv.h" -#include "time-util.h" +#include "basic/alloc-util.h" +#include "basic/fd-util.h" +#include "basic/fs-util.h" +#include "basic/list.h" +#include "basic/log.h" +#include "basic/missing.h" +#include "sd-network/network-util.h" +#include "basic/ratelimit.h" +#include "basic/socket-util.h" +#include "basic/sparse-endian.h" +#include "basic/string-util.h" +#include "basic/strv.h" +#include "basic/time-util.h" #include "timesyncd-conf.h" #include "timesyncd-manager.h" -#include "util.h" +#include "basic/util.h" #ifndef ADJ_SETOFFSET #define ADJ_SETOFFSET 0x0100 /* add 'time' to current time */ diff --git a/src/systemd-timesyncd/timesyncd-manager.h b/src/systemd-timesyncd/timesyncd-manager.h index fd25647725..de6836087d 100644 --- a/src/systemd-timesyncd/timesyncd-manager.h +++ b/src/systemd-timesyncd/timesyncd-manager.h @@ -23,8 +23,8 @@ #include <systemd/sd-network.h> #include <systemd/sd-resolve.h> -#include "list.h" -#include "ratelimit.h" +#include "basic/list.h" +#include "basic/ratelimit.h" typedef struct Manager Manager; diff --git a/src/systemd-timesyncd/timesyncd-server.c b/src/systemd-timesyncd/timesyncd-server.c index 6bda86fe6e..ceeaf1b6e0 100644 --- a/src/systemd-timesyncd/timesyncd-server.c +++ b/src/systemd-timesyncd/timesyncd-server.c @@ -17,7 +17,7 @@ along with systemd; If not, see <http://www.gnu.org/licenses/>. ***/ -#include "alloc-util.h" +#include "basic/alloc-util.h" #include "timesyncd-server.h" int server_address_new( diff --git a/src/systemd-timesyncd/timesyncd-server.h b/src/systemd-timesyncd/timesyncd-server.h index 8a19e41d67..438146c8f7 100644 --- a/src/systemd-timesyncd/timesyncd-server.h +++ b/src/systemd-timesyncd/timesyncd-server.h @@ -19,8 +19,8 @@ along with systemd; If not, see <http://www.gnu.org/licenses/>. ***/ -#include "list.h" -#include "socket-util.h" +#include "basic/list.h" +#include "basic/socket-util.h" typedef struct ServerAddress ServerAddress; typedef struct ServerName ServerName; diff --git a/src/systemd-timesyncd/timesyncd.c b/src/systemd-timesyncd/timesyncd.c index 9e538a82f2..0a3a08b46c 100644 --- a/src/systemd-timesyncd/timesyncd.c +++ b/src/systemd-timesyncd/timesyncd.c @@ -20,15 +20,15 @@ #include <systemd/sd-daemon.h> #include <systemd/sd-event.h> -#include "capability-util.h" -#include "clock-util.h" -#include "fd-util.h" -#include "fs-util.h" -#include "network-util.h" -#include "signal-util.h" +#include "basic/capability-util.h" +#include "basic/clock-util.h" +#include "basic/fd-util.h" +#include "basic/fs-util.h" +#include "sd-network/network-util.h" +#include "basic/signal-util.h" #include "timesyncd-conf.h" #include "timesyncd-manager.h" -#include "user-util.h" +#include "basic/user-util.h" static int load_clock_timestamp(uid_t uid, gid_t gid) { _cleanup_close_ int fd = -1; diff --git a/src/systemd-tmpfiles/tmpfiles.c b/src/systemd-tmpfiles/tmpfiles.c index 2053d35a67..58dd7c0f8c 100644 --- a/src/systemd-tmpfiles/tmpfiles.c +++ b/src/systemd-tmpfiles/tmpfiles.c @@ -36,41 +36,41 @@ #include <time.h> #include <unistd.h> -#include "acl-util.h" -#include "alloc-util.h" -#include "btrfs-util.h" -#include "capability-util.h" -#include "chattr-util.h" -#include "conf-files.h" -#include "copy.h" -#include "def.h" -#include "escape.h" -#include "fd-util.h" -#include "fileio.h" -#include "formats-util.h" -#include "fs-util.h" -#include "glob-util.h" -#include "io-util.h" -#include "label.h" -#include "log.h" -#include "macro.h" -#include "missing.h" -#include "mkdir.h" -#include "mount-util.h" -#include "parse-util.h" -#include "path-util.h" -#include "rm-rf.h" -#include "selinux-util.h" -#include "set.h" -#include "specifier.h" -#include "stat-util.h" -#include "stdio-util.h" -#include "string-table.h" -#include "string-util.h" -#include "strv.h" -#include "umask-util.h" -#include "user-util.h" -#include "util.h" +#include "shared/acl-util.h" +#include "basic/alloc-util.h" +#include "basic/btrfs-util.h" +#include "basic/capability-util.h" +#include "basic/chattr-util.h" +#include "basic/conf-files.h" +#include "basic/copy.h" +#include "basic/def.h" +#include "basic/escape.h" +#include "basic/fd-util.h" +#include "basic/fileio.h" +#include "basic/formats-util.h" +#include "basic/fs-util.h" +#include "basic/glob-util.h" +#include "basic/io-util.h" +#include "basic/label.h" +#include "basic/log.h" +#include "basic/macro.h" +#include "basic/missing.h" +#include "basic/mkdir.h" +#include "basic/mount-util.h" +#include "basic/parse-util.h" +#include "basic/path-util.h" +#include "basic/rm-rf.h" +#include "basic/selinux-util.h" +#include "basic/set.h" +#include "shared/specifier.h" +#include "basic/stat-util.h" +#include "basic/stdio-util.h" +#include "basic/string-table.h" +#include "basic/string-util.h" +#include "basic/strv.h" +#include "basic/umask-util.h" +#include "basic/user-util.h" +#include "basic/util.h" /* This reads all files listed in /etc/tmpfiles.d/?*.conf and creates * them in the file system. This is intended to be used to create diff --git a/src/systemd-tty-ask-password-agent/tty-ask-password-agent.c b/src/systemd-tty-ask-password-agent/tty-ask-password-agent.c index ee879c7b89..b77c884c28 100644 --- a/src/systemd-tty-ask-password-agent/tty-ask-password-agent.c +++ b/src/systemd-tty-ask-password-agent/tty-ask-password-agent.c @@ -30,23 +30,23 @@ #include <sys/un.h> #include <unistd.h> -#include "alloc-util.h" -#include "ask-password-api.h" -#include "conf-parser.h" -#include "def.h" -#include "dirent-util.h" -#include "fd-util.h" -#include "io-util.h" -#include "mkdir.h" -#include "path-util.h" -#include "process-util.h" -#include "signal-util.h" -#include "socket-util.h" -#include "string-util.h" -#include "strv.h" -#include "terminal-util.h" -#include "util.h" -#include "utmp-wtmp.h" +#include "basic/alloc-util.h" +#include "shared/ask-password-api.h" +#include "shared/conf-parser.h" +#include "basic/def.h" +#include "basic/dirent-util.h" +#include "basic/fd-util.h" +#include "basic/io-util.h" +#include "basic/mkdir.h" +#include "basic/path-util.h" +#include "basic/process-util.h" +#include "basic/signal-util.h" +#include "basic/socket-util.h" +#include "basic/string-util.h" +#include "basic/strv.h" +#include "basic/terminal-util.h" +#include "basic/util.h" +#include "shared/utmp-wtmp.h" static enum { ACTION_LIST, diff --git a/src/systemd-update-done/update-done.c b/src/systemd-update-done/update-done.c index da306a4444..39d19ec048 100644 --- a/src/systemd-update-done/update-done.c +++ b/src/systemd-update-done/update-done.c @@ -17,10 +17,10 @@ along with systemd; If not, see <http://www.gnu.org/licenses/>. ***/ -#include "fd-util.h" -#include "io-util.h" -#include "selinux-util.h" -#include "util.h" +#include "basic/fd-util.h" +#include "basic/io-util.h" +#include "basic/selinux-util.h" +#include "basic/util.h" #define MESSAGE \ "This file was created by systemd-update-done. Its only \n" \ diff --git a/src/systemd-update-utmp/update-utmp.c b/src/systemd-update-utmp/update-utmp.c index fedcaef91c..69264c3a26 100644 --- a/src/systemd-update-utmp/update-utmp.c +++ b/src/systemd-update-utmp/update-utmp.c @@ -27,16 +27,16 @@ #include <systemd/sd-bus.h> -#include "alloc-util.h" -#include "bus-error.h" -#include "bus-util.h" -#include "formats-util.h" -#include "log.h" -#include "macro.h" -#include "special.h" -#include "unit-name.h" -#include "util.h" -#include "utmp-wtmp.h" +#include "basic/alloc-util.h" +#include "sd-bus/bus-error.h" +#include "shared/bus-util.h" +#include "basic/formats-util.h" +#include "basic/log.h" +#include "basic/macro.h" +#include "basic/special.h" +#include "basic/unit-name.h" +#include "basic/util.h" +#include "shared/utmp-wtmp.h" typedef struct Context { sd_bus *bus; diff --git a/src/test/test-acl-util.c b/src/test/test-acl-util.c index 430dda8e78..8672f008b8 100644 --- a/src/test/test-acl-util.c +++ b/src/test/test-acl-util.c @@ -22,11 +22,11 @@ #include <sys/stat.h> #include <unistd.h> -#include "acl-util.h" -#include "fd-util.h" -#include "fileio.h" -#include "string-util.h" -#include "user-util.h" +#include "shared/acl-util.h" +#include "basic/fd-util.h" +#include "basic/fileio.h" +#include "basic/string-util.h" +#include "basic/user-util.h" static void test_add_acls_for_user(void) { char fn[] = "/tmp/test-empty.XXXXXX"; diff --git a/src/test/test-af-list.c b/src/test/test-af-list.c index aeaa0929b1..b773de60e7 100644 --- a/src/test/test-af-list.c +++ b/src/test/test-af-list.c @@ -20,14 +20,14 @@ #include <string.h> #include <sys/socket.h> -#include "macro.h" -#include "string-util.h" -#include "util.h" +#include "basic/macro.h" +#include "basic/string-util.h" +#include "basic/util.h" static const struct af_name* lookup_af(register const char *str, register unsigned int len); #include "af-from-name.h" -#include "af-list.h" +#include "basic/af-list.h" #include "af-to-name.h" int main(int argc, const char *argv[]) { diff --git a/src/test/test-alloc-util.c b/src/test/test-alloc-util.c index cc4821eaf5..520951495d 100644 --- a/src/test/test-alloc-util.c +++ b/src/test/test-alloc-util.c @@ -17,9 +17,9 @@ along with systemd; If not, see <http://www.gnu.org/licenses/>. ***/ -#include "alloc-util.h" -#include "macro.h" -#include "util.h" +#include "basic/alloc-util.h" +#include "basic/macro.h" +#include "basic/util.h" static void test_alloca(void) { static const uint8_t zero[997] = { }; diff --git a/src/test/test-architecture.c b/src/test/test-architecture.c index f41e488d99..6373b798b0 100644 --- a/src/test/test-architecture.c +++ b/src/test/test-architecture.c @@ -17,10 +17,10 @@ along with systemd; If not, see <http://www.gnu.org/licenses/>. ***/ -#include "architecture.h" -#include "log.h" -#include "util.h" -#include "virt.h" +#include "basic/architecture.h" +#include "basic/log.h" +#include "basic/util.h" +#include "basic/virt.h" int main(int argc, char *argv[]) { int a, v; diff --git a/src/test/test-arphrd-list.c b/src/test/test-arphrd-list.c index f3989ad201..f24871398e 100644 --- a/src/test/test-arphrd-list.c +++ b/src/test/test-arphrd-list.c @@ -20,14 +20,14 @@ #include <net/if_arp.h> #include <string.h> -#include "macro.h" -#include "string-util.h" -#include "util.h" +#include "basic/macro.h" +#include "basic/string-util.h" +#include "basic/util.h" static const struct arphrd_name* lookup_arphrd(register const char *str, register unsigned int len); #include "arphrd-from-name.h" -#include "arphrd-list.h" +#include "basic/arphrd-list.h" #include "arphrd-to-name.h" int main(int argc, const char *argv[]) { diff --git a/src/test/test-ask-password-api.c b/src/test/test-ask-password-api.c index 86666597c7..b12f3c2e47 100644 --- a/src/test/test-ask-password-api.c +++ b/src/test/test-ask-password-api.c @@ -17,9 +17,9 @@ along with systemd; If not, see <http://www.gnu.org/licenses/>. ***/ -#include "alloc-util.h" -#include "ask-password-api.h" -#include "log.h" +#include "basic/alloc-util.h" +#include "shared/ask-password-api.h" +#include "basic/log.h" static void ask_password(void) { int r; diff --git a/src/test/test-async.c b/src/test/test-async.c index ada6d67c42..627768b392 100644 --- a/src/test/test-async.c +++ b/src/test/test-async.c @@ -19,10 +19,10 @@ #include <unistd.h> -#include "async.h" -#include "fileio.h" -#include "macro.h" -#include "util.h" +#include "basic/async.h" +#include "basic/fileio.h" +#include "basic/macro.h" +#include "basic/util.h" static bool test_async = false; diff --git a/src/test/test-barrier.c b/src/test/test-barrier.c index e6aa3b5cfe..1123f33f16 100644 --- a/src/test/test-barrier.c +++ b/src/test/test-barrier.c @@ -31,8 +31,8 @@ #include <sys/wait.h> #include <unistd.h> -#include "barrier.h" -#include "util.h" +#include "basic/barrier.h" +#include "basic/util.h" /* 20ms to test deadlocks; All timings use multiples of this constant as * alarm/sleep timers. If this timeout is too small for slow machines to perform diff --git a/src/test/test-bitmap.c b/src/test/test-bitmap.c index ff22117745..b18bcef9ae 100644 --- a/src/test/test-bitmap.c +++ b/src/test/test-bitmap.c @@ -17,7 +17,7 @@ along with systemd; If not, see <http://www.gnu.org/licenses/>. ***/ -#include "bitmap.h" +#include "basic/bitmap.h" int main(int argc, const char *argv[]) { _cleanup_bitmap_free_ Bitmap *b = NULL, *b2 = NULL; diff --git a/src/test/test-boot-timestamps.c b/src/test/test-boot-timestamps.c index 8e68d6510d..5ac6cd16e3 100644 --- a/src/test/test-boot-timestamps.c +++ b/src/test/test-boot-timestamps.c @@ -18,11 +18,11 @@ along with systemd; If not, see <http://www.gnu.org/licenses/>. ***/ -#include "acpi-fpdt.h" -#include "boot-timestamps.h" -#include "efivars.h" -#include "log.h" -#include "util.h" +#include "shared/acpi-fpdt.h" +#include "shared/boot-timestamps.h" +#include "shared/efivars.h" +#include "basic/log.h" +#include "basic/util.h" static int test_acpi_fpdt(void) { usec_t loader_start; diff --git a/src/test/test-btrfs.c b/src/test/test-btrfs.c index ce29d88412..eb33a3937f 100644 --- a/src/test/test-btrfs.c +++ b/src/test/test-btrfs.c @@ -19,13 +19,13 @@ #include <fcntl.h> -#include "btrfs-util.h" -#include "fd-util.h" -#include "fileio.h" -#include "log.h" -#include "parse-util.h" -#include "string-util.h" -#include "util.h" +#include "basic/btrfs-util.h" +#include "basic/fd-util.h" +#include "basic/fileio.h" +#include "basic/log.h" +#include "basic/parse-util.h" +#include "basic/string-util.h" +#include "basic/util.h" int main(int argc, char *argv[]) { BtrfsQuotaInfo quota; diff --git a/src/test/test-calendarspec.c b/src/test/test-calendarspec.c index 5a8c6cbfb6..afa9b4e362 100644 --- a/src/test/test-calendarspec.c +++ b/src/test/test-calendarspec.c @@ -19,10 +19,10 @@ #include <string.h> -#include "alloc-util.h" -#include "calendarspec.h" -#include "string-util.h" -#include "util.h" +#include "basic/alloc-util.h" +#include "basic/calendarspec.h" +#include "basic/string-util.h" +#include "basic/util.h" static void test_one(const char *input, const char *output) { CalendarSpec *c; diff --git a/src/test/test-cap-list.c b/src/test/test-cap-list.c index 4132ec56fd..6af0a45b66 100644 --- a/src/test/test-cap-list.c +++ b/src/test/test-cap-list.c @@ -19,12 +19,12 @@ #include <sys/prctl.h> -#include "alloc-util.h" -#include "cap-list.h" -#include "capability-util.h" -#include "fileio.h" -#include "parse-util.h" -#include "util.h" +#include "basic/alloc-util.h" +#include "basic/cap-list.h" +#include "basic/capability-util.h" +#include "basic/fileio.h" +#include "basic/parse-util.h" +#include "basic/util.h" /* verify the capability parser */ static void test_cap_list(void) { diff --git a/src/test/test-capability.c b/src/test/test-capability.c index 629bb63c81..07e52c2ba8 100644 --- a/src/test/test-capability.c +++ b/src/test/test-capability.c @@ -25,10 +25,10 @@ #include <sys/wait.h> #include <unistd.h> -#include "capability-util.h" -#include "fd-util.h" -#include "macro.h" -#include "util.h" +#include "basic/capability-util.h" +#include "basic/fd-util.h" +#include "basic/macro.h" +#include "basic/util.h" static uid_t test_uid = -1; static gid_t test_gid = -1; diff --git a/src/test/test-cgroup-mask.c b/src/test/test-cgroup-mask.c index a027eb0fd2..30c3ec9ae6 100644 --- a/src/test/test-cgroup-mask.c +++ b/src/test/test-cgroup-mask.c @@ -19,11 +19,11 @@ #include <stdio.h> -#include "macro.h" +#include "basic/macro.h" #include "manager.h" -#include "rm-rf.h" +#include "basic/rm-rf.h" #include "test-helper.h" -#include "tests.h" +#include "shared/tests.h" #include "unit.h" static int test_cgroup_mask(void) { diff --git a/src/test/test-cgroup-util.c b/src/test/test-cgroup-util.c index 43f8906172..0b37414bf8 100644 --- a/src/test/test-cgroup-util.c +++ b/src/test/test-cgroup-util.c @@ -17,17 +17,17 @@ along with systemd; If not, see <http://www.gnu.org/licenses/>. ***/ -#include "alloc-util.h" -#include "cgroup-util.h" -#include "dirent-util.h" -#include "fd-util.h" -#include "formats-util.h" -#include "parse-util.h" -#include "process-util.h" -#include "string-util.h" +#include "basic/alloc-util.h" +#include "basic/cgroup-util.h" +#include "basic/dirent-util.h" +#include "basic/fd-util.h" +#include "basic/formats-util.h" +#include "basic/parse-util.h" +#include "basic/process-util.h" +#include "basic/string-util.h" #include "test-helper.h" -#include "user-util.h" -#include "util.h" +#include "basic/user-util.h" +#include "basic/util.h" static void check_p_d_u(const char *path, int code, const char *result) { _cleanup_free_ char *unit = NULL; diff --git a/src/test/test-cgroup.c b/src/test/test-cgroup.c index 72c32d9c8f..970b9a5f13 100644 --- a/src/test/test-cgroup.c +++ b/src/test/test-cgroup.c @@ -20,10 +20,10 @@ #include <string.h> #include <unistd.h> -#include "cgroup-util.h" -#include "path-util.h" -#include "string-util.h" -#include "util.h" +#include "basic/cgroup-util.h" +#include "basic/path-util.h" +#include "basic/string-util.h" +#include "basic/util.h" int main(int argc, char*argv[]) { char *path; diff --git a/src/test/test-clock.c b/src/test/test-clock.c index 84f775e5bc..49dec49366 100644 --- a/src/test/test-clock.c +++ b/src/test/test-clock.c @@ -20,11 +20,11 @@ #include <unistd.h> #include <fcntl.h> -#include "clock-util.h" -#include "fd-util.h" -#include "fileio.h" -#include "log.h" -#include "macro.h" +#include "basic/clock-util.h" +#include "basic/fd-util.h" +#include "basic/fileio.h" +#include "basic/log.h" +#include "basic/macro.h" static void test_clock_is_localtime(void) { char adjtime[] = "/tmp/test-adjtime.XXXXXX"; diff --git a/src/test/test-condition.c b/src/test/test-condition.c index c4ff41dd0e..868e1dcf8d 100644 --- a/src/test/test-condition.c +++ b/src/test/test-condition.c @@ -19,18 +19,18 @@ #include <systemd/sd-id128.h> -#include "alloc-util.h" -#include "apparmor-util.h" -#include "architecture.h" -#include "audit-util.h" -#include "condition.h" -#include "hostname-util.h" -#include "ima-util.h" -#include "log.h" -#include "macro.h" -#include "selinux-util.h" -#include "smack-util.h" -#include "util.h" +#include "basic/alloc-util.h" +#include "shared/apparmor-util.h" +#include "basic/architecture.h" +#include "basic/audit-util.h" +#include "shared/condition.h" +#include "basic/hostname-util.h" +#include "shared/ima-util.h" +#include "basic/log.h" +#include "basic/macro.h" +#include "basic/selinux-util.h" +#include "basic/smack-util.h" +#include "basic/util.h" static void test_condition_test_path(void) { Condition *condition; diff --git a/src/test/test-conf-files.c b/src/test/test-conf-files.c index 03b3a9fa5c..336e980e07 100644 --- a/src/test/test-conf-files.c +++ b/src/test/test-conf-files.c @@ -20,16 +20,16 @@ #include <stdarg.h> #include <stdio.h> -#include "alloc-util.h" -#include "conf-files.h" -#include "fs-util.h" -#include "macro.h" -#include "parse-util.h" -#include "rm-rf.h" -#include "string-util.h" -#include "strv.h" -#include "user-util.h" -#include "util.h" +#include "basic/alloc-util.h" +#include "basic/conf-files.h" +#include "basic/fs-util.h" +#include "basic/macro.h" +#include "basic/parse-util.h" +#include "basic/rm-rf.h" +#include "basic/string-util.h" +#include "basic/strv.h" +#include "basic/user-util.h" +#include "basic/util.h" static void setup_test_dir(char *tmp_dir, const char *files, ...) { va_list ap; diff --git a/src/test/test-conf-parser.c b/src/test/test-conf-parser.c index be5d2611f8..5b63e60b32 100644 --- a/src/test/test-conf-parser.c +++ b/src/test/test-conf-parser.c @@ -17,12 +17,12 @@ along with systemd; If not, see <http://www.gnu.org/licenses/>. ***/ -#include "conf-parser.h" -#include "log.h" -#include "macro.h" -#include "string-util.h" -#include "strv.h" -#include "util.h" +#include "shared/conf-parser.h" +#include "basic/log.h" +#include "basic/macro.h" +#include "basic/string-util.h" +#include "basic/strv.h" +#include "basic/util.h" static void test_config_parse_path_one(const char *rvalue, const char *expected) { char *path = NULL; diff --git a/src/test/test-copy.c b/src/test/test-copy.c index 68154fc4e8..cd9def191c 100644 --- a/src/test/test-copy.c +++ b/src/test/test-copy.c @@ -19,19 +19,19 @@ #include <unistd.h> -#include "alloc-util.h" -#include "copy.h" -#include "fd-util.h" -#include "fileio.h" -#include "fs-util.h" -#include "log.h" -#include "macro.h" -#include "mkdir.h" -#include "path-util.h" -#include "rm-rf.h" -#include "string-util.h" -#include "strv.h" -#include "util.h" +#include "basic/alloc-util.h" +#include "basic/copy.h" +#include "basic/fd-util.h" +#include "basic/fileio.h" +#include "basic/fs-util.h" +#include "basic/log.h" +#include "basic/macro.h" +#include "basic/mkdir.h" +#include "basic/path-util.h" +#include "basic/rm-rf.h" +#include "basic/string-util.h" +#include "basic/strv.h" +#include "basic/util.h" static void test_copy_file(void) { _cleanup_free_ char *buf = NULL; diff --git a/src/test/test-cpu-set-util.c b/src/test/test-cpu-set-util.c index 8818d1ffb7..0558f323ea 100644 --- a/src/test/test-cpu-set-util.c +++ b/src/test/test-cpu-set-util.c @@ -17,9 +17,9 @@ along with systemd; If not, see <http://www.gnu.org/licenses/>. ***/ -#include "alloc-util.h" -#include "cpu-set-util.h" -#include "macro.h" +#include "basic/alloc-util.h" +#include "basic/cpu-set-util.h" +#include "basic/macro.h" static void test_parse_cpu_set(void) { cpu_set_t *c = NULL; diff --git a/src/test/test-daemon.c b/src/test/test-daemon.c index b2cd3c7663..98988e1e31 100644 --- a/src/test/test-daemon.c +++ b/src/test/test-daemon.c @@ -21,7 +21,7 @@ #include <systemd/sd-daemon.h> -#include "strv.h" +#include "basic/strv.h" int main(int argc, char*argv[]) { _cleanup_strv_free_ char **l = NULL; diff --git a/src/test/test-date.c b/src/test/test-date.c index 7f497bb7d5..a7a2e9087c 100644 --- a/src/test/test-date.c +++ b/src/test/test-date.c @@ -19,9 +19,9 @@ #include <string.h> -#include "alloc-util.h" -#include "string-util.h" -#include "util.h" +#include "basic/alloc-util.h" +#include "basic/string-util.h" +#include "basic/util.h" static void test_should_pass(const char *p) { usec_t t, q; diff --git a/src/test/test-device-nodes.c b/src/test/test-device-nodes.c index af75b38948..2310fbb9c3 100644 --- a/src/test/test-device-nodes.c +++ b/src/test/test-device-nodes.c @@ -19,10 +19,10 @@ #include <sys/types.h> -#include "alloc-util.h" -#include "device-nodes.h" -#include "string-util.h" -#include "util.h" +#include "basic/alloc-util.h" +#include "basic/device-nodes.h" +#include "basic/string-util.h" +#include "basic/util.h" /* helpers for test_encode_devnode_name */ static char *do_encode_string(const char *in) { diff --git a/src/test/test-dns-domain.c b/src/test/test-dns-domain.c index a9d09f59bc..6165948314 100644 --- a/src/test/test-dns-domain.c +++ b/src/test/test-dns-domain.c @@ -17,10 +17,10 @@ along with systemd; If not, see <http://www.gnu.org/licenses/>. ***/ -#include "alloc-util.h" -#include "dns-domain.h" -#include "macro.h" -#include "string-util.h" +#include "basic/alloc-util.h" +#include "shared/dns-domain.h" +#include "basic/macro.h" +#include "basic/string-util.h" static void test_dns_label_unescape_one(const char *what, const char *expect, size_t buffer_sz, int ret) { char buffer[buffer_sz]; diff --git a/src/test/test-ellipsize.c b/src/test/test-ellipsize.c index d4f09b08a5..45e95fe597 100644 --- a/src/test/test-ellipsize.c +++ b/src/test/test-ellipsize.c @@ -19,11 +19,11 @@ #include <stdio.h> -#include "alloc-util.h" -#include "def.h" -#include "string-util.h" -#include "terminal-util.h" -#include "util.h" +#include "basic/alloc-util.h" +#include "basic/def.h" +#include "basic/string-util.h" +#include "basic/terminal-util.h" +#include "basic/util.h" static void test_one(const char *p) { _cleanup_free_ char *t; diff --git a/src/test/test-engine.c b/src/test/test-engine.c index 23da10fa1a..86f8b0d335 100644 --- a/src/test/test-engine.c +++ b/src/test/test-engine.c @@ -21,11 +21,11 @@ #include <stdio.h> #include <string.h> -#include "bus-util.h" +#include "shared/bus-util.h" #include "manager.h" -#include "rm-rf.h" +#include "basic/rm-rf.h" #include "test-helper.h" -#include "tests.h" +#include "shared/tests.h" int main(int argc, char *argv[]) { _cleanup_(rm_rf_physical_and_freep) char *runtime_dir = NULL; diff --git a/src/test/test-env-util.c b/src/test/test-env-util.c index 35bb62906e..30d99fcd51 100644 --- a/src/test/test-env-util.c +++ b/src/test/test-env-util.c @@ -20,10 +20,10 @@ #include <string.h> -#include "env-util.h" -#include "string-util.h" -#include "strv.h" -#include "util.h" +#include "basic/env-util.h" +#include "basic/string-util.h" +#include "basic/strv.h" +#include "basic/util.h" static void test_strv_env_delete(void) { _cleanup_strv_free_ char **a = NULL, **b = NULL, **c = NULL, **d = NULL; diff --git a/src/test/test-escape.c b/src/test/test-escape.c index 6cbb8443fe..874647541c 100644 --- a/src/test/test-escape.c +++ b/src/test/test-escape.c @@ -17,9 +17,9 @@ along with systemd; If not, see <http://www.gnu.org/licenses/>. ***/ -#include "alloc-util.h" -#include "escape.h" -#include "macro.h" +#include "basic/alloc-util.h" +#include "basic/escape.h" +#include "basic/macro.h" static void test_cescape(void) { _cleanup_free_ char *escaped; diff --git a/src/test/test-execute.c b/src/test/test-execute.c index 77ef4e8b2a..de7b772a0d 100644 --- a/src/test/test-execute.c +++ b/src/test/test-execute.c @@ -23,16 +23,16 @@ #include <sys/prctl.h> #include <sys/types.h> -#include "fileio.h" -#include "fs-util.h" -#include "macro.h" +#include "basic/fileio.h" +#include "basic/fs-util.h" +#include "basic/macro.h" #include "manager.h" -#include "mkdir.h" -#include "path-util.h" -#include "rm-rf.h" +#include "basic/mkdir.h" +#include "basic/path-util.h" +#include "basic/rm-rf.h" #include "test-helper.h" #include "unit.h" -#include "util.h" +#include "basic/util.h" typedef void (*test_function_t)(Manager *m); diff --git a/src/test/test-extract-word.c b/src/test/test-extract-word.c index 7a23fa7b7b..3d6548b7c7 100644 --- a/src/test/test-extract-word.c +++ b/src/test/test-extract-word.c @@ -21,9 +21,9 @@ #include <stdlib.h> #include <string.h> -#include "extract-word.h" -#include "log.h" -#include "string-util.h" +#include "basic/extract-word.h" +#include "basic/log.h" +#include "basic/string-util.h" static void test_extract_first_word(void) { const char *p, *original; diff --git a/src/test/test-fd-util.c b/src/test/test-fd-util.c index 421d3bdeb3..f6c1f302c1 100644 --- a/src/test/test-fd-util.c +++ b/src/test/test-fd-util.c @@ -20,10 +20,10 @@ #include <fcntl.h> #include <unistd.h> -#include "alloc-util.h" -#include "fd-util.h" -#include "fileio.h" -#include "macro.h" +#include "basic/alloc-util.h" +#include "basic/fd-util.h" +#include "basic/fileio.h" +#include "basic/macro.h" static void test_close_many(void) { int fds[3]; diff --git a/src/test/test-fdset.c b/src/test/test-fdset.c index 282aab1246..9ad122f628 100644 --- a/src/test/test-fdset.c +++ b/src/test/test-fdset.c @@ -20,11 +20,11 @@ #include <fcntl.h> #include <unistd.h> -#include "fd-util.h" -#include "fdset.h" -#include "fileio.h" -#include "macro.h" -#include "util.h" +#include "basic/fd-util.h" +#include "basic/fdset.h" +#include "basic/fileio.h" +#include "basic/macro.h" +#include "basic/util.h" static void test_fdset_new_fill(void) { int fd = -1; diff --git a/src/test/test-fileio.c b/src/test/test-fileio.c index 79609765e0..97f4622400 100644 --- a/src/test/test-fileio.c +++ b/src/test/test-fileio.c @@ -21,18 +21,18 @@ #include <stdio.h> #include <unistd.h> -#include "alloc-util.h" +#include "basic/alloc-util.h" #include "ctype.h" -#include "def.h" -#include "env-util.h" -#include "fd-util.h" -#include "fileio.h" -#include "io-util.h" -#include "parse-util.h" -#include "process-util.h" -#include "string-util.h" -#include "strv.h" -#include "util.h" +#include "basic/def.h" +#include "basic/env-util.h" +#include "basic/fd-util.h" +#include "basic/fileio.h" +#include "basic/io-util.h" +#include "basic/parse-util.h" +#include "basic/process-util.h" +#include "basic/string-util.h" +#include "basic/strv.h" +#include "basic/util.h" static void test_parse_env_file(void) { char t[] = "/tmp/test-fileio-in-XXXXXX", diff --git a/src/test/test-firewall-util.c b/src/test/test-firewall-util.c index 77e809c5bf..895c1bb7b0 100644 --- a/src/test/test-firewall-util.c +++ b/src/test/test-firewall-util.c @@ -18,7 +18,7 @@ ***/ #include "firewall-util.h" -#include "log.h" +#include "basic/log.h" #define MAKE_IN_ADDR_UNION(a,b,c,d) (union in_addr_union) { .in.s_addr = htobe32((uint32_t) (a) << 24 | (uint32_t) (b) << 16 | (uint32_t) (c) << 8 | (uint32_t) (d))} diff --git a/src/test/test-fs-util.c b/src/test/test-fs-util.c index 6db2c2b6f1..e3e6d19d92 100644 --- a/src/test/test-fs-util.c +++ b/src/test/test-fs-util.c @@ -19,16 +19,16 @@ #include <unistd.h> -#include "alloc-util.h" -#include "fileio.h" -#include "fd-util.h" -#include "fs-util.h" -#include "macro.h" -#include "mkdir.h" -#include "rm-rf.h" -#include "string-util.h" -#include "strv.h" -#include "util.h" +#include "basic/alloc-util.h" +#include "basic/fileio.h" +#include "basic/fd-util.h" +#include "basic/fs-util.h" +#include "basic/macro.h" +#include "basic/mkdir.h" +#include "basic/rm-rf.h" +#include "basic/string-util.h" +#include "basic/strv.h" +#include "basic/util.h" static void test_unlink_noerrno(void) { char name[] = "/tmp/test-close_nointr.XXXXXX"; diff --git a/src/test/test-fstab-util.c b/src/test/test-fstab-util.c index 63a4b8c243..42c7368801 100644 --- a/src/test/test-fstab-util.c +++ b/src/test/test-fstab-util.c @@ -17,11 +17,11 @@ along with systemd; If not, see <http://www.gnu.org/licenses/>. ***/ -#include "alloc-util.h" -#include "fstab-util.h" -#include "log.h" -#include "string-util.h" -#include "util.h" +#include "basic/alloc-util.h" +#include "shared/fstab-util.h" +#include "basic/log.h" +#include "basic/string-util.h" +#include "basic/util.h" /* int fstab_filter_options(const char *opts, const char *names, diff --git a/src/test/test-glob-util.c b/src/test/test-glob-util.c index 227d4290f0..fd6dde113a 100644 --- a/src/test/test-glob-util.c +++ b/src/test/test-glob-util.c @@ -20,10 +20,10 @@ #include <fcntl.h> #include <unistd.h> -#include "alloc-util.h" -#include "fileio.h" -#include "glob-util.h" -#include "macro.h" +#include "basic/alloc-util.h" +#include "basic/fileio.h" +#include "basic/glob-util.h" +#include "basic/macro.h" static void test_glob_exists(void) { char name[] = "/tmp/test-glob_exists.XXXXXX"; diff --git a/src/test/test-hashmap-plain.c b/src/test/test-hashmap-plain.c index 1bd5c02f87..bbb24d885e 100644 --- a/src/test/test-hashmap-plain.c +++ b/src/test/test-hashmap-plain.c @@ -17,11 +17,11 @@ along with systemd; If not, see <http://www.gnu.org/licenses/>. ***/ -#include "alloc-util.h" -#include "hashmap.h" -#include "string-util.h" -#include "strv.h" -#include "util.h" +#include "basic/alloc-util.h" +#include "basic/hashmap.h" +#include "basic/string-util.h" +#include "basic/strv.h" +#include "basic/util.h" void test_hashmap_funcs(void); diff --git a/src/test/test-hashmap.c b/src/test/test-hashmap.c index 83cea360e6..c927d99079 100644 --- a/src/test/test-hashmap.c +++ b/src/test/test-hashmap.c @@ -17,8 +17,8 @@ along with systemd; If not, see <http://www.gnu.org/licenses/>. ***/ -#include "hashmap.h" -#include "util.h" +#include "basic/hashmap.h" +#include "basic/util.h" void test_hashmap_funcs(void); void test_ordered_hashmap_funcs(void); diff --git a/src/test/test-helper.h b/src/test/test-helper.h index 01068da347..0b1acde587 100644 --- a/src/test/test-helper.h +++ b/src/test/test-helper.h @@ -21,7 +21,7 @@ #include <systemd/sd-daemon.h> -#include "macro.h" +#include "basic/macro.h" #define TEST_REQ_RUNNING_SYSTEMD(x) \ if (sd_booted() > 0) { \ diff --git a/src/test/test-hexdecoct.c b/src/test/test-hexdecoct.c index 276f25d091..f56035d84a 100644 --- a/src/test/test-hexdecoct.c +++ b/src/test/test-hexdecoct.c @@ -17,10 +17,10 @@ along with systemd; If not, see <http://www.gnu.org/licenses/>. ***/ -#include "alloc-util.h" -#include "hexdecoct.h" -#include "macro.h" -#include "string-util.h" +#include "basic/alloc-util.h" +#include "basic/hexdecoct.h" +#include "basic/macro.h" +#include "basic/string-util.h" static void test_hexchar(void) { assert_se(hexchar(0xa) == 'a'); diff --git a/src/test/test-hostname-util.c b/src/test/test-hostname-util.c index 17fde9f27e..a8e598c58e 100644 --- a/src/test/test-hostname-util.c +++ b/src/test/test-hostname-util.c @@ -19,11 +19,11 @@ along with systemd; If not, see <http://www.gnu.org/licenses/>. ***/ -#include "alloc-util.h" -#include "fileio.h" -#include "hostname-util.h" -#include "string-util.h" -#include "util.h" +#include "basic/alloc-util.h" +#include "basic/fileio.h" +#include "basic/hostname-util.h" +#include "basic/string-util.h" +#include "basic/util.h" static void test_hostname_is_valid(void) { assert_se(hostname_is_valid("foobar", false)); diff --git a/src/test/test-hostname.c b/src/test/test-hostname.c index b38507df5d..28ae8b96fb 100644 --- a/src/test/test-hostname.c +++ b/src/test/test-hostname.c @@ -18,7 +18,7 @@ ***/ #include "hostname-setup.h" -#include "util.h" +#include "basic/util.h" int main(int argc, char* argv[]) { int r; diff --git a/src/test/test-id128.c b/src/test/test-id128.c index 90c4860e2a..aa41068530 100644 --- a/src/test/test-id128.c +++ b/src/test/test-id128.c @@ -22,10 +22,10 @@ #include <systemd/sd-daemon.h> #include <systemd/sd-id128.h> -#include "alloc-util.h" -#include "macro.h" -#include "string-util.h" -#include "util.h" +#include "basic/alloc-util.h" +#include "basic/macro.h" +#include "basic/string-util.h" +#include "basic/util.h" #define ID128_WALDI SD_ID128_MAKE(01, 02, 03, 04, 05, 06, 07, 08, 09, 0a, 0b, 0c, 0d, 0e, 0f, 10) #define STR_WALDI "0102030405060708090a0b0c0d0e0f10" diff --git a/src/test/test-install-root.c b/src/test/test-install-root.c index 4b9a74fca4..69eb85593b 100644 --- a/src/test/test-install-root.c +++ b/src/test/test-install-root.c @@ -17,12 +17,12 @@ along with systemd; If not, see <http://www.gnu.org/licenses/>. ***/ -#include "alloc-util.h" -#include "fileio.h" -#include "install.h" -#include "mkdir.h" -#include "rm-rf.h" -#include "string-util.h" +#include "basic/alloc-util.h" +#include "basic/fileio.h" +#include "shared/install.h" +#include "basic/mkdir.h" +#include "basic/rm-rf.h" +#include "basic/string-util.h" static void test_basic_mask_and_enable(const char *root) { const char *p; diff --git a/src/test/test-install.c b/src/test/test-install.c index 0ac85f040a..784bcfdd5f 100644 --- a/src/test/test-install.c +++ b/src/test/test-install.c @@ -20,7 +20,7 @@ #include <stdio.h> #include <string.h> -#include "install.h" +#include "shared/install.h" static void dump_changes(UnitFileChange *c, unsigned n) { unsigned i; diff --git a/src/test/test-io-util.c b/src/test/test-io-util.c index 10bd3833bc..496b58eb95 100644 --- a/src/test/test-io-util.c +++ b/src/test/test-io-util.c @@ -21,10 +21,10 @@ #include <stdlib.h> #include <unistd.h> -#include "alloc-util.h" -#include "fd-util.h" -#include "io-util.h" -#include "macro.h" +#include "basic/alloc-util.h" +#include "basic/fd-util.h" +#include "basic/io-util.h" +#include "basic/macro.h" static void test_sparse_write_one(int fd, const char *buffer, size_t n) { char check[n]; diff --git a/src/test/test-ipcrm.c b/src/test/test-ipcrm.c index c5bcaf47bb..8ca3952bf5 100644 --- a/src/test/test-ipcrm.c +++ b/src/test/test-ipcrm.c @@ -17,9 +17,9 @@ along with systemd; If not, see <http://www.gnu.org/licenses/>. ***/ -#include "clean-ipc.h" -#include "user-util.h" -#include "util.h" +#include "shared/clean-ipc.h" +#include "basic/user-util.h" +#include "basic/util.h" int main(int argc, char *argv[]) { uid_t uid; diff --git a/src/test/test-libudev.c b/src/test/test-libudev.c index e28de9b37b..40205ecb8c 100644 --- a/src/test/test-libudev.c +++ b/src/test/test-libudev.c @@ -24,12 +24,12 @@ #include "libudev.h" -#include "fd-util.h" -#include "log.h" -#include "stdio-util.h" -#include "string-util.h" -#include "udev-util.h" -#include "util.h" +#include "basic/fd-util.h" +#include "basic/log.h" +#include "basic/stdio-util.h" +#include "basic/string-util.h" +#include "shared/udev-util.h" +#include "basic/util.h" static void print_device(struct udev_device *device) { const char *str; diff --git a/src/test/test-list.c b/src/test/test-list.c index 160064d06a..ec32684d78 100644 --- a/src/test/test-list.c +++ b/src/test/test-list.c @@ -17,8 +17,8 @@ along with systemd; If not, see <http://www.gnu.org/licenses/>. ***/ -#include "list.h" -#include "util.h" +#include "basic/list.h" +#include "basic/util.h" int main(int argc, const char *argv[]) { size_t i; diff --git a/src/test/test-locale-util.c b/src/test/test-locale-util.c index 427c698d1d..702134ca46 100644 --- a/src/test/test-locale-util.c +++ b/src/test/test-locale-util.c @@ -18,9 +18,9 @@ ***/ -#include "locale-util.h" -#include "macro.h" -#include "strv.h" +#include "basic/locale-util.h" +#include "basic/macro.h" +#include "basic/strv.h" static void test_get_locales(void) { _cleanup_strv_free_ char **locales = NULL; diff --git a/src/test/test-log.c b/src/test/test-log.c index 55a2f9d23b..7a5f78a3d6 100644 --- a/src/test/test-log.c +++ b/src/test/test-log.c @@ -20,9 +20,9 @@ #include <stddef.h> #include <unistd.h> -#include "formats-util.h" -#include "log.h" -#include "util.h" +#include "basic/formats-util.h" +#include "basic/log.h" +#include "basic/util.h" int main(int argc, char* argv[]) { diff --git a/src/test/test-loopback.c b/src/test/test-loopback.c index 7b67337331..479f74862f 100644 --- a/src/test/test-loopback.c +++ b/src/test/test-loopback.c @@ -20,7 +20,7 @@ #include <stdio.h> #include <string.h> -#include "log.h" +#include "basic/log.h" #include "loopback-setup.h" int main(int argc, char* argv[]) { diff --git a/src/test/test-namespace.c b/src/test/test-namespace.c index ff9f35cecd..23992ab431 100644 --- a/src/test/test-namespace.c +++ b/src/test/test-namespace.c @@ -19,12 +19,12 @@ #include <sys/socket.h> -#include "alloc-util.h" -#include "fd-util.h" +#include "basic/alloc-util.h" +#include "basic/fd-util.h" #include "namespace.h" -#include "process-util.h" -#include "string-util.h" -#include "util.h" +#include "basic/process-util.h" +#include "basic/string-util.h" +#include "basic/util.h" static void test_tmpdir(const char *id, const char *A, const char *B) { _cleanup_free_ char *a, *b; diff --git a/src/test/test-netlink-manual.c b/src/test/test-netlink-manual.c index 57e244eb79..6540a35020 100644 --- a/src/test/test-netlink-manual.c +++ b/src/test/test-netlink-manual.c @@ -25,8 +25,8 @@ #include <systemd/sd-netlink.h> -#include "macro.h" -#include "util.h" +#include "basic/macro.h" +#include "basic/util.h" static int load_module(const char *mod_name) { struct kmod_ctx *ctx; diff --git a/src/test/test-ns.c b/src/test/test-ns.c index 9248f2987c..43cbbb69b0 100644 --- a/src/test/test-ns.c +++ b/src/test/test-ns.c @@ -20,7 +20,7 @@ #include <stdlib.h> #include <unistd.h> -#include "log.h" +#include "basic/log.h" #include "namespace.h" int main(int argc, char *argv[]) { diff --git a/src/test/test-nss.c b/src/test/test-nss.c index 55af592287..df617bc680 100644 --- a/src/test/test-nss.c +++ b/src/test/test-nss.c @@ -21,18 +21,18 @@ #include <stdlib.h> #include <net/if.h> -#include "log.h" -#include "nss-util.h" -#include "path-util.h" -#include "string-util.h" -#include "alloc-util.h" -#include "in-addr-util.h" -#include "hexdecoct.h" -#include "af-list.h" -#include "stdio-util.h" -#include "strv.h" -#include "errno-list.h" -#include "hostname-util.h" +#include "basic/log.h" +#include "basic/nss-util.h" +#include "basic/path-util.h" +#include "basic/string-util.h" +#include "basic/alloc-util.h" +#include "basic/in-addr-util.h" +#include "basic/hexdecoct.h" +#include "basic/af-list.h" +#include "basic/stdio-util.h" +#include "basic/strv.h" +#include "basic/errno-list.h" +#include "basic/hostname-util.h" #include "local-addresses.h" static const char* nss_status_to_string(enum nss_status status, char *buf, size_t buf_len) { diff --git a/src/test/test-parse-util.c b/src/test/test-parse-util.c index 7d8677e17c..423bf8a78c 100644 --- a/src/test/test-parse-util.c +++ b/src/test/test-parse-util.c @@ -21,8 +21,8 @@ #include <locale.h> #include <math.h> -#include "log.h" -#include "parse-util.h" +#include "basic/log.h" +#include "basic/parse-util.h" static void test_parse_boolean(void) { assert_se(parse_boolean("1") == 1); diff --git a/src/test/test-path-lookup.c b/src/test/test-path-lookup.c index 096326d176..41eb48d787 100644 --- a/src/test/test-path-lookup.c +++ b/src/test/test-path-lookup.c @@ -20,11 +20,11 @@ #include <stdlib.h> #include <sys/stat.h> -#include "log.h" -#include "path-lookup.h" -#include "rm-rf.h" -#include "string-util.h" -#include "strv.h" +#include "basic/log.h" +#include "shared/path-lookup.h" +#include "basic/rm-rf.h" +#include "basic/string-util.h" +#include "basic/strv.h" static void test_paths(UnitFileScope scope) { char template[] = "/tmp/test-path-lookup.XXXXXXX"; diff --git a/src/test/test-path-util.c b/src/test/test-path-util.c index b53324b5e6..8dbac28d7b 100644 --- a/src/test/test-path-util.c +++ b/src/test/test-path-util.c @@ -21,15 +21,15 @@ #include <sys/mount.h> #include <unistd.h> -#include "alloc-util.h" -#include "fd-util.h" -#include "macro.h" -#include "mount-util.h" -#include "path-util.h" -#include "rm-rf.h" -#include "string-util.h" -#include "strv.h" -#include "util.h" +#include "basic/alloc-util.h" +#include "basic/fd-util.h" +#include "basic/macro.h" +#include "basic/mount-util.h" +#include "basic/path-util.h" +#include "basic/rm-rf.h" +#include "basic/string-util.h" +#include "basic/strv.h" +#include "basic/util.h" #define test_path_compare(a, b, result) { \ assert_se(path_compare(a, b) == result); \ diff --git a/src/test/test-path.c b/src/test/test-path.c index 62181e22a0..ed87cfdb8f 100644 --- a/src/test/test-path.c +++ b/src/test/test-path.c @@ -20,19 +20,19 @@ #include <stdbool.h> #include <stdio.h> -#include "alloc-util.h" -#include "fd-util.h" -#include "fs-util.h" -#include "macro.h" +#include "basic/alloc-util.h" +#include "basic/fd-util.h" +#include "basic/fs-util.h" +#include "basic/macro.h" #include "manager.h" -#include "mkdir.h" -#include "rm-rf.h" -#include "string-util.h" -#include "strv.h" +#include "basic/mkdir.h" +#include "basic/rm-rf.h" +#include "basic/string-util.h" +#include "basic/strv.h" #include "test-helper.h" -#include "tests.h" +#include "shared/tests.h" #include "unit.h" -#include "util.h" +#include "basic/util.h" typedef void (*test_function_t)(Manager *m); diff --git a/src/test/test-prioq.c b/src/test/test-prioq.c index d81880a655..c0917d2187 100644 --- a/src/test/test-prioq.c +++ b/src/test/test-prioq.c @@ -19,11 +19,11 @@ #include <stdlib.h> -#include "alloc-util.h" -#include "prioq.h" -#include "set.h" -#include "siphash24.h" -#include "util.h" +#include "basic/alloc-util.h" +#include "basic/prioq.h" +#include "basic/set.h" +#include "basic/siphash24.h" +#include "basic/util.h" #define SET_SIZE 1024*4 diff --git a/src/test/test-proc-cmdline.c b/src/test/test-proc-cmdline.c index a7a8f621a2..e85c6bbf7d 100644 --- a/src/test/test-proc-cmdline.c +++ b/src/test/test-proc-cmdline.c @@ -17,12 +17,12 @@ along with systemd; If not, see <http://www.gnu.org/licenses/>. ***/ -#include "alloc-util.h" -#include "log.h" -#include "macro.h" -#include "proc-cmdline.h" -#include "special.h" -#include "string-util.h" +#include "basic/alloc-util.h" +#include "basic/log.h" +#include "basic/macro.h" +#include "basic/proc-cmdline.h" +#include "basic/special.h" +#include "basic/string-util.h" static int parse_item(const char *key, const char *value) { assert_se(key); diff --git a/src/test/test-process-util.c b/src/test/test-process-util.c index 4616314200..6a0a5b46c2 100644 --- a/src/test/test-process-util.c +++ b/src/test/test-process-util.c @@ -24,15 +24,15 @@ #include <sys/wait.h> #include <unistd.h> -#include "alloc-util.h" -#include "architecture.h" -#include "log.h" -#include "macro.h" -#include "process-util.h" -#include "string-util.h" -#include "terminal-util.h" -#include "util.h" -#include "virt.h" +#include "basic/alloc-util.h" +#include "basic/architecture.h" +#include "basic/log.h" +#include "basic/macro.h" +#include "basic/process-util.h" +#include "basic/string-util.h" +#include "basic/terminal-util.h" +#include "basic/util.h" +#include "basic/virt.h" static void test_get_process_comm(void) { struct stat st; diff --git a/src/test/test-ratelimit.c b/src/test/test-ratelimit.c index 990b834c79..76bd254694 100644 --- a/src/test/test-ratelimit.c +++ b/src/test/test-ratelimit.c @@ -19,9 +19,9 @@ #include <unistd.h> -#include "macro.h" -#include "ratelimit.h" -#include "time-util.h" +#include "basic/macro.h" +#include "basic/ratelimit.h" +#include "basic/time-util.h" static void test_ratelimit_test(void) { int i; diff --git a/src/test/test-replace-var.c b/src/test/test-replace-var.c index 297effce79..5dce1d81d7 100644 --- a/src/test/test-replace-var.c +++ b/src/test/test-replace-var.c @@ -19,10 +19,10 @@ #include <string.h> -#include "macro.h" -#include "replace-var.h" -#include "string-util.h" -#include "util.h" +#include "basic/macro.h" +#include "basic/replace-var.h" +#include "basic/string-util.h" +#include "basic/util.h" static char *lookup(const char *variable, void *userdata) { return strjoin("<<<", variable, ">>>", NULL); diff --git a/src/test/test-rlimit-util.c b/src/test/test-rlimit-util.c index 62afd2de5e..7a3ed8354d 100644 --- a/src/test/test-rlimit-util.c +++ b/src/test/test-rlimit-util.c @@ -17,12 +17,12 @@ #include <sys/resource.h> -#include "alloc-util.h" -#include "capability-util.h" -#include "macro.h" -#include "rlimit-util.h" -#include "string-util.h" -#include "util.h" +#include "basic/alloc-util.h" +#include "basic/capability-util.h" +#include "basic/macro.h" +#include "basic/rlimit-util.h" +#include "basic/string-util.h" +#include "basic/util.h" static void test_rlimit_parse_format(int resource, const char *string, rlim_t soft, rlim_t hard, int ret, const char *formatted) { _cleanup_free_ char *f = NULL; diff --git a/src/test/test-sched-prio.c b/src/test/test-sched-prio.c index c068f5c39e..33249fe12c 100644 --- a/src/test/test-sched-prio.c +++ b/src/test/test-sched-prio.c @@ -19,11 +19,11 @@ #include <sched.h> -#include "macro.h" +#include "basic/macro.h" #include "manager.h" -#include "rm-rf.h" +#include "basic/rm-rf.h" #include "test-helper.h" -#include "tests.h" +#include "shared/tests.h" int main(int argc, char *argv[]) { _cleanup_(rm_rf_physical_and_freep) char *runtime_dir = NULL; diff --git a/src/test/test-selinux.c b/src/test/test-selinux.c index 7545ad3764..326c24e6c4 100644 --- a/src/test/test-selinux.c +++ b/src/test/test-selinux.c @@ -19,13 +19,13 @@ #include <sys/stat.h> -#include "alloc-util.h" -#include "fd-util.h" -#include "log.h" -#include "selinux-util.h" -#include "string-util.h" -#include "time-util.h" -#include "util.h" +#include "basic/alloc-util.h" +#include "basic/fd-util.h" +#include "basic/log.h" +#include "basic/selinux-util.h" +#include "basic/string-util.h" +#include "basic/time-util.h" +#include "basic/util.h" static void test_testing(void) { bool b; diff --git a/src/test/test-set.c b/src/test/test-set.c index 0ee5ddcc9f..59f3366b44 100644 --- a/src/test/test-set.c +++ b/src/test/test-set.c @@ -17,7 +17,7 @@ along with systemd; If not, see <http://www.gnu.org/licenses/>. ***/ -#include "set.h" +#include "basic/set.h" static void test_set_steal_first(void) { _cleanup_set_free_ Set *m = NULL; diff --git a/src/test/test-sigbus.c b/src/test/test-sigbus.c index 17b81747be..ecbb0f87ea 100644 --- a/src/test/test-sigbus.c +++ b/src/test/test-sigbus.c @@ -19,9 +19,9 @@ #include <sys/mman.h> -#include "fd-util.h" -#include "sigbus.h" -#include "util.h" +#include "basic/fd-util.h" +#include "basic/sigbus.h" +#include "basic/util.h" int main(int argc, char *argv[]) { _cleanup_close_ int fd = -1; diff --git a/src/test/test-signal-util.c b/src/test/test-signal-util.c index 671eb869cb..74e34394ab 100644 --- a/src/test/test-signal-util.c +++ b/src/test/test-signal-util.c @@ -20,8 +20,8 @@ #include <signal.h> #include <unistd.h> -#include "macro.h" -#include "signal-util.h" +#include "basic/macro.h" +#include "basic/signal-util.h" static void test_block_signals(void) { sigset_t ss; diff --git a/src/test/test-siphash24.c b/src/test/test-siphash24.c index b74b7ad2dd..2c40776dd0 100644 --- a/src/test/test-siphash24.c +++ b/src/test/test-siphash24.c @@ -17,8 +17,8 @@ along with systemd; If not, see <http://www.gnu.org/licenses/>. ***/ -#include "siphash24.h" -#include "util.h" +#include "basic/siphash24.h" +#include "basic/util.h" #define ITERATIONS 10000000ULL diff --git a/src/test/test-sizeof.c b/src/test/test-sizeof.c index 8f99a13772..6869846e98 100644 --- a/src/test/test-sizeof.c +++ b/src/test/test-sizeof.c @@ -17,8 +17,8 @@ along with systemd; If not, see <http://www.gnu.org/licenses/>. ***/ -#include "log.h" -#include "time-util.h" +#include "basic/log.h" +#include "basic/time-util.h" /* Print information about various types. Useful when diagnosing * gcc diagnostics on an unfamiliar architecture. */ diff --git a/src/test/test-sleep.c b/src/test/test-sleep.c index 97b6f3015d..9260428d04 100644 --- a/src/test/test-sleep.c +++ b/src/test/test-sleep.c @@ -19,10 +19,10 @@ #include <stdio.h> -#include "log.h" -#include "sleep-config.h" -#include "strv.h" -#include "util.h" +#include "basic/log.h" +#include "shared/sleep-config.h" +#include "basic/strv.h" +#include "basic/util.h" static void test_sleep(void) { _cleanup_strv_free_ char diff --git a/src/test/test-socket-util.c b/src/test/test-socket-util.c index b480fdaa9c..c7b5384ab8 100644 --- a/src/test/test-socket-util.c +++ b/src/test/test-socket-util.c @@ -17,15 +17,15 @@ along with systemd; If not, see <http://www.gnu.org/licenses/>. ***/ -#include "alloc-util.h" -#include "async.h" -#include "fd-util.h" -#include "in-addr-util.h" -#include "log.h" -#include "macro.h" -#include "socket-util.h" -#include "string-util.h" -#include "util.h" +#include "basic/alloc-util.h" +#include "basic/async.h" +#include "basic/fd-util.h" +#include "basic/in-addr-util.h" +#include "basic/log.h" +#include "basic/macro.h" +#include "basic/socket-util.h" +#include "basic/string-util.h" +#include "basic/util.h" static void test_ifname_valid(void) { assert(ifname_valid("foo")); diff --git a/src/test/test-stat-util.c b/src/test/test-stat-util.c index a10227f823..941a38b1fb 100644 --- a/src/test/test-stat-util.c +++ b/src/test/test-stat-util.c @@ -20,11 +20,11 @@ #include <fcntl.h> #include <unistd.h> -#include "alloc-util.h" -#include "fd-util.h" -#include "fileio.h" -#include "macro.h" -#include "stat-util.h" +#include "basic/alloc-util.h" +#include "basic/fd-util.h" +#include "basic/fileio.h" +#include "basic/macro.h" +#include "basic/stat-util.h" static void test_files_same(void) { _cleanup_close_ int fd = -1; diff --git a/src/test/test-strbuf.c b/src/test/test-strbuf.c index 513218c397..74b5c03f7b 100644 --- a/src/test/test-strbuf.c +++ b/src/test/test-strbuf.c @@ -20,10 +20,10 @@ #include <stdlib.h> #include <string.h> -#include "strbuf.h" -#include "string-util.h" -#include "strv.h" -#include "util.h" +#include "basic/strbuf.h" +#include "basic/string-util.h" +#include "basic/strv.h" +#include "basic/util.h" static ssize_t add_string(struct strbuf *sb, const char *s) { return strbuf_add_string(sb, s, strlen(s)); diff --git a/src/test/test-string-util.c b/src/test/test-string-util.c index d0f84d70bc..7f867a2ced 100644 --- a/src/test/test-string-util.c +++ b/src/test/test-string-util.c @@ -17,10 +17,10 @@ along with systemd; If not, see <http://www.gnu.org/licenses/>. ***/ -#include "alloc-util.h" -#include "macro.h" -#include "string-util.h" -#include "strv.h" +#include "basic/alloc-util.h" +#include "basic/macro.h" +#include "basic/string-util.h" +#include "basic/strv.h" static void test_string_erase(void) { char *x; diff --git a/src/test/test-strip-tab-ansi.c b/src/test/test-strip-tab-ansi.c index 72b0f6fc11..a9569e527b 100644 --- a/src/test/test-strip-tab-ansi.c +++ b/src/test/test-strip-tab-ansi.c @@ -19,9 +19,9 @@ #include <stdio.h> -#include "string-util.h" -#include "terminal-util.h" -#include "util.h" +#include "basic/string-util.h" +#include "basic/terminal-util.h" +#include "basic/util.h" int main(int argc, char *argv[]) { char *p; diff --git a/src/test/test-strv.c b/src/test/test-strv.c index fc01dcfaf1..90fcb20cdd 100644 --- a/src/test/test-strv.c +++ b/src/test/test-strv.c @@ -20,11 +20,11 @@ #include <string.h> -#include "alloc-util.h" -#include "specifier.h" -#include "string-util.h" -#include "strv.h" -#include "util.h" +#include "basic/alloc-util.h" +#include "shared/specifier.h" +#include "basic/string-util.h" +#include "basic/strv.h" +#include "basic/util.h" static void test_specifier_printf(void) { static const Specifier table[] = { diff --git a/src/test/test-strxcpyx.c b/src/test/test-strxcpyx.c index 9bea770131..b5c6d5f191 100644 --- a/src/test/test-strxcpyx.c +++ b/src/test/test-strxcpyx.c @@ -19,9 +19,9 @@ #include <string.h> -#include "string-util.h" -#include "strxcpyx.h" -#include "util.h" +#include "basic/string-util.h" +#include "basic/strxcpyx.h" +#include "basic/util.h" static void test_strpcpy(void) { char target[25]; diff --git a/src/test/test-tables.c b/src/test/test-tables.c index 0be74921fc..2643a05648 100644 --- a/src/test/test-tables.c +++ b/src/test/test-tables.c @@ -17,37 +17,37 @@ along with systemd; If not, see <http://www.gnu.org/licenses/>. ***/ -#include "architecture.h" +#include "basic/architecture.h" #include "automount.h" #include "busname.h" #include "cgroup.h" #include "compress.h" -#include "condition.h" +#include "shared/condition.h" #include "device.h" #include "execute.h" -#include "install.h" +#include "shared/install.h" #include "job.h" #include "journald-server.h" #include "kill.h" #include "link-config.h" -#include "locale-util.h" -#include "log.h" -#include "logs-show.h" +#include "basic/locale-util.h" +#include "basic/log.h" +#include "shared/logs-show.h" #include "mount.h" #include "path.h" -#include "rlimit-util.h" +#include "basic/rlimit-util.h" #include "scope.h" #include "service.h" #include "slice.h" -#include "socket-util.h" +#include "basic/socket-util.h" #include "socket.h" #include "swap.h" #include "target.h" -#include "test-tables.h" +#include "shared/test-tables.h" #include "timer.h" -#include "unit-name.h" +#include "basic/unit-name.h" #include "unit.h" -#include "util.h" +#include "basic/util.h" int main(int argc, char **argv) { test_table(architecture, ARCHITECTURE); diff --git a/src/test/test-terminal-util.c b/src/test/test-terminal-util.c index 84b448a095..bcdc048196 100644 --- a/src/test/test-terminal-util.c +++ b/src/test/test-terminal-util.c @@ -21,12 +21,12 @@ #include <stdbool.h> #include <stdio.h> -#include "fd-util.h" -#include "fileio.h" -#include "log.h" -#include "macro.h" -#include "terminal-util.h" -#include "util.h" +#include "basic/fd-util.h" +#include "basic/fileio.h" +#include "basic/log.h" +#include "basic/macro.h" +#include "basic/terminal-util.h" +#include "basic/util.h" static void test_default_term_for_tty(void) { puts(default_term_for_tty("/dev/tty23")); diff --git a/src/test/test-time.c b/src/test/test-time.c index ee7d55c5ab..d6ff1f958f 100644 --- a/src/test/test-time.c +++ b/src/test/test-time.c @@ -17,8 +17,8 @@ along with systemd; If not, see <http://www.gnu.org/licenses/>. ***/ -#include "strv.h" -#include "time-util.h" +#include "basic/strv.h" +#include "basic/time-util.h" static void test_parse_sec(void) { usec_t u; diff --git a/src/test/test-tmpfiles.c b/src/test/test-tmpfiles.c index b34ebeefb2..df262e0b92 100644 --- a/src/test/test-tmpfiles.c +++ b/src/test/test-tmpfiles.c @@ -22,14 +22,14 @@ #include <stdlib.h> #include <unistd.h> -#include "alloc-util.h" -#include "fd-util.h" -#include "fileio.h" -#include "formats-util.h" -#include "fs-util.h" -#include "log.h" -#include "string-util.h" -#include "util.h" +#include "basic/alloc-util.h" +#include "basic/fd-util.h" +#include "basic/fileio.h" +#include "basic/formats-util.h" +#include "basic/fs-util.h" +#include "basic/log.h" +#include "basic/string-util.h" +#include "basic/util.h" int main(int argc, char** argv) { _cleanup_free_ char *cmd = NULL, *cmd2 = NULL, *ans = NULL, *ans2 = NULL, *d = NULL, *tmp = NULL, *line = NULL; diff --git a/src/test/test-udev.c b/src/test/test-udev.c index e965b4494a..1f6dc878c8 100644 --- a/src/test/test-udev.c +++ b/src/test/test-udev.c @@ -26,13 +26,13 @@ #include <sys/signalfd.h> #include <unistd.h> -#include "fs-util.h" -#include "log.h" -#include "missing.h" -#include "selinux-util.h" -#include "signal-util.h" -#include "string-util.h" -#include "udev-util.h" +#include "basic/fs-util.h" +#include "basic/log.h" +#include "basic/missing.h" +#include "basic/selinux-util.h" +#include "basic/signal-util.h" +#include "basic/string-util.h" +#include "shared/udev-util.h" #include "udev.h" static int fake_filesystems(void) { diff --git a/src/test/test-uid-range.c b/src/test/test-uid-range.c index 41f06a5cec..50da66bde1 100644 --- a/src/test/test-uid-range.c +++ b/src/test/test-uid-range.c @@ -19,10 +19,10 @@ #include <stddef.h> -#include "alloc-util.h" -#include "uid-range.h" -#include "user-util.h" -#include "util.h" +#include "basic/alloc-util.h" +#include "shared/uid-range.h" +#include "basic/user-util.h" +#include "basic/util.h" int main(int argc, char *argv[]) { _cleanup_free_ UidRange *p = NULL; diff --git a/src/test/test-unaligned.c b/src/test/test-unaligned.c index b18b3fca0e..82151638d2 100644 --- a/src/test/test-unaligned.c +++ b/src/test/test-unaligned.c @@ -17,9 +17,9 @@ along with systemd; If not, see <http://www.gnu.org/licenses/>. ***/ -#include "sparse-endian.h" -#include "unaligned.h" -#include "util.h" +#include "basic/sparse-endian.h" +#include "basic/unaligned.h" +#include "basic/util.h" static uint8_t data[] = { 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, diff --git a/src/test/test-unit-file.c b/src/test/test-unit-file.c index ade0ff2a63..09481364b9 100644 --- a/src/test/test-unit-file.c +++ b/src/test/test-unit-file.c @@ -25,24 +25,24 @@ #include <sys/capability.h> #include <unistd.h> -#include "alloc-util.h" -#include "capability-util.h" -#include "fd-util.h" -#include "fileio.h" -#include "hashmap.h" -#include "hostname-util.h" -#include "install-printf.h" -#include "install.h" +#include "basic/alloc-util.h" +#include "basic/capability-util.h" +#include "basic/fd-util.h" +#include "basic/fileio.h" +#include "basic/hashmap.h" +#include "basic/hostname-util.h" +#include "shared/install-printf.h" +#include "shared/install.h" #include "load-fragment.h" -#include "macro.h" -#include "rm-rf.h" -#include "specifier.h" -#include "string-util.h" -#include "strv.h" +#include "basic/macro.h" +#include "basic/rm-rf.h" +#include "shared/specifier.h" +#include "basic/string-util.h" +#include "basic/strv.h" #include "test-helper.h" -#include "tests.h" -#include "user-util.h" -#include "util.h" +#include "shared/tests.h" +#include "basic/user-util.h" +#include "basic/util.h" static int test_unit_file_get_set(void) { int r; diff --git a/src/test/test-unit-name.c b/src/test/test-unit-name.c index 2fd83f321c..b4c91cfa6c 100644 --- a/src/test/test-unit-name.c +++ b/src/test/test-unit-name.c @@ -24,20 +24,20 @@ #include <stdlib.h> #include <string.h> -#include "alloc-util.h" -#include "glob-util.h" -#include "hostname-util.h" -#include "macro.h" +#include "basic/alloc-util.h" +#include "basic/glob-util.h" +#include "basic/hostname-util.h" +#include "basic/macro.h" #include "manager.h" -#include "path-util.h" -#include "specifier.h" -#include "string-util.h" +#include "basic/path-util.h" +#include "shared/specifier.h" +#include "basic/string-util.h" #include "test-helper.h" -#include "unit-name.h" +#include "basic/unit-name.h" #include "unit-printf.h" #include "unit.h" -#include "user-util.h" -#include "util.h" +#include "basic/user-util.h" +#include "basic/util.h" static void test_unit_name_is_valid(void) { assert_se(unit_name_is_valid("foo.service", UNIT_NAME_ANY)); diff --git a/src/test/test-user-util.c b/src/test/test-user-util.c index 8d1ec19f17..8460396b2c 100644 --- a/src/test/test-user-util.c +++ b/src/test/test-user-util.c @@ -17,11 +17,11 @@ along with systemd; If not, see <http://www.gnu.org/licenses/>. ***/ -#include "alloc-util.h" -#include "macro.h" -#include "string-util.h" -#include "user-util.h" -#include "util.h" +#include "basic/alloc-util.h" +#include "basic/macro.h" +#include "basic/string-util.h" +#include "basic/user-util.h" +#include "basic/util.h" static void test_uid_to_name_one(uid_t uid, const char *name) { _cleanup_free_ char *t = NULL; diff --git a/src/test/test-utf8.c b/src/test/test-utf8.c index 1ce5a5a24d..e6cfdac8ed 100644 --- a/src/test/test-utf8.c +++ b/src/test/test-utf8.c @@ -17,10 +17,10 @@ along with systemd; If not, see <http://www.gnu.org/licenses/>. ***/ -#include "alloc-util.h" -#include "string-util.h" -#include "utf8.h" -#include "util.h" +#include "basic/alloc-util.h" +#include "basic/string-util.h" +#include "basic/utf8.h" +#include "basic/util.h" static void test_utf8_is_printable(void) { assert_se(utf8_is_printable("ascii is valid\tunicode", 22)); diff --git a/src/test/test-util.c b/src/test/test-util.c index 05cb1eae76..13f6b2f953 100644 --- a/src/test/test-util.c +++ b/src/test/test-util.c @@ -23,12 +23,12 @@ #include <sys/wait.h> #include <unistd.h> -#include "def.h" -#include "fileio.h" -#include "fs-util.h" -#include "rm-rf.h" -#include "string-util.h" -#include "util.h" +#include "basic/def.h" +#include "basic/fileio.h" +#include "basic/fs-util.h" +#include "basic/rm-rf.h" +#include "basic/string-util.h" +#include "basic/util.h" static void test_align_power2(void) { unsigned long i, p2; diff --git a/src/test/test-verbs.c b/src/test/test-verbs.c index 0fcdd9e78d..01a0ded37b 100644 --- a/src/test/test-verbs.c +++ b/src/test/test-verbs.c @@ -17,9 +17,9 @@ along with systemd; If not, see <http://www.gnu.org/licenses/>. ***/ -#include "macro.h" -#include "strv.h" -#include "verbs.h" +#include "basic/macro.h" +#include "basic/strv.h" +#include "basic/verbs.h" static int noop_dispatcher(int argc, char *argv[], void *userdata) { return 0; diff --git a/src/test/test-watchdog.c b/src/test/test-watchdog.c index e3c19647fc..64814fc174 100644 --- a/src/test/test-watchdog.c +++ b/src/test/test-watchdog.c @@ -19,8 +19,8 @@ #include <unistd.h> -#include "log.h" -#include "watchdog.h" +#include "basic/log.h" +#include "shared/watchdog.h" int main(int argc, char *argv[]) { usec_t t = 10 * USEC_PER_SEC; diff --git a/src/test/test-web-util.c b/src/test/test-web-util.c index 79a3a13af6..4907a5544c 100644 --- a/src/test/test-web-util.c +++ b/src/test/test-web-util.c @@ -17,8 +17,8 @@ along with systemd; If not, see <http://www.gnu.org/licenses/>. ***/ -#include "macro.h" -#include "web-util.h" +#include "basic/macro.h" +#include "basic/web-util.h" static void test_is_valid_documentation_url(void) { assert_se(documentation_url_is_valid("http://www.freedesktop.org/wiki/Software/systemd")); diff --git a/src/test/test-xattr-util.c b/src/test/test-xattr-util.c index 267f29426c..1a78e54d3c 100644 --- a/src/test/test-xattr-util.c +++ b/src/test/test-xattr-util.c @@ -23,12 +23,12 @@ #include <sys/xattr.h> #include <unistd.h> -#include "alloc-util.h" -#include "fd-util.h" -#include "fs-util.h" -#include "macro.h" -#include "string-util.h" -#include "xattr-util.h" +#include "basic/alloc-util.h" +#include "basic/fd-util.h" +#include "basic/fs-util.h" +#include "basic/macro.h" +#include "basic/string-util.h" +#include "basic/xattr-util.h" static void test_fgetxattrat_fake(void) { char t[] = "/var/tmp/xattrtestXXXXXX"; diff --git a/src/test/test-xml.c b/src/test/test-xml.c index b0b72fa78a..22e92b2075 100644 --- a/src/test/test-xml.c +++ b/src/test/test-xml.c @@ -19,10 +19,10 @@ #include <stdarg.h> -#include "alloc-util.h" -#include "string-util.h" -#include "util.h" -#include "xml.h" +#include "basic/alloc-util.h" +#include "basic/string-util.h" +#include "basic/util.h" +#include "basic/xml.h" static void test_one(const char *data, ...) { void *state = NULL; |