diff options
Diffstat (limited to 'src')
58 files changed, 642 insertions, 615 deletions
diff --git a/src/grp-boot/systemd-boot/measure.c b/src/grp-boot/systemd-boot/measure.c index 63f8280107..05adf41778 100644 --- a/src/grp-boot/systemd-boot/measure.c +++ b/src/grp-boot/systemd-boot/measure.c @@ -160,7 +160,6 @@ typedef EFI_STATUS(EFIAPI * EFI_TCG2_SUBMIT_COMMAND) (IN EFI_TCG2_PROTOCOL * Thi IN UINT32 OutputParameterBlockSize, IN UINT8 * OutputParameterBlock); typedef EFI_STATUS(EFIAPI * EFI_TCG2_GET_ACTIVE_PCR_BANKS) (IN EFI_TCG2_PROTOCOL * This, OUT UINT32 * ActivePcrBanks); - typedef EFI_STATUS(EFIAPI * EFI_TCG2_SET_ACTIVE_PCR_BANKS) (IN EFI_TCG2_PROTOCOL * This, IN UINT32 ActivePcrBanks); typedef EFI_STATUS(EFIAPI * EFI_TCG2_GET_RESULT_OF_SET_ACTIVE_PCR_BANKS) (IN EFI_TCG2_PROTOCOL * This, diff --git a/src/grp-coredump/systemd-coredump/coredump.c b/src/grp-coredump/systemd-coredump/coredump.c index 999de63900..b1da8eaba4 100644 --- a/src/grp-coredump/systemd-coredump/coredump.c +++ b/src/grp-coredump/systemd-coredump/coredump.c @@ -28,39 +28,40 @@ #include <elfutils/libdwfl.h> #endif -#include "sd-journal.h" -#include "sd-login.h" -#include "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 "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 <systemd/sd-daemon.h> +#include <systemd/sd-journal.h> +#include <systemd/sd-login.h> + +#include "basic/alloc-util.h" +#include "basic/capability-util.h" +#include "basic/cgroup-util.h" +#include "basic/copy.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 "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 "basic/string-table.h" +#include "basic/string-util.h" +#include "basic/strv.h" +#include "basic/user-util.h" +#include "basic/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 "sd-journal/compress.h" +#include "shared/acl-util.h" +#include "shared/conf-parser.h" + +#include "coredump-vacuum.h" #include "stacktrace.h" -#include "string-table.h" -#include "string-util.h" -#include "strv.h" -#include "user-util.h" -#include "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-initprogs/systemd-update-utmp/update-utmp.c b/src/grp-initprogs/systemd-update-utmp/update-utmp.c index 8ae4a8a833..cceb34f60d 100644 --- a/src/grp-initprogs/systemd-update-utmp/update-utmp.c +++ b/src/grp-initprogs/systemd-update-utmp/update-utmp.c @@ -25,18 +25,18 @@ #include <libaudit.h> #endif -#include "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 <systemd/sd-bus.h> + +#include "basic/alloc-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 "sd-bus/bus-error.h" +#include "shared/bus-util.h" +#include "shared/utmp-wtmp.h" typedef struct Context { sd_bus *bus; diff --git a/src/grp-journal/grp-remote/microhttpd-util.c b/src/grp-journal/grp-remote/microhttpd-util.c index c65c43186f..328e3b5a52 100644 --- a/src/grp-journal/grp-remote/microhttpd-util.c +++ b/src/grp-journal/grp-remote/microhttpd-util.c @@ -27,13 +27,14 @@ #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 "basic/string-util.h" +#include "basic/strv.h" +#include "basic/util.h" + #include "microhttpd-util.h" -#include "string-util.h" -#include "strv.h" -#include "util.h" void microhttpd_logger(void *arg, const char *fmt, va_list ap) { char *f; diff --git a/src/grp-journal/grp-remote/systemd-journal-gatewayd/journal-gatewayd.c b/src/grp-journal/grp-remote/systemd-journal-gatewayd/journal-gatewayd.c index e265027a04..76b241a14b 100644 --- a/src/grp-journal/grp-remote/systemd-journal-gatewayd/journal-gatewayd.c +++ b/src/grp-journal/grp-remote/systemd-journal-gatewayd/journal-gatewayd.c @@ -27,21 +27,21 @@ #include <string.h> #include <unistd.h> -#include "sd-bus.h" -#include "sd-daemon.h" -#include "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 <systemd/sd-bus.h> +#include <systemd/sd-daemon.h> +#include <systemd/sd-journal.h> + +#include "basic/alloc-util.h" +#include "basic/fd-util.h" +#include "basic/fileio.h" +#include "basic/hostname-util.h" +#include "basic/log.h" +#include "basic/parse-util.h" +#include "basic/sigbus.h" +#include "basic/util.h" #include "microhttpd-util.h" -#include "parse-util.h" -#include "sigbus.h" -#include "util.h" +#include "shared/bus-util.h" +#include "shared/logs-show.h" #define JOURNAL_WAIT_TIMEOUT (10*USEC_PER_SEC) diff --git a/src/grp-journal/grp-remote/systemd-journal-remote/journal-remote.c b/src/grp-journal/grp-remote/systemd-journal-remote/journal-remote.c index 35a1e55f9e..ac1ba30310 100644 --- a/src/grp-journal/grp-remote/systemd-journal-remote/journal-remote.c +++ b/src/grp-journal/grp-remote/systemd-journal-remote/journal-remote.c @@ -31,27 +31,28 @@ #include <gnutls/gnutls.h> #endif -#include "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 "journal-file.h" +#include <systemd/sd-daemon.h> + +#include "basic/alloc-util.h" +#include "basic/def.h" +#include "basic/escape.h" +#include "basic/fd-util.h" +#include "basic/fileio.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" +#include "journald-native.h" +#include "sd-journal/journal-file.h" +#include "shared/conf-parser.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" #define REMOTE_JOURNAL_PATH "/var/log/journal/remote" diff --git a/src/grp-journal/libjournal-core/journald-server.c b/src/grp-journal/libjournal-core/journald-server.c index 8f82d2a838..8bc2e55709 100644 --- a/src/grp-journal/libjournal-core/journald-server.c +++ b/src/grp-journal/libjournal-core/journald-server.c @@ -24,31 +24,47 @@ #include <sys/mman.h> #include <sys/signalfd.h> #include <sys/statvfs.h> + #include <linux/sockios.h> -#include "libudev.h" -#include "sd-daemon.h" -#include "sd-journal.h" -#include "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 "journal-authenticate.h" -#include "journal-file.h" -#include "journal-internal.h" -#include "journal-vacuum.h" +#include <libudev.h> +#include <systemd/sd-daemon.h> +#include <systemd/sd-journal.h> +#include <systemd/sd-messages.h> + +#include "basic/alloc-util.h" +#include "basic/audit-util.h" +#include "basic/cgroup-util.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 "basic/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 "sd-journal/journal-authenticate.h" +#include "sd-journal/journal-file.h" +#include "sd-journal/journal-internal.h" +#include "sd-journal/journal-vacuum.h" +#include "shared/acl-util.h" +#include "shared/conf-parser.h" + #include "journald-audit.h" #include "journald-kmsg.h" #include "journald-native.h" @@ -56,20 +72,6 @@ #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" #define USER_JOURNALS_MAX 1024 diff --git a/src/grp-journal/libjournal-core/journald-stream.c b/src/grp-journal/libjournal-core/journald-stream.c index 4ad16ee41c..e90dfac1cd 100644 --- a/src/grp-journal/libjournal-core/journald-stream.c +++ b/src/grp-journal/libjournal-core/journald-stream.c @@ -24,28 +24,29 @@ #include <selinux/selinux.h> #endif -#include "sd-daemon.h" -#include "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 <systemd/sd-daemon.h> +#include <systemd/sd-event.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 "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" + #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" #define STDOUT_STREAMS_MAX 4096 diff --git a/src/grp-journal/libjournal-core/test-compress.c b/src/grp-journal/libjournal-core/test-compress.c index 68c9a4d76c..5682c28e8c 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 "compress.h" -#include "fd-util.h" -#include "fileio.h" -#include "macro.h" -#include "random-util.h" -#include "util.h" +#include "basic/alloc-util.h" +#include "basic/fd-util.h" +#include "basic/fileio.h" +#include "basic/macro.h" +#include "basic/random-util.h" +#include "basic/util.h" +#include "sd-journal/compress.h" #ifdef HAVE_XZ # define XZ_OK 0 diff --git a/src/grp-locale/systemd-localed/localed.c b/src/grp-locale/systemd-localed/localed.c index 3b22a582ac..a876cd0718 100644 --- a/src/grp-locale/systemd-localed/localed.c +++ b/src/grp-locale/systemd-localed/localed.c @@ -23,28 +23,28 @@ #include <unistd.h> #ifdef HAVE_XKBCOMMON -#include <xkbcommon/xkbcommon.h> #include <dlfcn.h> +#include <xkbcommon/xkbcommon.h> #endif -#include "sd-bus.h" - -#include "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 <systemd/sd-bus.h> + +#include "basic/alloc-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" +#include "sd-bus/bus-error.h" +#include "sd-bus/bus-message.h" +#include "shared/bus-util.h" enum { /* We don't list LC_ALL here on purpose. People should be diff --git a/src/grp-machine/grp-import/systemd-export/export-raw.c b/src/grp-machine/grp-import/systemd-export/export-raw.c index db06e11b87..c17fc952d3 100644 --- a/src/grp-machine/grp-import/systemd-export/export-raw.c +++ b/src/grp-machine/grp-import/systemd-export/export-raw.c @@ -25,18 +25,19 @@ #include <libgen.h> #undef basename -#include "sd-daemon.h" +#include <systemd/sd-daemon.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/ratelimit.h" +#include "basic/string-util.h" +#include "basic/util.h" +#include "import-common.h" -#include "alloc-util.h" -#include "btrfs-util.h" -#include "copy.h" #include "export-raw.h" -#include "fd-util.h" -#include "fileio.h" -#include "import-common.h" -#include "ratelimit.h" -#include "string-util.h" -#include "util.h" #define COPY_BUFFER_SIZE (16*1024) diff --git a/src/grp-machine/systemd-machined/machine-dbus.c b/src/grp-machine/systemd-machined/machine-dbus.c index 7b9aa66d63..95f2084455 100644 --- a/src/grp-machine/systemd-machined/machine-dbus.c +++ b/src/grp-machine/systemd-machined/machine-dbus.c @@ -28,28 +28,29 @@ #include <libgen.h> #undef basename -#include "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 "local-addresses.h" +#include "basic/alloc-util.h" +#include "basic/bus-label.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 "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" +#include "sd-bus/bus-common-errors.h" +#include "sd-bus/bus-internal.h" +#include "sd-netlink/local-addresses.h" +#include "shared/bus-util.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" static int property_get_id( sd_bus *bus, diff --git a/src/grp-resolve/libbasic-dns/resolved-dns-dnssec.c b/src/grp-resolve/libbasic-dns/resolved-dns-dnssec.c index a54aed3a63..7d58edcdfa 100644 --- a/src/grp-resolve/libbasic-dns/resolved-dns-dnssec.c +++ b/src/grp-resolve/libbasic-dns/resolved-dns-dnssec.c @@ -21,13 +21,14 @@ #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 "basic/hexdecoct.h" +#include "basic/string-table.h" +#include "shared/dns-domain.h" +#include "shared/gcrypt-util.h" + #include "resolved-dns-dnssec.h" #include "resolved-dns-packet.h" -#include "string-table.h" #define VERIFY_RRS_MAX 256 #define MAX_KEY_SIZE (32*1024) diff --git a/src/grp-resolve/systemd-resolved/resolved-dns-transaction.h b/src/grp-resolve/systemd-resolved/resolved-dns-transaction.h index eaece91533..6802d00514 100644 --- a/src/grp-resolve/systemd-resolved/resolved-dns-transaction.h +++ b/src/grp-resolve/systemd-resolved/resolved-dns-transaction.h @@ -58,6 +58,7 @@ enum DnsTransactionSource { #include "resolved-dns-answer.h" #include "resolved-dns-packet.h" #include "resolved-dns-question.h" + #include "resolved-dns-scope.h" struct DnsTransaction { diff --git a/src/grp-resolve/systemd-resolved/resolved-dns-zone.h b/src/grp-resolve/systemd-resolved/resolved-dns-zone.h index baddbc78ec..0c43bf2b96 100644 --- a/src/grp-resolve/systemd-resolved/resolved-dns-zone.h +++ b/src/grp-resolve/systemd-resolved/resolved-dns-zone.h @@ -26,12 +26,13 @@ typedef struct DnsZone { Hashmap *by_name; } DnsZone; -typedef struct DnsZoneItem DnsZoneItem; -typedef enum DnsZoneItemState DnsZoneItemState; - #include "resolved-dns-answer.h" #include "resolved-dns-question.h" #include "resolved-dns-rr.h" + +typedef enum DnsZoneItemState DnsZoneItemState; +typedef struct DnsZoneItem DnsZoneItem; + #include "resolved-dns-transaction.h" /* RFC 4795 Section 2.8. suggests a TTL of 30s by default */ diff --git a/src/grp-system/libcore/audit-fd.c b/src/grp-system/libcore/audit-fd.c index 76afe3fe15..8ea525eda3 100644 --- a/src/grp-system/libcore/audit-fd.c +++ b/src/grp-system/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/grp-system/libcore/cgroup.h b/src/grp-system/libcore/cgroup.h index abc780b5d5..7ba03aee68 100644 --- a/src/grp-system/libcore/cgroup.h +++ b/src/grp-system/libcore/cgroup.h @@ -115,7 +115,8 @@ 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/grp-system/libcore/dbus-execute.c b/src/grp-system/libcore/dbus-execute.c index 06943c6365..fe1d9da440 100644 --- a/src/grp-system/libcore/dbus-execute.c +++ b/src/grp-system/libcore/dbus-execute.c @@ -23,28 +23,29 @@ #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 "basic/capability-util.h" +#include "basic/env-util.h" +#include "basic/fd-util.h" +#include "basic/fileio.h" +#include "basic/ioprio.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" +#include "shared/bus-util.h" + #include "dbus-execute.h" -#include "env-util.h" #include "execute.h" -#include "fd-util.h" -#include "fileio.h" -#include "ioprio.h" -#include "missing.h" #include "namespace.h" -#include "parse-util.h" -#include "path-util.h" -#include "process-util.h" -#include "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/grp-system/libcore/execute.c b/src/grp-system/libcore/execute.c index 5eb3f13695..b19473c6a5 100644 --- a/src/grp-system/libcore/execute.c +++ b/src/grp-system/libcore/execute.c @@ -49,55 +49,57 @@ #include <sys/apparmor.h> #endif -#include "sd-messages.h" +#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 "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 "basic/parse-util.h" +#include "basic/path-util.h" +#include "basic/process-util.h" +#include "basic/rlimit-util.h" +#include "basic/rm-rf.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 "namespace.h" -#include "parse-util.h" -#include "path-util.h" -#include "process-util.h" -#include "rlimit-util.h" -#include "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 "basic/user-util.h" +#include "basic/util.h" +#include "shared/utmp-wtmp.h" + #include "unit.h" -#include "user-util.h" -#include "util.h" -#include "utmp-wtmp.h" #define IDLE_TIMEOUT_USEC (5*USEC_PER_SEC) #define IDLE_TIMEOUT2_USEC (1*USEC_PER_SEC) diff --git a/src/grp-system/libcore/execute.h b/src/grp-system/libcore/execute.h index 68560271d4..18d6f0e4a3 100644 --- a/src/grp-system/libcore/execute.h +++ b/src/grp-system/libcore/execute.h @@ -200,7 +200,8 @@ 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/grp-system/libcore/kmod-setup.c b/src/grp-system/libcore/kmod-setup.c index 3503db52ed..a6fa6a32fb 100644 --- a/src/grp-system/libcore/kmod-setup.c +++ b/src/grp-system/libcore/kmod-setup.c @@ -24,10 +24,11 @@ #include <libkmod.h> #endif -#include "bus-util.h" -#include "capability-util.h" +#include "basic/capability-util.h" +#include "basic/macro.h" +#include "shared/bus-util.h" + #include "kmod-setup.h" -#include "macro.h" #ifdef HAVE_KMOD static void systemd_kmod_log( diff --git a/src/grp-system/libcore/load-fragment.c b/src/grp-system/libcore/load-fragment.c index f01c72568b..bb12b6cbfe 100644 --- a/src/grp-system/libcore/load-fragment.c +++ b/src/grp-system/libcore/load-fragment.c @@ -31,42 +31,44 @@ #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 "basic/cap-list.h" +#include "basic/capability-util.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 "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" +#include "sd-bus/bus-error.h" +#include "sd-bus/bus-internal.h" +#include "shared/bus-util.h" +#include "shared/conf-parser.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 "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" #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 "basic/utf8.h" +#include "basic/web-util.h" + #include "unit-printf.h" #include "unit.h" -#include "utf8.h" -#include "web-util.h" int config_parse_warn_compat( const char *unit, diff --git a/src/grp-system/libcore/manager.c b/src/grp-system/libcore/manager.c index ada22f52fd..29dbf092d7 100644 --- a/src/grp-system/libcore/manager.c +++ b/src/grp-system/libcore/manager.c @@ -36,56 +36,56 @@ #include <libaudit.h> #endif -#include "sd-daemon.h" -#include "sd-messages.h" +#include <systemd/sd-daemon.h> +#include <systemd/sd-messages.h> + +#include "basic/alloc-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 "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/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 "basic/umask-util.h" +#include "basic/unit-name.h" +#include "basic/util.h" +#include "basic/virt.h" +#include "sd-bus/bus-common-errors.h" +#include "sd-bus/bus-error.h" +#include "sd-bus/bus-kernel.h" +#include "shared/boot-timestamps.h" +#include "shared/bus-util.h" +#include "shared/path-lookup.h" +#include "shared/watchdog.h" -#include "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 "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 "locale-setup.h" -#include "log.h" -#include "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 "transaction.h" -#include "umask-util.h" -#include "unit-name.h" -#include "util.h" -#include "virt.h" -#include "watchdog.h" #define NOTIFY_RCVBUF_SIZE (8*1024*1024) #define CGROUPS_AGENT_RCVBUF_SIZE (8*1024*1024) diff --git a/src/grp-system/libcore/manager.h b/src/grp-system/libcore/manager.h index 1e99f1e1b6..fedf39ddcd 100644 --- a/src/grp-system/libcore/manager.h +++ b/src/grp-system/libcore/manager.h @@ -68,11 +68,12 @@ typedef enum StatusType { STATUS_TYPE_EMERGENCY, } StatusType; +#include "basic/unit-name.h" +#include "shared/path-lookup.h" + #include "execute.h" #include "job.h" -#include "path-lookup.h" #include "show-status.h" -#include "unit-name.h" struct Manager { /* Note that the set of units we know of is allowed to be diff --git a/src/grp-system/libcore/selinux-access.c b/src/grp-system/libcore/selinux-access.c index cc287d602d..ce2ef2db1c 100644 --- a/src/grp-system/libcore/selinux-access.c +++ b/src/grp-system/libcore/selinux-access.c @@ -29,17 +29,18 @@ #include <libaudit.h> #endif -#include "sd-bus.h" +#include <systemd/sd-bus.h> + +#include "basic/alloc-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" +#include "shared/bus-util.h" -#include "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" static bool initialized = false; diff --git a/src/grp-system/libcore/selinux-setup.c b/src/grp-system/libcore/selinux-setup.c index 4072df58e6..314d8edbaa 100644 --- a/src/grp-system/libcore/selinux-setup.c +++ b/src/grp-system/libcore/selinux-setup.c @@ -25,12 +25,13 @@ #include <selinux/selinux.h> #endif -#include "log.h" -#include "macro.h" +#include "basic/log.h" +#include "basic/macro.h" +#include "basic/selinux-util.h" +#include "basic/string-util.h" +#include "basic/util.h" + #include "selinux-setup.h" -#include "selinux-util.h" -#include "string-util.h" -#include "util.h" #ifdef HAVE_SELINUX _printf_(2,3) diff --git a/src/grp-system/systemd/main.c b/src/grp-system/systemd/main.c index 5ed8c3d3f5..aa7c126fcf 100644 --- a/src/grp-system/systemd/main.c +++ b/src/grp-system/systemd/main.c @@ -35,56 +35,56 @@ #include <valgrind/valgrind.h> #endif -#include "sd-bus.h" -#include "sd-daemon.h" - -#include "alloc-util.h" -#include "architecture.h" -#include "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 <systemd/sd-bus.h> +#include <systemd/sd-daemon.h> + +#include "basic/alloc-util.h" +#include "basic/architecture.h" +#include "basic/build.h" +#include "basic/capability-util.h" +#include "basic/clock-util.h" +#include "basic/cpu-set-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 "basic/log.h" +#include "basic/missing.h" +#include "basic/parse-util.h" +#include "basic/proc-cmdline.h" +#include "basic/process-util.h" +#include "basic/rlimit-util.h" +#include "basic/selinux-util.h" +#include "basic/signal-util.h" +#include "basic/special.h" +#include "basic/stat-util.h" +#include "basic/stdio-util.h" +#include "basic/strv.h" +#include "basic/terminal-util.h" +#include "basic/umask-util.h" +#include "basic/user-util.h" +#include "basic/virt.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 "hostname-setup.h" #include "ima-setup.h" #include "killall.h" #include "kmod-setup.h" #include "load-fragment.h" -#include "log.h" #include "loopback-setup.h" #include "machine-id-setup.h" #include "manager.h" -#include "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 "sd-bus/bus-error.h" #include "selinux-setup.h" -#include "selinux-util.h" -#include "signal-util.h" +#include "shared/bus-util.h" +#include "shared/conf-parser.h" +#include "shared/pager.h" +#include "shared/switch-root.h" +#include "shared/watchdog.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" static enum { ACTION_RUN, 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/libbasic/src/af-list.c b/src/libbasic/src/af-list.c index 434af37851..1c75c926bb 100644 --- a/src/libbasic/src/af-list.c +++ b/src/libbasic/src/af-list.c @@ -25,8 +25,8 @@ 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/arphrd-list.c b/src/libbasic/src/arphrd-list.c index fbebe8ca09..649bd37456 100644 --- a/src/libbasic/src/arphrd-list.c +++ b/src/libbasic/src/arphrd-list.c @@ -25,8 +25,8 @@ 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/btrfs-util.c b/src/libbasic/src/btrfs-util.c index 7a5f6b7e76..acbcb5f6b9 100644 --- a/src/libbasic/src/btrfs-util.c +++ b/src/libbasic/src/btrfs-util.c @@ -36,23 +36,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/cap-list.c b/src/libbasic/src/cap-list.c index 9821644444..22fc8b9b31 100644 --- a/src/libbasic/src/cap-list.c +++ b/src/libbasic/src/cap-list.c @@ -28,8 +28,8 @@ 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/errno-list.c b/src/libbasic/src/errno-list.c index 2d39044b50..a40c4efc2e 100644 --- a/src/libbasic/src/errno-list.c +++ b/src/libbasic/src/errno-list.c @@ -25,8 +25,8 @@ 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/hashmap.c b/src/libbasic/src/hashmap.c index 38a4bb3feb..d0cdcc2534 100644 --- a/src/libbasic/src/hashmap.c +++ b/src/libbasic/src/hashmap.c @@ -36,7 +36,8 @@ #ifdef ENABLE_DEBUG_HASHMAP #include <pthread.h> -#include "list.h" + +#include "basic/list.h" #endif /* 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/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/process-util.c b/src/libbasic/src/process-util.c index 02d6f3cca3..fcda02b7a9 100644 --- a/src/libbasic/src/process-util.c +++ b/src/libbasic/src/process-util.c @@ -38,23 +38,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 6f797879eb..f5b7e54a68 100644 --- a/src/libbasic/src/random-util.c +++ b/src/libbasic/src/random-util.c @@ -31,11 +31,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/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/libfirewall/firewall-util.c b/src/libfirewall/firewall-util.c index aa924c406e..009cef3e88 100644 --- a/src/libfirewall/firewall-util.c +++ b/src/libfirewall/firewall-util.c @@ -32,17 +32,19 @@ #ifndef IFNAMSIZ #define IFNAMSIZ 16 #endif +#include <libiptc/libiptc.h> + #include <linux/if.h> #include <linux/netfilter_ipv4/ip_tables.h> #include <linux/netfilter/nf_nat.h> #include <linux/netfilter/xt_addrtype.h> -#include <libiptc/libiptc.h> -#include "alloc-util.h" +#include "basic/alloc-util.h" +#include "basic/in-addr-util.h" +#include "basic/macro.h" +#include "basic/socket-util.h" + #include "firewall-util.h" -#include "in-addr-util.h" -#include "macro.h" -#include "socket-util.h" DEFINE_TRIVIAL_CLEANUP_FUNC(struct xtc_handle*, iptc_free); diff --git a/src/libshared/src/dns-domain.c b/src/libshared/src/dns-domain.c index 835557c6b2..4d9088e78e 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 "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" +#include "shared/dns-domain.h" int dns_label_unescape(const char **name, char *dest, size_t sz) { const char *n; diff --git a/src/libsystemd-network/include/systemd-network/sd-dhcp-client.h b/src/libsystemd-network/include/systemd-network/sd-dhcp-client.h index 4fd418ed35..1fe42aa4c0 100644 --- a/src/libsystemd-network/include/systemd-network/sd-dhcp-client.h +++ b/src/libsystemd-network/include/systemd-network/sd-dhcp-client.h @@ -83,7 +83,6 @@ enum { }; typedef struct sd_dhcp_client sd_dhcp_client; - typedef void (*sd_dhcp_client_callback_t)(sd_dhcp_client *client, int event, void *userdata); int sd_dhcp_client_set_callback( sd_dhcp_client *client, diff --git a/src/libsystemd-network/include/systemd-network/sd-dhcp6-client.h b/src/libsystemd-network/include/systemd-network/sd-dhcp6-client.h index fd30f0cd03..b5a5219830 100644 --- a/src/libsystemd-network/include/systemd-network/sd-dhcp6-client.h +++ b/src/libsystemd-network/include/systemd-network/sd-dhcp6-client.h @@ -75,7 +75,6 @@ enum { }; typedef struct sd_dhcp6_client sd_dhcp6_client; - typedef void (*sd_dhcp6_client_callback_t)(sd_dhcp6_client *client, int event, void *userdata); int sd_dhcp6_client_set_callback( sd_dhcp6_client *client, diff --git a/src/libsystemd-network/include/systemd-network/sd-ndisc.h b/src/libsystemd-network/include/systemd-network/sd-ndisc.h index e918fef71e..a26ec878bd 100644 --- a/src/libsystemd-network/include/systemd-network/sd-ndisc.h +++ b/src/libsystemd-network/include/systemd-network/sd-ndisc.h @@ -34,7 +34,6 @@ enum { }; typedef struct sd_ndisc sd_ndisc; - typedef void(*sd_ndisc_router_callback_t)(sd_ndisc *nd, uint8_t flags, const struct in6_addr *gateway, unsigned lifetime, int pref, void *userdata); typedef void(*sd_ndisc_prefix_onlink_callback_t)(sd_ndisc *nd, const struct in6_addr *prefix, unsigned prefixlen, unsigned lifetime, void *userdata); diff --git a/src/libsystemd/include/systemd/sd-bus.h b/src/libsystemd/include/systemd/sd-bus.h index 779c4b07d3..4e338a3270 100644 --- a/src/libsystemd/include/systemd/sd-bus.h +++ b/src/libsystemd/include/systemd/sd-bus.h @@ -100,10 +100,10 @@ enum { /* Callbacks */ typedef int (*sd_bus_message_handler_t)(sd_bus_message *m, void *userdata, sd_bus_error *ret_error); +typedef int (*sd_bus_node_enumerator_t) (sd_bus *bus, const char *prefix, void *userdata, char ***ret_nodes, sd_bus_error *ret_error); +typedef int (*sd_bus_object_find_t) (sd_bus *bus, const char *path, const char *interface, void *userdata, void **ret_found, sd_bus_error *ret_error); typedef int (*sd_bus_property_get_t) (sd_bus *bus, const char *path, const char *interface, const char *property, sd_bus_message *reply, void *userdata, sd_bus_error *ret_error); typedef int (*sd_bus_property_set_t) (sd_bus *bus, const char *path, const char *interface, const char *property, sd_bus_message *value, void *userdata, sd_bus_error *ret_error); -typedef int (*sd_bus_object_find_t) (sd_bus *bus, const char *path, const char *interface, void *userdata, void **ret_found, sd_bus_error *ret_error); -typedef int (*sd_bus_node_enumerator_t) (sd_bus *bus, const char *prefix, void *userdata, char ***ret_nodes, sd_bus_error *ret_error); typedef int (*sd_bus_track_handler_t) (sd_bus_track *track, void *userdata); #include "sd-bus-protocol.h" diff --git a/src/libsystemd/src/sd-bus/bus-control.c b/src/libsystemd/src/sd-bus/bus-control.c index 52128e7b5c..689b70bc60 100644 --- a/src/libsystemd/src/sd-bus/bus-control.c +++ b/src/libsystemd/src/sd-bus/bus-control.c @@ -24,19 +24,20 @@ #include <errno.h> #include <stddef.h> -#include "sd-bus.h" +#include <systemd/sd-bus.h> + +#include "basic/alloc-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" +#include "shared/bus-util.h" -#include "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" _public_ int sd_bus_get_unique_name(sd_bus *bus, const char **unique) { int r; diff --git a/src/libsystemd/src/sd-bus/bus-kernel.c b/src/libsystemd/src/sd-bus/bus-kernel.c index 59398b841d..9d767340b6 100644 --- a/src/libsystemd/src/sd-bus/bus-kernel.c +++ b/src/libsystemd/src/sd-bus/bus-kernel.c @@ -32,24 +32,25 @@ #include <libgen.h> #undef basename -#include "alloc-util.h" +#include "basic/alloc-util.h" +#include "basic/bus-label.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" +#include "shared/bus-util.h" + #include "bus-bloom.h" #include "bus-internal.h" #include "bus-kernel.h" -#include "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" #define UNIQUE_NAME_MAX (3+DECIMAL_STR_MAX(uint64_t)) diff --git a/src/libsystemd/src/sd-bus/test-bus-gvariant.c b/src/libsystemd/src/sd-bus/test-bus-gvariant.c index 83f114a0fe..5fdf8e661c 100644 --- a/src/libsystemd/src/sd-bus/test-bus-gvariant.c +++ b/src/libsystemd/src/sd-bus/test-bus-gvariant.c @@ -21,16 +21,17 @@ #include <glib.h> #endif -#include "sd-bus.h" +#include <systemd/sd-bus.h> + +#include "basic/alloc-util.h" +#include "basic/macro.h" +#include "basic/util.h" +#include "shared/bus-util.h" -#include "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" 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-marshal.c b/src/libsystemd/src/sd-bus/test-bus-marshal.c index a28cc5b79e..4d8f22b042 100644 --- a/src/libsystemd/src/sd-bus/test-bus-marshal.c +++ b/src/libsystemd/src/sd-bus/test-bus-marshal.c @@ -28,17 +28,18 @@ #include <dbus/dbus.h> #endif -#include "sd-bus.h" +#include <systemd/sd-bus.h> + +#include "basic/alloc-util.h" +#include "basic/bus-label.h" +#include "basic/fd-util.h" +#include "basic/hexdecoct.h" +#include "basic/log.h" +#include "basic/util.h" +#include "shared/bus-util.h" -#include "alloc-util.h" #include "bus-dump.h" -#include "bus-label.h" #include "bus-message.h" -#include "bus-util.h" -#include "fd-util.h" -#include "hexdecoct.h" -#include "log.h" -#include "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-journal/audit-type.c b/src/libsystemd/src/sd-journal/audit-type.c index 1dde7f414e..f4dd1e9417 100644 --- a/src/libsystemd/src/sd-journal/audit-type.c +++ b/src/libsystemd/src/sd-journal/audit-type.c @@ -24,7 +24,8 @@ # include <libaudit.h> #endif -#include "missing.h" +#include "basic/macro.h" +#include "basic/missing.h" + #include "audit-type.h" #include "audit_type-to-name.h" -#include "macro.h" diff --git a/src/libsystemd/src/sd-journal/compress.c b/src/libsystemd/src/sd-journal/compress.c index ba734b5561..a96d93c455 100644 --- a/src/libsystemd/src/sd-journal/compress.c +++ b/src/libsystemd/src/sd-journal/compress.c @@ -32,16 +32,17 @@ #include <lz4frame.h> #endif -#include "alloc-util.h" +#include "basic/alloc-util.h" +#include "basic/fd-util.h" +#include "basic/io-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" + #include "compress.h" -#include "fd-util.h" -#include "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" #ifdef HAVE_LZ4 DEFINE_TRIVIAL_CLEANUP_FUNC(LZ4F_compressionContext_t, LZ4F_freeCompressionContext); diff --git a/src/libsystemd/src/sd-journal/journal-def.h b/src/libsystemd/src/sd-journal/journal-def.h index 86c843905a..7e456fcc66 100644 --- a/src/libsystemd/src/sd-journal/journal-def.h +++ b/src/libsystemd/src/sd-journal/journal-def.h @@ -32,20 +32,16 @@ */ typedef struct Header Header; - typedef struct ObjectHeader ObjectHeader; typedef union Object Object; - typedef struct DataObject DataObject; typedef struct FieldObject FieldObject; typedef struct EntryObject EntryObject; typedef struct HashTableObject HashTableObject; typedef struct EntryArrayObject EntryArrayObject; typedef struct TagObject TagObject; - typedef struct EntryItem EntryItem; typedef struct HashItem HashItem; - typedef struct FSSHeader FSSHeader; /* Object types */ diff --git a/src/libsystemd/src/sd-journal/journal-file.h b/src/libsystemd/src/sd-journal/journal-file.h index 564e1a8179..daafc8ae0d 100644 --- a/src/libsystemd/src/sd-journal/journal-file.h +++ b/src/libsystemd/src/sd-journal/journal-file.h @@ -25,14 +25,15 @@ #include <gcrypt.h> #endif -#include "sd-id128.h" +#include <systemd/sd-event.h> +#include <systemd/sd-id128.h> + +#include "basic/hashmap.h" +#include "basic/macro.h" +#include "basic/sparse-endian.h" -#include "hashmap.h" #include "journal-def.h" -#include "macro.h" #include "mmap-cache.h" -#include "sd-event.h" -#include "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-send.c b/src/libsystemd/src/sd-journal/journal-send.c index 5e8a3e3200..7197758289 100644 --- a/src/libsystemd/src/sd-journal/journal-send.c +++ b/src/libsystemd/src/sd-journal/journal-send.c @@ -27,17 +27,17 @@ #define SD_JOURNAL_SUPPRESS_LOCATION -#include "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 <systemd/sd-journal.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/systemd-nspawn/nspawn-patch-uid.c b/src/systemd-nspawn/nspawn-patch-uid.c index 998bd9725d..28d2801c69 100644 --- a/src/systemd-nspawn/nspawn-patch-uid.c +++ b/src/systemd-nspawn/nspawn-patch-uid.c @@ -27,16 +27,17 @@ #include <sys/vfs.h> #include <unistd.h> -#include "acl-util.h" -#include "dirent-util.h" -#include "fd-util.h" -#include "missing.h" +#include "basic/dirent-util.h" +#include "basic/fd-util.h" +#include "basic/missing.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" +#include "shared/acl-util.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" #ifdef HAVE_ACL diff --git a/src/systemd-nspawn/nspawn.c b/src/systemd-nspawn/nspawn.c index 8ec058431b..fc2b5b9eed 100644 --- a/src/systemd-nspawn/nspawn.c +++ b/src/systemd-nspawn/nspawn.c @@ -23,9 +23,10 @@ #include <errno.h> #include <getopt.h> #include <grp.h> -#include <linux/loop.h> #include <pwd.h> #include <sched.h> + +#include <linux/loop.h> #ifdef HAVE_SECCOMP #include <seccomp.h> #endif @@ -43,36 +44,43 @@ #include <sys/types.h> #include <unistd.h> -#include "sd-daemon.h" -#include "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 <systemd/sd-daemon.h> +#include <systemd/sd-id128.h> + +#include "basic/alloc-util.h" +#include "basic/barrier.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 "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 "basic/hostname-util.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/process-util.h" +#include "basic/random-util.h" +#include "basic/rm-rf.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 "sd-netlink/netlink-util.h" +#include "shared/base-filesystem.h" +#include "shared/dev-setup.h" +#include "shared/gpt.h" +#include "shared/machine-image.h" +#include "shared/ptyfwd.h" + #include "nspawn-cgroup.h" #include "nspawn-expose-ports.h" #include "nspawn-mount.h" @@ -82,27 +90,21 @@ #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" #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 "basic/umask-util.h" +#include "basic/user-util.h" +#include "basic/util.h" +#include "shared/udev-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/test/test-af-list.c b/src/test/test-af-list.c index 8139df55b3..21115e677a 100644 --- a/src/test/test-af-list.c +++ b/src/test/test-af-list.c @@ -26,9 +26,9 @@ 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 "af-to-name.h" +#include "basic/af-from-name.h" +#include "basic/af-list.h" +#include "basic/af-to-name.h" int main(int argc, const char *argv[]) { diff --git a/src/test/test-arphrd-list.c b/src/test/test-arphrd-list.c index 3755a3e3d0..976958e733 100644 --- a/src/test/test-arphrd-list.c +++ b/src/test/test-arphrd-list.c @@ -26,9 +26,9 @@ 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 "arphrd-to-name.h" +#include "basic/arphrd-from-name.h" +#include "basic/arphrd-list.h" +#include "basic/arphrd-to-name.h" int main(int argc, const char *argv[]) { |