diff options
Diffstat (limited to 'src')
487 files changed, 1383 insertions, 1151 deletions
diff --git a/src/busctl/busctl-introspect.c b/src/busctl/busctl-introspect.c index 0fa4f05a71..5c92c55483 100644 --- a/src/busctl/busctl-introspect.c +++ b/src/busctl/busctl-introspect.c @@ -20,11 +20,12 @@ #include <systemd/sd-bus.h> #include "basic/alloc-util.h" -#include "busctl-introspect.h" #include "basic/string-util.h" #include "basic/util.h" #include "basic/xml.h" +#include "busctl-introspect.h" + #define NODE_DEPTH_MAX 16 typedef struct Context { diff --git a/src/busctl/busctl.c b/src/busctl/busctl.c index cd8254f5d7..9e7d2159ed 100644 --- a/src/busctl/busctl.c +++ b/src/busctl/busctl.c @@ -22,17 +22,10 @@ #include <systemd/sd-bus.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 "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" @@ -40,6 +33,14 @@ #include "basic/terminal-util.h" #include "basic/user-util.h" #include "basic/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 "shared/pager.h" + +#include "busctl-introspect.h" static bool arg_no_pager = false; static bool arg_legend = true; diff --git a/src/grp-boot/systemd-boot/boot.c b/src/grp-boot/systemd-boot/boot.c index 30c1ead1aa..9dfaed6d46 100644 --- a/src/grp-boot/systemd-boot/boot.c +++ b/src/grp-boot/systemd-boot/boot.c @@ -20,9 +20,9 @@ #include "disk.h" #include "graphics.h" #include "linux.h" +#include "measure.h" #include "pefile.h" #include "util.h" -#include "measure.h" #ifndef EFI_OS_INDICATIONS_BOOT_TO_FW_UI #define EFI_OS_INDICATIONS_BOOT_TO_FW_UI 0x0000000000000001ULL diff --git a/src/grp-boot/systemd-boot/measure.c b/src/grp-boot/systemd-boot/measure.c index 7c016387c1..63f8280107 100644 --- a/src/grp-boot/systemd-boot/measure.c +++ b/src/grp-boot/systemd-boot/measure.c @@ -15,6 +15,7 @@ #include <efi.h> #include <efilib.h> + #include "measure.h" #define EFI_TCG_PROTOCOL_GUID { 0xf541796d, 0xa62e, 0x4954, {0xa7, 0x75, 0x95, 0x84, 0xf6, 0x1b, 0x9c, 0xdd} } diff --git a/src/grp-boot/systemd-boot/stub.c b/src/grp-boot/systemd-boot/stub.c index 1e250f34f4..9fae0c1372 100644 --- a/src/grp-boot/systemd-boot/stub.c +++ b/src/grp-boot/systemd-boot/stub.c @@ -17,10 +17,10 @@ #include "disk.h" #include "graphics.h" #include "linux.h" +#include "measure.h" #include "pefile.h" #include "splash.h" #include "util.h" -#include "measure.h" /* magic string to find in the binary image */ static const char __attribute__((used)) magic[] = "#### LoaderInfo: systemd-stub " VERSION " ####"; diff --git a/src/grp-coredump/coredumpctl/coredumpctl.c b/src/grp-coredump/coredumpctl/coredumpctl.c index 146a03032c..19d28f744e 100644 --- a/src/grp-coredump/coredumpctl/coredumpctl.c +++ b/src/grp-coredump/coredumpctl/coredumpctl.c @@ -27,13 +27,10 @@ #include <systemd/sd-journal.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" @@ -44,6 +41,9 @@ #include "basic/terminal-util.h" #include "basic/user-util.h" #include "basic/util.h" +#include "sd-journal/compress.h" +#include "sd-journal/journal-internal.h" +#include "shared/pager.h" static enum { ACTION_NONE, diff --git a/src/grp-coredump/systemd-coredump/coredump-vacuum.c b/src/grp-coredump/systemd-coredump/coredump-vacuum.c index 77c543ca9c..7fc6e85436 100644 --- a/src/grp-coredump/systemd-coredump/coredump-vacuum.c +++ b/src/grp-coredump/systemd-coredump/coredump-vacuum.c @@ -20,7 +20,6 @@ #include <sys/statvfs.h> #include "basic/alloc-util.h" -#include "coredump-vacuum.h" #include "basic/dirent-util.h" #include "basic/fd-util.h" #include "basic/hashmap.h" @@ -30,6 +29,8 @@ #include "basic/user-util.h" #include "basic/util.h" +#include "coredump-vacuum.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 */ #define DEFAULT_KEEP_FREE_UPPER (uint64_t) (4ULL*1024ULL*1024ULL*1024ULL) /* 4 GiB */ diff --git a/src/grp-coredump/systemd-coredump/stacktrace.c b/src/grp-coredump/systemd-coredump/stacktrace.c index f2309b5cc4..e51b2986e6 100644 --- a/src/grp-coredump/systemd-coredump/stacktrace.c +++ b/src/grp-coredump/systemd-coredump/stacktrace.c @@ -24,10 +24,11 @@ #include "basic/fd-util.h" #include "basic/formats-util.h" #include "basic/macro.h" -#include "stacktrace.h" #include "basic/string-util.h" #include "basic/util.h" +#include "stacktrace.h" + #define FRAMES_MAX 64 #define THREADS_MAX 64 diff --git a/src/grp-hostname/hostnamed.c b/src/grp-hostname/hostnamed.c index 61d660a9f6..22eabc469b 100644 --- a/src/grp-hostname/hostnamed.c +++ b/src/grp-hostname/hostnamed.c @@ -23,7 +23,6 @@ #include <unistd.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" @@ -35,6 +34,7 @@ #include "basic/user-util.h" #include "basic/util.h" #include "basic/virt.h" +#include "shared/bus-util.h" #define VALID_DEPLOYMENT_CHARS (DIGITS LETTERS "-.:") diff --git a/src/grp-initutils/systemd-backlight/backlight.c b/src/grp-initutils/systemd-backlight/backlight.c index c7931ac584..aa8d852024 100644 --- a/src/grp-initutils/systemd-backlight/backlight.c +++ b/src/grp-initutils/systemd-backlight/backlight.c @@ -17,7 +17,7 @@ along with systemd; If not, see <http://www.gnu.org/licenses/>. ***/ -#include "libudev.h" +#include <libudev.h> #include "basic/alloc-util.h" #include "basic/def.h" @@ -27,8 +27,8 @@ #include "basic/parse-util.h" #include "basic/proc-cmdline.h" #include "basic/string-util.h" -#include "shared/udev-util.h" #include "basic/util.h" +#include "shared/udev-util.h" static struct udev_device *find_pci_or_platform_parent(struct udev_device *device) { struct udev_device *parent; diff --git a/src/grp-initutils/systemd-rfkill/rfkill.c b/src/grp-initutils/systemd-rfkill/rfkill.c index d3dd2ef18d..cbb27d8478 100644 --- a/src/grp-initutils/systemd-rfkill/rfkill.c +++ b/src/grp-initutils/systemd-rfkill/rfkill.c @@ -20,7 +20,7 @@ #include <linux/rfkill.h> #include <poll.h> -#include "libudev.h" +#include <libudev.h> #include <systemd/sd-daemon.h> #include "basic/alloc-util.h" @@ -33,8 +33,8 @@ #include "basic/proc-cmdline.h" #include "basic/string-table.h" #include "basic/string-util.h" -#include "shared/udev-util.h" #include "basic/util.h" +#include "shared/udev-util.h" #define EXIT_USEC (5 * USEC_PER_SEC) diff --git a/src/grp-initutils/systemd-sleep/sleep.c b/src/grp-initutils/systemd-sleep/sleep.c index 100066d4c1..e9e84bc893 100644 --- a/src/grp-initutils/systemd-sleep/sleep.c +++ b/src/grp-initutils/systemd-sleep/sleep.c @@ -28,10 +28,10 @@ #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" +#include "shared/sleep-config.h" static char* arg_verb = NULL; diff --git a/src/grp-initutils/systemd-sysctl/sysctl.c b/src/grp-initutils/systemd-sysctl/sysctl.c index 132420d95d..c44aa0aabb 100644 --- a/src/grp-initutils/systemd-sysctl/sysctl.c +++ b/src/grp-initutils/systemd-sysctl/sysctl.c @@ -34,8 +34,8 @@ #include "basic/path-util.h" #include "basic/string-util.h" #include "basic/strv.h" -#include "shared/sysctl-util.h" #include "basic/util.h" +#include "shared/sysctl-util.h" static char **arg_prefixes = NULL; diff --git a/src/grp-initutils/systemd-sysusers/sysusers.c b/src/grp-initutils/systemd-sysusers/sysusers.c index 83e526c5ff..a71d777720 100644 --- a/src/grp-initutils/systemd-sysusers/sysusers.c +++ b/src/grp-initutils/systemd-sysusers/sysusers.c @@ -35,13 +35,13 @@ #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" +#include "shared/specifier.h" +#include "shared/uid-range.h" typedef enum ItemType { ADD_USER = 'u', diff --git a/src/grp-initutils/systemd-tmpfiles/tmpfiles.c b/src/grp-initutils/systemd-tmpfiles/tmpfiles.c index 58dd7c0f8c..c7dde85dae 100644 --- a/src/grp-initutils/systemd-tmpfiles/tmpfiles.c +++ b/src/grp-initutils/systemd-tmpfiles/tmpfiles.c @@ -36,7 +36,6 @@ #include <time.h> #include <unistd.h> -#include "shared/acl-util.h" #include "basic/alloc-util.h" #include "basic/btrfs-util.h" #include "basic/capability-util.h" @@ -62,7 +61,6 @@ #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" @@ -71,6 +69,8 @@ #include "basic/umask-util.h" #include "basic/user-util.h" #include "basic/util.h" +#include "shared/acl-util.h" +#include "shared/specifier.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/grp-initutils/systemd-user-sessions/user-sessions.c b/src/grp-initutils/systemd-user-sessions/user-sessions.c index 4cec29c39e..639c0200e6 100644 --- a/src/grp-initutils/systemd-user-sessions/user-sessions.c +++ b/src/grp-initutils/systemd-user-sessions/user-sessions.c @@ -20,8 +20,8 @@ #include <errno.h> #include <unistd.h> -#include "basic/fileio.h" #include "basic/fileio-label.h" +#include "basic/fileio.h" #include "basic/log.h" #include "basic/selinux-util.h" #include "basic/string-util.h" diff --git a/src/grp-journal/grp-remote/systemd-journal-remote/journal-remote-parse.c b/src/grp-journal/grp-remote/systemd-journal-remote/journal-remote-parse.c index ec5358fb97..c71fedd816 100644 --- a/src/grp-journal/grp-remote/systemd-journal-remote/journal-remote-parse.c +++ b/src/grp-journal/grp-remote/systemd-journal-remote/journal-remote-parse.c @@ -19,10 +19,11 @@ #include "basic/alloc-util.h" #include "basic/fd-util.h" -#include "journal-remote-parse.h" -#include "journald-native.h" #include "basic/parse-util.h" #include "basic/string-util.h" +#include "journald-native.h" + +#include "journal-remote-parse.h" #define LINE_CHUNK 8*1024u diff --git a/src/grp-journal/grp-remote/systemd-journal-remote/journal-remote-write.c b/src/grp-journal/grp-remote/systemd-journal-remote/journal-remote-write.c index 82292fd240..4e05eda103 100644 --- a/src/grp-journal/grp-remote/systemd-journal-remote/journal-remote-write.c +++ b/src/grp-journal/grp-remote/systemd-journal-remote/journal-remote-write.c @@ -18,6 +18,7 @@ ***/ #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/grp-remote/systemd-journal-remote/journal-remote-write.h b/src/grp-journal/grp-remote/systemd-journal-remote/journal-remote-write.h index 53ba45fc04..a61434ca75 100644 --- a/src/grp-journal/grp-remote/systemd-journal-remote/journal-remote-write.h +++ b/src/grp-journal/grp-remote/systemd-journal-remote/journal-remote-write.h @@ -19,7 +19,7 @@ along with systemd; If not, see <http://www.gnu.org/licenses/>. ***/ -#include "journal-file.h" +#include "sd-journal/journal-file.h" typedef struct RemoteServer RemoteServer; diff --git a/src/grp-journal/grp-remote/systemd-journal-remote/journal-remote.h b/src/grp-journal/grp-remote/systemd-journal-remote/journal-remote.h index 2e8d5999b0..6abfc1019d 100644 --- a/src/grp-journal/grp-remote/systemd-journal-remote/journal-remote.h +++ b/src/grp-journal/grp-remote/systemd-journal-remote/journal-remote.h @@ -22,9 +22,10 @@ #include <systemd/sd-event.h> #include "basic/hashmap.h" +#include "microhttpd-util.h" + #include "journal-remote-parse.h" #include "journal-remote-write.h" -#include "microhttpd-util.h" typedef struct MHDDaemonWrapper MHDDaemonWrapper; diff --git a/src/grp-journal/grp-remote/systemd-journal-upload/journal-upload-journal.c b/src/grp-journal/grp-remote/systemd-journal-upload/journal-upload-journal.c index eddfc384fa..61d287da97 100644 --- a/src/grp-journal/grp-remote/systemd-journal-upload/journal-upload-journal.c +++ b/src/grp-journal/grp-remote/systemd-journal-upload/journal-upload-journal.c @@ -20,12 +20,14 @@ #include <curl/curl.h> #include <stdbool.h> +#include <systemd/sd-daemon.h> + #include "basic/alloc-util.h" -#include "journal-upload.h" #include "basic/log.h" #include "basic/utf8.h" #include "basic/util.h" -#include <systemd/sd-daemon.h> + +#include "journal-upload.h" /** * Write up to size bytes to buf. Return negative on error, and number of diff --git a/src/grp-journal/grp-remote/systemd-journal-upload/journal-upload.c b/src/grp-journal/grp-remote/systemd-journal-upload/journal-upload.c index 643f44cd86..82d8331e76 100644 --- a/src/grp-journal/grp-remote/systemd-journal-upload/journal-upload.c +++ b/src/grp-journal/grp-remote/systemd-journal-upload/journal-upload.c @@ -26,13 +26,11 @@ #include <systemd/sd-daemon.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 "basic/log.h" #include "basic/mkdir.h" #include "basic/parse-util.h" @@ -40,6 +38,9 @@ #include "basic/signal-util.h" #include "basic/string-util.h" #include "basic/util.h" +#include "shared/conf-parser.h" + +#include "journal-upload.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/grp-remote/systemd-journal-upload/journal-upload.h b/src/grp-journal/grp-remote/systemd-journal-upload/journal-upload.h index 0b0336c84b..2decc7b22e 100644 --- a/src/grp-journal/grp-remote/systemd-journal-upload/journal-upload.h +++ b/src/grp-journal/grp-remote/systemd-journal-upload/journal-upload.h @@ -4,6 +4,7 @@ #include <systemd/sd-event.h> #include <systemd/sd-journal.h> + #include "basic/time-util.h" typedef enum { diff --git a/src/grp-journal/libjournal-core/journald-audit.c b/src/grp-journal/libjournal-core/journald-audit.c index d76a460257..74ad0c017e 100644 --- a/src/grp-journal/libjournal-core/journald-audit.c +++ b/src/grp-journal/libjournal-core/journald-audit.c @@ -18,13 +18,14 @@ ***/ #include "basic/alloc-util.h" -#include "sd-journal/audit-type.h" #include "basic/fd-util.h" #include "basic/hexdecoct.h" #include "basic/io-util.h" -#include "journald-audit.h" #include "basic/missing.h" #include "basic/string-util.h" +#include "sd-journal/audit-type.h" + +#include "journald-audit.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 75a4ceba3a..98c07e95e4 100644 --- a/src/grp-journal/libjournal-core/journald-audit.h +++ b/src/grp-journal/libjournal-core/journald-audit.h @@ -19,9 +19,10 @@ along with systemd; If not, see <http://www.gnu.org/licenses/>. ***/ -#include "journald-server.h" #include "basic/socket-util.h" +#include "journald-server.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); int server_open_audit(Server*s); diff --git a/src/grp-journal/libjournal-core/journald-console.c b/src/grp-journal/libjournal-core/journald-console.c index 8d8b3045c1..b1e6828dc2 100644 --- a/src/grp-journal/libjournal-core/journald-console.c +++ b/src/grp-journal/libjournal-core/journald-console.c @@ -26,13 +26,14 @@ #include "basic/fileio.h" #include "basic/formats-util.h" #include "basic/io-util.h" -#include "journald-console.h" -#include "journald-server.h" #include "basic/parse-util.h" #include "basic/process-util.h" #include "basic/stdio-util.h" #include "basic/terminal-util.h" +#include "journald-console.h" +#include "journald-server.h" + static bool prefix_timestamp(void) { static int cached_printk_time = -1; diff --git a/src/grp-journal/libjournal-core/journald-gperf.c b/src/grp-journal/libjournal-core/journald-gperf.c index d8483a3303..3da66da54f 100644 --- a/src/grp-journal/libjournal-core/journald-gperf.c +++ b/src/grp-journal/libjournal-core/journald-gperf.c @@ -31,10 +31,12 @@ #include <stddef.h> +#include <string.h> #include <sys/socket.h> + #include "shared/conf-parser.h" + #include "journald-server.h" -#include <string.h> #define TOTAL_KEYWORDS 28 #define MIN_WORD_LENGTH 12 diff --git a/src/grp-journal/libjournal-core/journald-kmsg.c b/src/grp-journal/libjournal-core/journald-kmsg.c index cac6845590..946318c184 100644 --- a/src/grp-journal/libjournal-core/journald-kmsg.c +++ b/src/grp-journal/libjournal-core/journald-kmsg.c @@ -23,21 +23,22 @@ #include <sys/socket.h> #include <unistd.h> -#include "libudev.h" +#include <libudev.h> #include <systemd/sd-messages.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 "basic/parse-util.h" #include "basic/process-util.h" #include "basic/stdio-util.h" #include "basic/string-util.h" +#include "journald-kmsg.h" +#include "journald-server.h" +#include "journald-syslog.h" + void server_forward_kmsg( Server *s, int priority, diff --git a/src/grp-journal/libjournal-core/journald-native.c b/src/grp-journal/libjournal-core/journald-native.c index 3389d84d9e..9bfea935ad 100644 --- a/src/grp-journal/libjournal-core/journald-native.c +++ b/src/grp-journal/libjournal-core/journald-native.c @@ -27,12 +27,6 @@ #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 "basic/memfd-util.h" #include "basic/parse-util.h" #include "basic/path-util.h" @@ -40,6 +34,13 @@ #include "basic/socket-util.h" #include "basic/string-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" + 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 60725c4884..22603bf8e6 100644 --- a/src/grp-journal/libjournal-core/journald-rate-limit.c +++ b/src/grp-journal/libjournal-core/journald-rate-limit.c @@ -22,12 +22,13 @@ #include "basic/alloc-util.h" #include "basic/hashmap.h" -#include "journald-rate-limit.h" #include "basic/list.h" #include "basic/random-util.h" #include "basic/string-util.h" #include "basic/util.h" +#include "journald-rate-limit.h" + #define POOLS_MAX 5 #define BUCKETS_MAX 127 #define GROUPS_MAX 2047 diff --git a/src/grp-journal/libjournal-core/journald-stream.h b/src/grp-journal/libjournal-core/journald-stream.h index fed48c2104..29f43b459f 100644 --- a/src/grp-journal/libjournal-core/journald-stream.h +++ b/src/grp-journal/libjournal-core/journald-stream.h @@ -22,6 +22,7 @@ typedef struct StdoutStream StdoutStream; #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 5f632eb07b..bc793235d4 100644 --- a/src/grp-journal/libjournal-core/journald-syslog.c +++ b/src/grp-journal/libjournal-core/journald-syslog.c @@ -27,11 +27,6 @@ #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 "basic/process-util.h" #include "basic/selinux-util.h" #include "basic/socket-util.h" @@ -39,6 +34,12 @@ #include "basic/string-util.h" #include "basic/syslog-util.h" +#include "journald-console.h" +#include "journald-kmsg.h" +#include "journald-server.h" +#include "journald-syslog.h" +#include "journald-wall.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 fa3458fd4a..0c816de55f 100644 --- a/src/grp-journal/libjournal-core/journald-wall.c +++ b/src/grp-journal/libjournal-core/journald-wall.c @@ -19,12 +19,13 @@ #include "basic/alloc-util.h" #include "basic/formats-util.h" -#include "journald-server.h" -#include "journald-wall.h" #include "basic/process-util.h" #include "basic/string-util.h" #include "shared/utmp-wtmp.h" +#include "journald-server.h" +#include "journald-wall.h" + void server_forward_wall( Server *s, int priority, diff --git a/src/grp-journal/libjournal-core/test-audit-type.c b/src/grp-journal/libjournal-core/test-audit-type.c index 88a2e6d9d9..38917b30a5 100644 --- a/src/grp-journal/libjournal-core/test-audit-type.c +++ b/src/grp-journal/libjournal-core/test-audit-type.c @@ -17,10 +17,10 @@ along with systemd; If not, see <http://www.gnu.org/licenses/>. ***/ -#include <stdio.h> #include <linux/audit.h> +#include <stdio.h> -#include "audit-type.h" +#include "sd-journal/audit-type.h" static void print_audit_label(int i) { const char *name; diff --git a/src/grp-journal/libjournal-core/test-catalog.c b/src/grp-journal/libjournal-core/test-catalog.c index 3a26909136..73ffb16104 100644 --- a/src/grp-journal/libjournal-core/test-catalog.c +++ b/src/grp-journal/libjournal-core/test-catalog.c @@ -26,13 +26,13 @@ #include <systemd/sd-messages.h> #include "basic/alloc-util.h" -#include "catalog.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" +#include "sd-journal/catalog.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 99d7c7d103..4292e4f8cb 100644 --- a/src/grp-journal/libjournal-core/test-compress-benchmark.c +++ b/src/grp-journal/libjournal-core/test-compress-benchmark.c @@ -18,12 +18,12 @@ ***/ #include "basic/alloc-util.h" -#include "compress.h" #include "basic/macro.h" #include "basic/parse-util.h" #include "basic/random-util.h" #include "basic/string-util.h" #include "basic/util.h" +#include "sd-journal/compress.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-journal-enum.c b/src/grp-journal/libjournal-core/test-journal-enum.c index b960c5d8cd..588e12c800 100644 --- a/src/grp-journal/libjournal-core/test-journal-enum.c +++ b/src/grp-journal/libjournal-core/test-journal-enum.c @@ -21,9 +21,9 @@ #include <systemd/sd-journal.h> -#include "journal-internal.h" #include "basic/log.h" #include "basic/macro.h" +#include "sd-journal/journal-internal.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 6364a395b8..66ae8f83c4 100644 --- a/src/grp-journal/libjournal-core/test-journal-flush.c +++ b/src/grp-journal/libjournal-core/test-journal-flush.c @@ -22,10 +22,10 @@ #include <systemd/sd-journal.h> #include "basic/alloc-util.h" -#include "journal-file.h" -#include "journal-internal.h" #include "basic/macro.h" #include "basic/string-util.h" +#include "sd-journal/journal-file.h" +#include "sd-journal/journal-internal.h" int main(int argc, char *argv[]) { _cleanup_free_ char *fn = NULL; diff --git a/src/grp-journal/libjournal-core/test-journal-interleaving.c b/src/grp-journal/libjournal-core/test-journal-interleaving.c index 753c92cdbc..004394d18a 100644 --- a/src/grp-journal/libjournal-core/test-journal-interleaving.c +++ b/src/grp-journal/libjournal-core/test-journal-interleaving.c @@ -24,12 +24,12 @@ #include <systemd/sd-journal.h> #include "basic/alloc-util.h" -#include "journal-file.h" -#include "journal-vacuum.h" #include "basic/log.h" #include "basic/parse-util.h" #include "basic/rm-rf.h" #include "basic/util.h" +#include "sd-journal/journal-file.h" +#include "sd-journal/journal-vacuum.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 42043b229f..967e30c46a 100644 --- a/src/grp-journal/libjournal-core/test-journal-match.c +++ b/src/grp-journal/libjournal-core/test-journal-match.c @@ -22,10 +22,10 @@ #include <systemd/sd-journal.h> #include "basic/alloc-util.h" -#include "journal-internal.h" #include "basic/log.h" #include "basic/string-util.h" #include "basic/util.h" +#include "sd-journal/journal-internal.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-stream.c b/src/grp-journal/libjournal-core/test-journal-stream.c index e5a4a02087..b71c44ef56 100644 --- a/src/grp-journal/libjournal-core/test-journal-stream.c +++ b/src/grp-journal/libjournal-core/test-journal-stream.c @@ -23,13 +23,13 @@ #include <systemd/sd-journal.h> #include "basic/alloc-util.h" -#include "journal-file.h" -#include "journal-internal.h" #include "basic/log.h" #include "basic/macro.h" #include "basic/parse-util.h" #include "basic/rm-rf.h" #include "basic/util.h" +#include "sd-journal/journal-file.h" +#include "sd-journal/journal-internal.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 91bc0ec99e..4756126478 100644 --- a/src/grp-journal/libjournal-core/test-journal-syslog.c +++ b/src/grp-journal/libjournal-core/test-journal-syslog.c @@ -18,10 +18,11 @@ ***/ #include "basic/alloc-util.h" -#include "journald-syslog.h" #include "basic/macro.h" #include "basic/string-util.h" +#include "journald-syslog.h" + static void test_syslog_parse_identifier(const char* str, const char *ident, const char*pid, int ret) { const char *buf = str; diff --git a/src/grp-journal/libjournal-core/test-journal-verify.c b/src/grp-journal/libjournal-core/test-journal-verify.c index 7a253c2b85..485315c118 100644 --- a/src/grp-journal/libjournal-core/test-journal-verify.c +++ b/src/grp-journal/libjournal-core/test-journal-verify.c @@ -22,12 +22,12 @@ #include <unistd.h> #include "basic/fd-util.h" -#include "journal-file.h" -#include "journal-verify.h" #include "basic/log.h" #include "basic/rm-rf.h" #include "basic/terminal-util.h" #include "basic/util.h" +#include "sd-journal/journal-file.h" +#include "sd-journal/journal-verify.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 a8ee802220..05de15f0c0 100644 --- a/src/grp-journal/libjournal-core/test-journal.c +++ b/src/grp-journal/libjournal-core/test-journal.c @@ -20,11 +20,11 @@ #include <fcntl.h> #include <unistd.h> -#include "journal-authenticate.h" -#include "journal-file.h" -#include "journal-vacuum.h" #include "basic/log.h" #include "basic/rm-rf.h" +#include "sd-journal/journal-authenticate.h" +#include "sd-journal/journal-file.h" +#include "sd-journal/journal-vacuum.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 7b7c67cca4..3eb5444480 100644 --- a/src/grp-journal/libjournal-core/test-mmap-cache.c +++ b/src/grp-journal/libjournal-core/test-mmap-cache.c @@ -25,8 +25,8 @@ #include "basic/fd-util.h" #include "basic/fileio.h" #include "basic/macro.h" -#include "mmap-cache.h" #include "basic/util.h" +#include "sd-journal/mmap-cache.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 cfeb9ea48e..cd887feed8 100644 --- a/src/grp-journal/systemd-journald/journald.c +++ b/src/grp-journal/systemd-journald/journald.c @@ -24,11 +24,10 @@ #include "basic/formats-util.h" #include "basic/sigbus.h" -#include "sd-journal/journal-authenticate.h" - #include "journald-kmsg.h" #include "journald-server.h" #include "journald-syslog.h" +#include "sd-journal/journal-authenticate.h" int main(int argc, char *argv[]) { Server server; diff --git a/src/grp-login/liblogind-core/logind-acl.c b/src/grp-login/liblogind-core/logind-acl.c index 9f6199e6eb..44e49c1dad 100644 --- a/src/grp-login/liblogind-core/logind-acl.c +++ b/src/grp-login/liblogind-core/logind-acl.c @@ -20,17 +20,18 @@ #include <errno.h> #include <string.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 "basic/set.h" #include "basic/string-util.h" -#include "shared/udev-util.h" #include "basic/util.h" +#include "shared/acl-util.h" +#include "shared/udev-util.h" + +#include "logind-acl.h" static int flush_acl(acl_t acl) { acl_entry_t i; diff --git a/src/grp-login/liblogind-core/logind-acl.h b/src/grp-login/liblogind-core/logind-acl.h index 1286c6a3cd..7d324ea90a 100644 --- a/src/grp-login/liblogind-core/logind-acl.h +++ b/src/grp-login/liblogind-core/logind-acl.h @@ -22,7 +22,7 @@ #include <stdbool.h> #include <sys/types.h> -#include "libudev.h" +#include <libudev.h> #ifdef HAVE_ACL diff --git a/src/grp-login/liblogind-core/logind-action.c b/src/grp-login/liblogind-core/logind-action.c index 6976377c0a..0cfeab3fdb 100644 --- a/src/grp-login/liblogind-core/logind-action.c +++ b/src/grp-login/liblogind-core/logind-action.c @@ -20,17 +20,18 @@ #include <unistd.h> #include "basic/alloc-util.h" -#include "bus-error.h" -#include "shared/bus-util.h" -#include "shared/conf-parser.h" #include "basic/formats-util.h" -#include "logind-action.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" +#include "sd-bus/bus-error.h" +#include "shared/bus-util.h" +#include "shared/conf-parser.h" +#include "shared/sleep-config.h" + +#include "logind-action.h" int manager_handle_action( Manager *m, diff --git a/src/grp-login/liblogind-core/logind-action.h b/src/grp-login/liblogind-core/logind-action.h index fb40ae48d2..39ba3cf0f6 100644 --- a/src/grp-login/liblogind-core/logind-action.h +++ b/src/grp-login/liblogind-core/logind-action.h @@ -33,9 +33,10 @@ typedef enum HandleAction { _HANDLE_ACTION_INVALID = -1 } HandleAction; -#include "logind-inhibit.h" #include "logind.h" +#include "logind-inhibit.h" + int manager_handle_action( Manager *m, InhibitWhat inhibit_key, diff --git a/src/grp-login/liblogind-core/logind-button.c b/src/grp-login/liblogind-core/logind-button.c index d791578cd7..428e6e91a0 100644 --- a/src/grp-login/liblogind-core/logind-button.c +++ b/src/grp-login/liblogind-core/logind-button.c @@ -19,19 +19,20 @@ #include <errno.h> #include <fcntl.h> +#include <linux/input.h> #include <string.h> #include <sys/ioctl.h> #include <unistd.h> -#include <linux/input.h> #include <systemd/sd-messages.h> #include "basic/alloc-util.h" #include "basic/fd-util.h" -#include "logind-button.h" #include "basic/string-util.h" #include "basic/util.h" +#include "logind-button.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 e47677ffda..0a9e45bb22 100644 --- a/src/grp-login/liblogind-core/logind-core.c +++ b/src/grp-login/liblogind-core/logind-core.c @@ -18,21 +18,21 @@ ***/ #include <fcntl.h> +#include <linux/vt.h> #include <pwd.h> #include <sys/ioctl.h> #include <sys/types.h> -#include <linux/vt.h> #include "basic/alloc-util.h" -#include "bus-error.h" -#include "shared/bus-util.h" #include "basic/cgroup-util.h" #include "basic/fd-util.h" -#include "logind.h" #include "basic/strv.h" #include "basic/terminal-util.h" -#include "shared/udev-util.h" #include "basic/user-util.h" +#include "logind.h" +#include "sd-bus/bus-error.h" +#include "shared/bus-util.h" +#include "shared/udev-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 bc705e1754..cb51e43a5c 100644 --- a/src/grp-login/liblogind-core/logind-dbus.c +++ b/src/grp-login/liblogind-core/logind-dbus.c @@ -26,28 +26,28 @@ #include "basic/alloc-util.h" #include "basic/audit-util.h" -#include "bus-common-errors.h" -#include "bus-error.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 "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 "logind.h" +#include "sd-bus/bus-common-errors.h" +#include "sd-bus/bus-error.h" +#include "shared/bus-util.h" +#include "shared/efivars.h" +#include "shared/sleep-config.h" +#include "shared/udev-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) { diff --git a/src/grp-login/liblogind-core/logind-device.c b/src/grp-login/liblogind-core/logind-device.c index db6a8d93d1..6165a9ea6e 100644 --- a/src/grp-login/liblogind-core/logind-device.c +++ b/src/grp-login/liblogind-core/logind-device.c @@ -20,9 +20,10 @@ #include <string.h> #include "basic/alloc-util.h" -#include "logind-device.h" #include "basic/util.h" +#include "logind-device.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 96c012bdd9..23dfcd1964 100644 --- a/src/grp-login/liblogind-core/logind-device.h +++ b/src/grp-login/liblogind-core/logind-device.h @@ -22,6 +22,7 @@ typedef struct Device Device; #include "basic/list.h" + #include "logind-seat.h" #include "logind-session-device.h" diff --git a/src/grp-login/liblogind-core/logind-inhibit.c b/src/grp-login/liblogind-core/logind-inhibit.c index f95582f9db..8a35db0dc8 100644 --- a/src/grp-login/liblogind-core/logind-inhibit.c +++ b/src/grp-login/liblogind-core/logind-inhibit.c @@ -27,7 +27,6 @@ #include "basic/fd-util.h" #include "basic/fileio.h" #include "basic/formats-util.h" -#include "logind-inhibit.h" #include "basic/mkdir.h" #include "basic/parse-util.h" #include "basic/string-table.h" @@ -35,6 +34,8 @@ #include "basic/user-util.h" #include "basic/util.h" +#include "logind-inhibit.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 bd9c4d1c06..fbebe6fcff 100644 --- a/src/grp-login/liblogind-core/logind-seat-dbus.c +++ b/src/grp-login/liblogind-core/logind-seat-dbus.c @@ -21,14 +21,15 @@ #include <string.h> #include "basic/alloc-util.h" -#include "bus-common-errors.h" #include "basic/bus-label.h" -#include "shared/bus-util.h" -#include "logind-seat.h" -#include "logind.h" #include "basic/strv.h" #include "basic/user-util.h" #include "basic/util.h" +#include "logind.h" +#include "sd-bus/bus-common-errors.h" +#include "shared/bus-util.h" + +#include "logind-seat.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 da68288dbd..6525ad5d7b 100644 --- a/src/grp-login/liblogind-core/logind-seat.c +++ b/src/grp-login/liblogind-core/logind-seat.c @@ -28,8 +28,6 @@ #include "basic/fd-util.h" #include "basic/fileio.h" #include "basic/formats-util.h" -#include "logind-acl.h" -#include "logind-seat.h" #include "basic/mkdir.h" #include "basic/parse-util.h" #include "basic/stdio-util.h" @@ -37,6 +35,9 @@ #include "basic/terminal-util.h" #include "basic/util.h" +#include "logind-acl.h" +#include "logind-seat.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 9201e0ea1f..a2aeb58687 100644 --- a/src/grp-login/liblogind-core/logind-seat.h +++ b/src/grp-login/liblogind-core/logind-seat.h @@ -22,6 +22,7 @@ typedef struct Seat Seat; #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 483bf0de52..76228d4474 100644 --- a/src/grp-login/liblogind-core/logind-session-dbus.c +++ b/src/grp-login/liblogind-core/logind-session-dbus.c @@ -21,16 +21,17 @@ #include <string.h> #include "basic/alloc-util.h" -#include "bus-common-errors.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 "basic/signal-util.h" #include "basic/strv.h" #include "basic/util.h" +#include "logind.h" +#include "sd-bus/bus-common-errors.h" +#include "shared/bus-util.h" + +#include "logind-session-device.h" +#include "logind-session.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 517a2fcb8e..1bdb188f05 100644 --- a/src/grp-login/liblogind-core/logind-session-device.c +++ b/src/grp-login/liblogind-core/logind-session-device.c @@ -23,14 +23,15 @@ #include <sys/ioctl.h> #include <sys/types.h> -#include "libudev.h" +#include <libudev.h> #include "basic/alloc-util.h" -#include "shared/bus-util.h" #include "basic/fd-util.h" -#include "logind-session-device.h" #include "basic/missing.h" #include "basic/util.h" +#include "shared/bus-util.h" + +#include "logind-session-device.h" enum SessionDeviceNotifications { SESSION_DEVICE_RESUME, diff --git a/src/grp-login/liblogind-core/logind-session.c b/src/grp-login/liblogind-core/logind-session.c index b38e47e7e9..ef451d900a 100644 --- a/src/grp-login/liblogind-core/logind-session.c +++ b/src/grp-login/liblogind-core/logind-session.c @@ -30,14 +30,11 @@ #include "basic/alloc-util.h" #include "basic/audit-util.h" -#include "bus-error.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 "basic/mkdir.h" #include "basic/parse-util.h" #include "basic/path-util.h" @@ -45,6 +42,10 @@ #include "basic/terminal-util.h" #include "basic/user-util.h" #include "basic/util.h" +#include "sd-bus/bus-error.h" +#include "shared/bus-util.h" + +#include "logind-session.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 17da11e70c..23ff6576c9 100644 --- a/src/grp-login/liblogind-core/logind-session.h +++ b/src/grp-login/liblogind-core/logind-session.h @@ -24,6 +24,7 @@ typedef enum KillWho KillWho; #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 b09ecf05b4..d82ced605e 100644 --- a/src/grp-login/liblogind-core/logind-user-dbus.c +++ b/src/grp-login/liblogind-core/logind-user-dbus.c @@ -21,13 +21,14 @@ #include <string.h> #include "basic/alloc-util.h" -#include "shared/bus-util.h" #include "basic/formats-util.h" -#include "logind-user.h" -#include "logind.h" #include "basic/signal-util.h" #include "basic/strv.h" #include "basic/user-util.h" +#include "logind.h" +#include "shared/bus-util.h" + +#include "logind-user.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 4d7d8b1133..015276efc8 100644 --- a/src/grp-login/liblogind-core/logind-user.c +++ b/src/grp-login/liblogind-core/logind-user.c @@ -23,11 +23,6 @@ #include <unistd.h> #include "basic/alloc-util.h" -#include "bus-common-errors.h" -#include "bus-error.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" @@ -35,7 +30,6 @@ #include "basic/fs-util.h" #include "basic/hashmap.h" #include "basic/label.h" -#include "logind-user.h" #include "basic/mkdir.h" #include "basic/mount-util.h" #include "basic/parse-util.h" @@ -48,6 +42,13 @@ #include "basic/unit-name.h" #include "basic/user-util.h" #include "basic/util.h" +#include "sd-bus/bus-common-errors.h" +#include "sd-bus/bus-error.h" +#include "shared/bus-util.h" +#include "shared/clean-ipc.h" +#include "shared/conf-parser.h" + +#include "logind-user.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-utmp.c b/src/grp-login/liblogind-core/logind-utmp.c index 04ade6684b..c5dc137d61 100644 --- a/src/grp-login/liblogind-core/logind-utmp.c +++ b/src/grp-login/liblogind-core/logind-utmp.c @@ -26,15 +26,15 @@ #include "basic/alloc-util.h" #include "basic/audit-util.h" -#include "bus-common-errors.h" -#include "bus-error.h" -#include "shared/bus-util.h" #include "basic/formats-util.h" -#include "logind.h" #include "basic/special.h" #include "basic/strv.h" #include "basic/unit-name.h" #include "basic/user-util.h" +#include "logind.h" +#include "sd-bus/bus-common-errors.h" +#include "sd-bus/bus-error.h" +#include "shared/bus-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 af747d2344..3ac325fc97 100644 --- a/src/grp-login/loginctl/loginctl.c +++ b/src/grp-login/loginctl/loginctl.c @@ -26,26 +26,27 @@ #include <systemd/sd-bus.h> #include "basic/alloc-util.h" -#include "bus-error.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 "basic/terminal-util.h" #include "basic/unit-name.h" #include "basic/user-util.h" #include "basic/util.h" #include "basic/verbs.h" +#include "sd-bus/bus-error.h" +#include "shared/bus-unit-util.h" +#include "shared/bus-util.h" +#include "shared/cgroup-show.h" +#include "shared/logs-show.h" +#include "shared/pager.h" +#include "shared/spawn-polkit-agent.h" + +#include "sysfs-show.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 c56c919168..12808c3336 100644 --- a/src/grp-login/loginctl/sysfs-show.c +++ b/src/grp-login/loginctl/sysfs-show.c @@ -20,16 +20,17 @@ #include <errno.h> #include <string.h> -#include "libudev.h" +#include <libudev.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 "basic/terminal-util.h" -#include "shared/udev-util.h" #include "basic/util.h" +#include "shared/udev-util.h" + +#include "sysfs-show.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 b50fa50697..6f67506e5a 100644 --- a/src/grp-login/pam_systemd/pam_systemd.c +++ b/src/grp-login/pam_systemd/pam_systemd.c @@ -30,9 +30,6 @@ #include "basic/alloc-util.h" #include "basic/audit-util.h" -#include "bus-common-errors.h" -#include "bus-error.h" -#include "shared/bus-util.h" #include "basic/def.h" #include "basic/fd-util.h" #include "basic/fileio.h" @@ -45,6 +42,9 @@ #include "basic/strv.h" #include "basic/terminal-util.h" #include "basic/util.h" +#include "sd-bus/bus-common-errors.h" +#include "sd-bus/bus-error.h" +#include "shared/bus-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 89f116f1b5..543bdb9e80 100644 --- a/src/grp-login/systemd-inhibit/inhibit.c +++ b/src/grp-login/systemd-inhibit/inhibit.c @@ -26,8 +26,6 @@ #include <systemd/sd-bus.h> #include "basic/alloc-util.h" -#include "bus-error.h" -#include "shared/bus-util.h" #include "basic/fd-util.h" #include "basic/formats-util.h" #include "basic/process-util.h" @@ -35,6 +33,8 @@ #include "basic/strv.h" #include "basic/user-util.h" #include "basic/util.h" +#include "sd-bus/bus-error.h" +#include "shared/bus-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 8031d04a8f..e5e21f7567 100644 --- a/src/grp-login/systemd-logind/logind.c +++ b/src/grp-login/systemd-logind/logind.c @@ -22,23 +22,24 @@ #include <string.h> #include <unistd.h> -#include "libudev.h" +#include <libudev.h> #include <systemd/sd-daemon.h> #include "basic/alloc-util.h" -#include "bus-error.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 "basic/selinux-util.h" #include "basic/signal-util.h" #include "basic/strv.h" +#include "sd-bus/bus-error.h" +#include "shared/bus-util.h" +#include "shared/conf-parser.h" #include "shared/udev-util.h" +#include "logind.h" + static void manager_free(Manager *m); static void manager_reset_config(Manager *m) { diff --git a/src/grp-login/systemd-logind/logind.h b/src/grp-login/systemd-logind/logind.h index ab6d917678..effc498118 100644 --- a/src/grp-login/systemd-logind/logind.h +++ b/src/grp-login/systemd-logind/logind.h @@ -21,7 +21,7 @@ #include <stdbool.h> -#include "libudev.h" +#include <libudev.h> #include <systemd/sd-bus.h> #include <systemd/sd-event.h> diff --git a/src/grp-login/test-inhibit.c b/src/grp-login/test-inhibit.c index b186b36ce1..2451d56446 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 "shared/bus-util.h" #include "basic/fd-util.h" #include "basic/macro.h" #include "basic/util.h" +#include "shared/bus-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-machine/grp-import/curl-util.c b/src/grp-machine/grp-import/curl-util.c index d6570a3656..9e0d56e5c3 100644 --- a/src/grp-machine/grp-import/curl-util.c +++ b/src/grp-machine/grp-import/curl-util.c @@ -18,10 +18,11 @@ ***/ #include "basic/alloc-util.h" -#include "curl-util.h" #include "basic/fd-util.h" #include "basic/string-util.h" +#include "curl-util.h" + static void curl_glue_check_finished(CurlGlue *g) { CURLMsg *msg; int k = 0; diff --git a/src/grp-machine/grp-import/qcow2-util.c b/src/grp-machine/grp-import/qcow2-util.c index fa272088d3..bc50b7d0b3 100644 --- a/src/grp-machine/grp-import/qcow2-util.c +++ b/src/grp-machine/grp-import/qcow2-util.c @@ -21,10 +21,11 @@ #include "basic/alloc-util.h" #include "basic/btrfs-util.h" -#include "qcow2-util.h" #include "basic/sparse-endian.h" #include "basic/util.h" +#include "qcow2-util.h" + #define QCOW2_MAGIC 0x514649fb #define QCOW2_COPIED (1ULL << 63) diff --git a/src/grp-machine/grp-import/systemd-export/export-raw.h b/src/grp-machine/grp-import/systemd-export/export-raw.h index 13d7809b9d..00f6931d7b 100644 --- a/src/grp-machine/grp-import/systemd-export/export-raw.h +++ b/src/grp-machine/grp-import/systemd-export/export-raw.h @@ -21,8 +21,8 @@ #include <systemd/sd-event.h> -#include "import-compress.h" #include "basic/macro.h" +#include "import-compress.h" typedef struct RawExport RawExport; diff --git a/src/grp-machine/grp-import/systemd-export/export-tar.c b/src/grp-machine/grp-import/systemd-export/export-tar.c index 9a8d48dc2e..e2b3c5f2e9 100644 --- a/src/grp-machine/grp-import/systemd-export/export-tar.c +++ b/src/grp-machine/grp-import/systemd-export/export-tar.c @@ -21,14 +21,15 @@ #include "basic/alloc-util.h" #include "basic/btrfs-util.h" -#include "export-tar.h" #include "basic/fd-util.h" #include "basic/fileio.h" -#include "import-common.h" #include "basic/process-util.h" #include "basic/ratelimit.h" #include "basic/string-util.h" #include "basic/util.h" +#include "import-common.h" + +#include "export-tar.h" #define COPY_BUFFER_SIZE (16*1024) diff --git a/src/grp-machine/grp-import/systemd-export/export-tar.h b/src/grp-machine/grp-import/systemd-export/export-tar.h index 0a59033d5b..9efde8931d 100644 --- a/src/grp-machine/grp-import/systemd-export/export-tar.h +++ b/src/grp-machine/grp-import/systemd-export/export-tar.h @@ -21,8 +21,8 @@ #include <systemd/sd-event.h> -#include "import-compress.h" #include "basic/macro.h" +#include "import-compress.h" typedef struct TarExport TarExport; diff --git a/src/grp-machine/grp-import/systemd-export/export.c b/src/grp-machine/grp-import/systemd-export/export.c index a64b79bba0..5db164c7d1 100644 --- a/src/grp-machine/grp-import/systemd-export/export.c +++ b/src/grp-machine/grp-import/systemd-export/export.c @@ -22,16 +22,17 @@ #include <systemd/sd-event.h> #include "basic/alloc-util.h" -#include "export-raw.h" -#include "export-tar.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" +#include "shared/import-util.h" +#include "shared/machine-image.h" + +#include "export-raw.h" +#include "export-tar.h" static ImportCompressType arg_compress = IMPORT_COMPRESS_UNKNOWN; diff --git a/src/grp-machine/grp-import/systemd-import/import-common.c b/src/grp-machine/grp-import/systemd-import/import-common.c index c2baef83f8..cd69e900ec 100644 --- a/src/grp-machine/grp-import/systemd-import/import-common.c +++ b/src/grp-machine/grp-import/systemd-import/import-common.c @@ -25,10 +25,11 @@ #include "basic/btrfs-util.h" #include "basic/capability-util.h" #include "basic/fd-util.h" -#include "import-common.h" #include "basic/signal-util.h" #include "basic/util.h" +#include "import-common.h" + int import_make_read_only_fd(int fd) { int r; diff --git a/src/grp-machine/grp-import/systemd-import/import-compress.c b/src/grp-machine/grp-import/systemd-import/import-compress.c index 05643cfbaf..4f1a9891e8 100644 --- a/src/grp-machine/grp-import/systemd-import/import-compress.c +++ b/src/grp-machine/grp-import/systemd-import/import-compress.c @@ -17,10 +17,11 @@ along with systemd; If not, see <http://www.gnu.org/licenses/>. ***/ -#include "import-compress.h" #include "basic/string-table.h" #include "basic/util.h" +#include "import-compress.h" + void import_compress_free(ImportCompress *c) { assert(c); diff --git a/src/grp-machine/grp-import/systemd-import/import-raw.c b/src/grp-machine/grp-import/systemd-import/import-raw.c index 0bbae2aa8a..658c912f88 100644 --- a/src/grp-machine/grp-import/systemd-import/import-raw.c +++ b/src/grp-machine/grp-import/systemd-import/import-raw.c @@ -30,18 +30,19 @@ #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 "basic/io-util.h" -#include "shared/machine-pool.h" #include "basic/mkdir.h" #include "basic/path-util.h" -#include "qcow2-util.h" #include "basic/ratelimit.h" #include "basic/rm-rf.h" #include "basic/string-util.h" #include "basic/util.h" +#include "qcow2-util.h" +#include "shared/machine-pool.h" + +#include "import-common.h" +#include "import-compress.h" +#include "import-raw.h" struct RawImport { sd_event *event; diff --git a/src/grp-machine/grp-import/systemd-import/import-raw.h b/src/grp-machine/grp-import/systemd-import/import-raw.h index a3bc532d37..61ec8cc91e 100644 --- a/src/grp-machine/grp-import/systemd-import/import-raw.h +++ b/src/grp-machine/grp-import/systemd-import/import-raw.h @@ -21,8 +21,8 @@ #include <systemd/sd-event.h> -#include "shared/import-util.h" #include "basic/macro.h" +#include "shared/import-util.h" typedef struct RawImport RawImport; diff --git a/src/grp-machine/grp-import/systemd-import/import-tar.c b/src/grp-machine/grp-import/systemd-import/import-tar.c index 8848beb11b..f66a7e7e4c 100644 --- a/src/grp-machine/grp-import/systemd-import/import-tar.c +++ b/src/grp-machine/grp-import/systemd-import/import-tar.c @@ -29,19 +29,20 @@ #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 "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 "basic/ratelimit.h" #include "basic/rm-rf.h" #include "basic/string-util.h" #include "basic/util.h" +#include "qcow2-util.h" +#include "shared/machine-pool.h" + +#include "import-common.h" +#include "import-compress.h" +#include "import-tar.h" struct TarImport { sd_event *event; diff --git a/src/grp-machine/grp-import/systemd-import/import-tar.h b/src/grp-machine/grp-import/systemd-import/import-tar.h index 90ab082f1a..35a08fcfc5 100644 --- a/src/grp-machine/grp-import/systemd-import/import-tar.h +++ b/src/grp-machine/grp-import/systemd-import/import-tar.h @@ -21,8 +21,8 @@ #include <systemd/sd-event.h> -#include "shared/import-util.h" #include "basic/macro.h" +#include "shared/import-util.h" typedef struct TarImport TarImport; diff --git a/src/grp-machine/grp-import/systemd-import/import.c b/src/grp-machine/grp-import/systemd-import/import.c index 6c76c639c3..6744006312 100644 --- a/src/grp-machine/grp-import/systemd-import/import.c +++ b/src/grp-machine/grp-import/systemd-import/import.c @@ -25,13 +25,14 @@ #include "basic/fd-util.h" #include "basic/fs-util.h" #include "basic/hostname-util.h" -#include "import-raw.h" -#include "import-tar.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" +#include "shared/import-util.h" +#include "shared/machine-image.h" + +#include "import-raw.h" +#include "import-tar.h" static bool arg_force = false; static bool arg_read_only = false; diff --git a/src/grp-machine/grp-import/systemd-importd/importd.c b/src/grp-machine/grp-import/systemd-importd/importd.c index f9fe1038cd..e790c0c475 100644 --- a/src/grp-machine/grp-import/systemd-importd/importd.c +++ b/src/grp-machine/grp-import/systemd-importd/importd.c @@ -22,13 +22,9 @@ #include <systemd/sd-bus.h> #include "basic/alloc-util.h" -#include "bus-common-errors.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" @@ -42,6 +38,10 @@ #include "basic/user-util.h" #include "basic/util.h" #include "basic/web-util.h" +#include "sd-bus/bus-common-errors.h" +#include "shared/bus-util.h" +#include "shared/import-util.h" +#include "shared/machine-pool.h" typedef struct Transfer Transfer; typedef struct Manager Manager; diff --git a/src/grp-machine/grp-import/systemd-pull/pull-common.c b/src/grp-machine/grp-import/systemd-pull/pull-common.c index fb167fd93c..f5815c216d 100644 --- a/src/grp-machine/grp-import/systemd-pull/pull-common.c +++ b/src/grp-machine/grp-import/systemd-pull/pull-common.c @@ -29,8 +29,6 @@ #include "basic/io-util.h" #include "basic/path-util.h" #include "basic/process-util.h" -#include "pull-common.h" -#include "pull-job.h" #include "basic/rm-rf.h" #include "basic/signal-util.h" #include "basic/siphash24.h" @@ -39,6 +37,9 @@ #include "basic/util.h" #include "basic/web-util.h" +#include "pull-common.h" +#include "pull-job.h" + #define FILENAME_ESCAPE "/.#\"\'" #define HASH_URL_THRESHOLD_LENGTH (_POSIX_PATH_MAX - 16) diff --git a/src/grp-machine/grp-import/systemd-pull/pull-common.h b/src/grp-machine/grp-import/systemd-pull/pull-common.h index d9cfb6b3c1..96198a695a 100644 --- a/src/grp-machine/grp-import/systemd-pull/pull-common.h +++ b/src/grp-machine/grp-import/systemd-pull/pull-common.h @@ -22,6 +22,7 @@ #include <stdbool.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-machine/grp-import/systemd-pull/pull-job.c b/src/grp-machine/grp-import/systemd-pull/pull-job.c index fce08f65d9..3735304e6d 100644 --- a/src/grp-machine/grp-import/systemd-pull/pull-job.c +++ b/src/grp-machine/grp-import/systemd-pull/pull-job.c @@ -23,12 +23,13 @@ #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 "basic/string-util.h" #include "basic/strv.h" #include "basic/xattr-util.h" +#include "shared/machine-pool.h" + +#include "pull-job.h" PullJob* pull_job_unref(PullJob *j) { if (!j) diff --git a/src/grp-machine/grp-import/systemd-pull/pull-job.h b/src/grp-machine/grp-import/systemd-pull/pull-job.h index 80d7370ff1..d8308e4046 100644 --- a/src/grp-machine/grp-import/systemd-pull/pull-job.h +++ b/src/grp-machine/grp-import/systemd-pull/pull-job.h @@ -21,9 +21,9 @@ #include <gcrypt.h> +#include "basic/macro.h" #include "curl-util.h" #include "import-compress.h" -#include "basic/macro.h" typedef struct PullJob PullJob; diff --git a/src/grp-machine/grp-import/systemd-pull/pull-raw.c b/src/grp-machine/grp-import/systemd-pull/pull-raw.c index a9777a5838..acf26567d3 100644 --- a/src/grp-machine/grp-import/systemd-pull/pull-raw.c +++ b/src/grp-machine/grp-import/systemd-pull/pull-raw.c @@ -27,26 +27,27 @@ #include "basic/btrfs-util.h" #include "basic/chattr-util.h" #include "basic/copy.h" -#include "curl-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 "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 "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" +#include "curl-util.h" +#include "import-common.h" +#include "qcow2-util.h" +#include "shared/import-util.h" + +#include "pull-common.h" +#include "pull-job.h" +#include "pull-raw.h" typedef enum RawProgress { RAW_DOWNLOADING, diff --git a/src/grp-machine/grp-import/systemd-pull/pull-raw.h b/src/grp-machine/grp-import/systemd-pull/pull-raw.h index 84cd146647..47ed499c12 100644 --- a/src/grp-machine/grp-import/systemd-pull/pull-raw.h +++ b/src/grp-machine/grp-import/systemd-pull/pull-raw.h @@ -21,8 +21,8 @@ #include <systemd/sd-event.h> -#include "shared/import-util.h" #include "basic/macro.h" +#include "shared/import-util.h" typedef struct RawPull RawPull; diff --git a/src/grp-machine/grp-import/systemd-pull/pull-tar.c b/src/grp-machine/grp-import/systemd-pull/pull-tar.c index 576bda5a3d..e6031db0ed 100644 --- a/src/grp-machine/grp-import/systemd-pull/pull-tar.c +++ b/src/grp-machine/grp-import/systemd-pull/pull-tar.c @@ -25,26 +25,27 @@ #include "basic/alloc-util.h" #include "basic/btrfs-util.h" #include "basic/copy.h" -#include "curl-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 "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 "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" +#include "curl-util.h" +#include "import-common.h" +#include "shared/import-util.h" + +#include "pull-common.h" +#include "pull-job.h" +#include "pull-tar.h" typedef enum TarProgress { TAR_DOWNLOADING, diff --git a/src/grp-machine/grp-import/systemd-pull/pull-tar.h b/src/grp-machine/grp-import/systemd-pull/pull-tar.h index addd1f861c..a2850fee9e 100644 --- a/src/grp-machine/grp-import/systemd-pull/pull-tar.h +++ b/src/grp-machine/grp-import/systemd-pull/pull-tar.h @@ -21,8 +21,8 @@ #include <systemd/sd-event.h> -#include "shared/import-util.h" #include "basic/macro.h" +#include "shared/import-util.h" typedef struct TarPull TarPull; diff --git a/src/grp-machine/grp-import/systemd-pull/pull.c b/src/grp-machine/grp-import/systemd-pull/pull.c index fa2af2fc02..166f91d6e1 100644 --- a/src/grp-machine/grp-import/systemd-pull/pull.c +++ b/src/grp-machine/grp-import/systemd-pull/pull.c @@ -23,15 +23,16 @@ #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 "basic/signal-util.h" #include "basic/string-util.h" #include "basic/verbs.h" #include "basic/web-util.h" +#include "shared/import-util.h" +#include "shared/machine-image.h" + +#include "pull-raw.h" +#include "pull-tar.h" static bool arg_force = false; static const char *arg_image_root = "/var/lib/machines"; diff --git a/src/grp-machine/grp-import/test-qcow2.c b/src/grp-machine/grp-import/test-qcow2.c index 0a256d7f41..15d7c29aef 100644 --- a/src/grp-machine/grp-import/test-qcow2.c +++ b/src/grp-machine/grp-import/test-qcow2.c @@ -19,9 +19,10 @@ #include "basic/fd-util.h" #include "basic/log.h" -#include "qcow2-util.h" #include "basic/util.h" +#include "qcow2-util.h" + int main(int argc, char *argv[]) { _cleanup_close_ int sfd = -1, dfd = -1; int r; diff --git a/src/grp-machine/libmachine-core/image-dbus.c b/src/grp-machine/libmachine-core/image-dbus.c index 13630fb881..584777e5ad 100644 --- a/src/grp-machine/libmachine-core/image-dbus.c +++ b/src/grp-machine/libmachine-core/image-dbus.c @@ -19,14 +19,15 @@ #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 "basic/io-util.h" -#include "shared/machine-image.h" #include "basic/process-util.h" #include "basic/strv.h" #include "basic/user-util.h" +#include "shared/bus-util.h" +#include "shared/machine-image.h" + +#include "image-dbus.h" static BUS_DEFINE_PROPERTY_GET_ENUM(property_get_type, image_type, ImageType); diff --git a/src/grp-machine/libmachine-core/machine.c b/src/grp-machine/libmachine-core/machine.c index e238983397..82d8f66395 100644 --- a/src/grp-machine/libmachine-core/machine.c +++ b/src/grp-machine/libmachine-core/machine.c @@ -24,16 +24,12 @@ #include <systemd/sd-messages.h> #include "basic/alloc-util.h" -#include "bus-error.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 "basic/mkdir.h" #include "basic/parse-util.h" #include "basic/process-util.h" @@ -42,6 +38,11 @@ #include "basic/terminal-util.h" #include "basic/unit-name.h" #include "basic/util.h" +#include "sd-bus/bus-error.h" +#include "shared/bus-util.h" + +#include "machine-dbus.h" +#include "machine.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 c61b00b39f..cba0311c23 100644 --- a/src/grp-machine/libmachine-core/machine.h +++ b/src/grp-machine/libmachine-core/machine.h @@ -23,6 +23,7 @@ typedef struct Machine Machine; typedef enum KillWho KillWho; #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 7b6d8f77ac..7caecd43a0 100644 --- a/src/grp-machine/libmachine-core/machined-dbus.c +++ b/src/grp-machine/libmachine-core/machined-dbus.c @@ -25,24 +25,25 @@ #include "basic/alloc-util.h" #include "basic/btrfs-util.h" -#include "bus-common-errors.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 "basic/io-util.h" -#include "machine-dbus.h" -#include "shared/machine-image.h" -#include "shared/machine-pool.h" -#include "machined.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" +#include "sd-bus/bus-common-errors.h" +#include "shared/bus-util.h" +#include "shared/machine-image.h" +#include "shared/machine-pool.h" + +#include "image-dbus.h" +#include "machine-dbus.h" +#include "machined.h" static int property_get_pool_path( sd_bus *bus, diff --git a/src/grp-machine/libmachine-core/operation.c b/src/grp-machine/libmachine-core/operation.c index 69f6db2866..f1bcb1d860 100644 --- a/src/grp-machine/libmachine-core/operation.c +++ b/src/grp-machine/libmachine-core/operation.c @@ -19,9 +19,10 @@ #include "basic/alloc-util.h" #include "basic/fd-util.h" -#include "operation.h" #include "basic/process-util.h" +#include "operation.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; Operation *o = userdata; diff --git a/src/grp-machine/libmachine-core/test-machine-tables.c b/src/grp-machine/libmachine-core/test-machine-tables.c index 4f87a7d06b..7d44c55a4b 100644 --- a/src/grp-machine/libmachine-core/test-machine-tables.c +++ b/src/grp-machine/libmachine-core/test-machine-tables.c @@ -17,9 +17,10 @@ along with systemd; If not, see <http://www.gnu.org/licenses/>. ***/ -#include "machine.h" #include "shared/test-tables.h" +#include "machine.h" + int main(int argc, char **argv) { test_table(machine_class, MACHINE_CLASS); test_table(machine_state, MACHINE_STATE); diff --git a/src/grp-machine/machinectl/machinectl.c b/src/grp-machine/machinectl/machinectl.c index 30a0668f75..fa607c57e4 100644 --- a/src/grp-machine/machinectl/machinectl.c +++ b/src/grp-machine/machinectl/machinectl.c @@ -32,33 +32,33 @@ #include <systemd/sd-bus.h> #include "basic/alloc-util.h" -#include "bus-error.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" +#include "sd-bus/bus-error.h" +#include "shared/bus-unit-util.h" +#include "shared/bus-util.h" +#include "shared/cgroup-show.h" +#include "shared/import-util.h" +#include "shared/logs-show.h" +#include "shared/pager.h" +#include "shared/ptyfwd.h" +#include "shared/spawn-polkit-agent.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 bf36fbfb02..0bcdd45d37 100644 --- a/src/grp-machine/nss-mymachines/nss-mymachines.c +++ b/src/grp-machine/nss-mymachines/nss-mymachines.c @@ -24,7 +24,6 @@ #include <systemd/sd-login.h> #include "basic/alloc-util.h" -#include "bus-common-errors.h" #include "basic/hostname-util.h" #include "basic/in-addr-util.h" #include "basic/macro.h" @@ -33,6 +32,7 @@ #include "basic/string-util.h" #include "basic/user-util.h" #include "basic/util.h" +#include "sd-bus/bus-common-errors.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 ae83e116bb..54fc3d812b 100644 --- a/src/grp-machine/systemd-machined/machined.c +++ b/src/grp-machine/systemd-machined/machined.c @@ -24,17 +24,17 @@ #include <systemd/sd-daemon.h> #include "basic/alloc-util.h" -#include "bus-error.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 "basic/signal-util.h" +#include "machined.h" +#include "sd-bus/bus-error.h" +#include "shared/bus-util.h" +#include "shared/machine-image.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 407ef06a09..7b57f6be0e 100644 --- a/src/grp-network/libnetworkd-core/networkd-address-pool.c +++ b/src/grp-network/libnetworkd-core/networkd-address-pool.c @@ -18,11 +18,12 @@ ***/ #include "basic/alloc-util.h" -#include "networkd-address-pool.h" -#include "networkd.h" #include "basic/set.h" #include "basic/string-util.h" +#include "networkd-address-pool.h" +#include "networkd.h" + int address_pool_new( Manager *m, AddressPool **ret, diff --git a/src/grp-network/libnetworkd-core/networkd-address.c b/src/grp-network/libnetworkd-core/networkd-address.c index 03b4a3f1b7..3c814db91b 100644 --- a/src/grp-network/libnetworkd-core/networkd-address.c +++ b/src/grp-network/libnetworkd-core/networkd-address.c @@ -20,17 +20,18 @@ #include <net/if.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 "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" +#include "firewall-util.h" +#include "sd-netlink/netlink-util.h" +#include "shared/conf-parser.h" + +#include "networkd-address.h" +#include "networkd.h" int address_new(Address **ret) { _cleanup_address_free_ Address *address = NULL; diff --git a/src/grp-network/libnetworkd-core/networkd-conf.c b/src/grp-network/libnetworkd-core/networkd-conf.c index e022e313e1..e9993f9f32 100644 --- a/src/grp-network/libnetworkd-core/networkd-conf.c +++ b/src/grp-network/libnetworkd-core/networkd-conf.c @@ -19,12 +19,13 @@ #include <ctype.h> -#include "shared/conf-parser.h" #include "basic/def.h" -#include "systemd-network/dhcp-identifier.h" #include "basic/hexdecoct.h" -#include "networkd-conf.h" #include "basic/string-table.h" +#include "shared/conf-parser.h" +#include "systemd-network/dhcp-identifier.h" + +#include "networkd-conf.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 4fbd9644cd..b74541ed11 100644 --- a/src/grp-network/libnetworkd-core/networkd-dhcp4.c +++ b/src/grp-network/libnetworkd-core/networkd-dhcp4.c @@ -17,13 +17,14 @@ along with systemd; If not, see <http://www.gnu.org/licenses/>. ***/ -#include <netinet/ether.h> #include <linux/if.h> +#include <netinet/ether.h> #include "basic/alloc-util.h" -#include "systemd-network/dhcp-lease-internal.h" #include "basic/hostname-util.h" +#include "systemd-network/dhcp-lease-internal.h" #include "systemd-network/network-internal.h" + #include "networkd.h" static int dhcp4_route_handler(sd_netlink *rtnl, sd_netlink_message *m, diff --git a/src/grp-network/libnetworkd-core/networkd-dhcp6.c b/src/grp-network/libnetworkd-core/networkd-dhcp6.c index c3d8f1df08..cf2f4e3af5 100644 --- a/src/grp-network/libnetworkd-core/networkd-dhcp6.c +++ b/src/grp-network/libnetworkd-core/networkd-dhcp6.c @@ -17,11 +17,12 @@ along with systemd; If not, see <http://www.gnu.org/licenses/>. ***/ -#include <netinet/ether.h> #include <linux/if.h> +#include <netinet/ether.h> -#include "systemd-network/sd-dhcp6-client.h" #include "systemd-network/network-internal.h" +#include "systemd-network/sd-dhcp6-client.h" + #include "networkd.h" static int dhcp6_lease_address_acquired(sd_dhcp6_client *client, Link *link); diff --git a/src/grp-network/libnetworkd-core/networkd-fdb.c b/src/grp-network/libnetworkd-core/networkd-fdb.c index 75fccea6b9..5f6146d52c 100644 --- a/src/grp-network/libnetworkd-core/networkd-fdb.c +++ b/src/grp-network/libnetworkd-core/networkd-fdb.c @@ -21,11 +21,12 @@ #include <net/if.h> #include "basic/alloc-util.h" +#include "basic/util.h" +#include "sd-netlink/netlink-util.h" #include "shared/conf-parser.h" -#include "netlink-util.h" + #include "networkd-fdb.h" #include "networkd.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-ipv4ll.c b/src/grp-network/libnetworkd-core/networkd-ipv4ll.c index c82525788d..ac7266d0cf 100644 --- a/src/grp-network/libnetworkd-core/networkd-ipv4ll.c +++ b/src/grp-network/libnetworkd-core/networkd-ipv4ll.c @@ -17,10 +17,11 @@ along with systemd; If not, see <http://www.gnu.org/licenses/>. ***/ -#include <netinet/ether.h> #include <linux/if.h> +#include <netinet/ether.h> #include "systemd-network/network-internal.h" + #include "networkd.h" static int ipv4ll_address_lost(Link *link) { diff --git a/src/grp-network/libnetworkd-core/networkd-link-bus.c b/src/grp-network/libnetworkd-core/networkd-link-bus.c index 86fff49be0..aa352f447a 100644 --- a/src/grp-network/libnetworkd-core/networkd-link-bus.c +++ b/src/grp-network/libnetworkd-core/networkd-link-bus.c @@ -18,11 +18,12 @@ ***/ #include "basic/alloc-util.h" +#include "basic/parse-util.h" +#include "basic/strv.h" #include "shared/bus-util.h" + #include "networkd-link.h" #include "networkd.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 45ff76c5ec..53c3712cb6 100644 --- a/src/grp-network/libnetworkd-core/networkd-link.c +++ b/src/grp-network/libnetworkd-core/networkd-link.c @@ -17,26 +17,27 @@ along with systemd; If not, see <http://www.gnu.org/licenses/>. ***/ -#include <netinet/ether.h> #include <linux/if.h> +#include <netinet/ether.h> #include <unistd.h> #include "basic/alloc-util.h" -#include "shared/bus-util.h" -#include "systemd-network/dhcp-lease-internal.h" #include "basic/fd-util.h" #include "basic/fileio.h" -#include "netlink-util.h" -#include "systemd-network/network-internal.h" -#include "networkd.h" -#include "networkd-lldp-tx.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" +#include "sd-netlink/netlink-util.h" +#include "shared/bus-util.h" +#include "shared/udev-util.h" +#include "systemd-network/dhcp-lease-internal.h" +#include "systemd-network/network-internal.h" + +#include "networkd-lldp-tx.h" +#include "networkd.h" static bool link_dhcp6_enabled(Link *link) { assert(link); diff --git a/src/grp-network/libnetworkd-core/networkd-lldp-tx.c b/src/grp-network/libnetworkd-core/networkd-lldp-tx.c index 52c056e694..6a015ec24f 100644 --- a/src/grp-network/libnetworkd-core/networkd-lldp-tx.c +++ b/src/grp-network/libnetworkd-core/networkd-lldp-tx.c @@ -25,14 +25,15 @@ #include "basic/fd-util.h" #include "basic/fileio.h" #include "basic/hostname-util.h" -#include "networkd-lldp-tx.h" -#include "networkd.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" +#include "networkd-lldp-tx.h" +#include "networkd.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 b6cbba5a85..53652953fe 100644 --- a/src/grp-network/libnetworkd-core/networkd-manager-bus.c +++ b/src/grp-network/libnetworkd-core/networkd-manager-bus.c @@ -19,6 +19,7 @@ #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 8f57e890ae..5ce81223bf 100644 --- a/src/grp-network/libnetworkd-core/networkd-manager.c +++ b/src/grp-network/libnetworkd-core/networkd-manager.c @@ -17,8 +17,8 @@ along with systemd; If not, see <http://www.gnu.org/licenses/>. ***/ -#include <sys/socket.h> #include <linux/if.h> +#include <sys/socket.h> #include <systemd/sd-daemon.h> @@ -30,15 +30,15 @@ #include "basic/path-util.h" #include "basic/set.h" #include "basic/virt.h" +#include "libudev-private.h" +#include "sd-netlink/local-addresses.h" +#include "sd-netlink/netlink-util.h" #include "sd-netlink/sd-netlink.h" #include "shared/bus-util.h" #include "shared/conf-parser.h" #include "shared/dns-domain.h" #include "shared/udev-util.h" -#include "libudev-private.h" -#include "local-addresses.h" -#include "netlink-util.h" #include "networkd.h" /* use 8 MB for receive socket kernel queue. */ diff --git a/src/grp-network/libnetworkd-core/networkd-ndisc.c b/src/grp-network/libnetworkd-core/networkd-ndisc.c index 1033ccc342..5480cc465d 100644 --- a/src/grp-network/libnetworkd-core/networkd-ndisc.c +++ b/src/grp-network/libnetworkd-core/networkd-ndisc.c @@ -17,10 +17,10 @@ along with systemd; If not, see <http://www.gnu.org/licenses/>. ***/ +#include <linux/if.h> #include <netinet/ether.h> #include <netinet/icmp6.h> #include <netinet/in.h> -#include <linux/if.h> #include "systemd-network/sd-ndisc.h" diff --git a/src/grp-network/libnetworkd-core/networkd-netdev-bond.c b/src/grp-network/libnetworkd-core/networkd-netdev-bond.c index 6f55c3ee06..12e5e58159 100644 --- a/src/grp-network/libnetworkd-core/networkd-netdev-bond.c +++ b/src/grp-network/libnetworkd-core/networkd-netdev-bond.c @@ -18,8 +18,8 @@ along with systemd; If not, see <http://www.gnu.org/licenses/>. ***/ -#include <netinet/ether.h> #include <linux/if_bonding.h> +#include <netinet/ether.h> #include "basic/alloc-util.h" #include "basic/extract-word.h" diff --git a/src/grp-network/libnetworkd-core/networkd-netdev-bridge.c b/src/grp-network/libnetworkd-core/networkd-netdev-bridge.c index bb07ec59a6..54ef059df0 100644 --- a/src/grp-network/libnetworkd-core/networkd-netdev-bridge.c +++ b/src/grp-network/libnetworkd-core/networkd-netdev-bridge.c @@ -21,9 +21,10 @@ #include <net/if.h> #include "basic/missing.h" -#include "netlink-util.h" -#include "networkd.h" +#include "sd-netlink/netlink-util.h" + #include "networkd-netdev-bridge.h" +#include "networkd.h" /* callback for brige netdev's parameter set */ static int netdev_bridge_set_handler(sd_netlink *rtnl, sd_netlink_message *m, void *userdata) { diff --git a/src/grp-network/libnetworkd-core/networkd-netdev-ipvlan.c b/src/grp-network/libnetworkd-core/networkd-netdev-ipvlan.c index e388fa6567..724fc86f92 100644 --- a/src/grp-network/libnetworkd-core/networkd-netdev-ipvlan.c +++ b/src/grp-network/libnetworkd-core/networkd-netdev-ipvlan.c @@ -19,9 +19,10 @@ #include <net/if.h> +#include "basic/string-table.h" #include "shared/conf-parser.h" + #include "networkd-netdev-ipvlan.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 00ad769756..a7ccd4922a 100644 --- a/src/grp-network/libnetworkd-core/networkd-netdev-ipvlan.h +++ b/src/grp-network/libnetworkd-core/networkd-netdev-ipvlan.h @@ -20,6 +20,7 @@ ***/ #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 030ec51b15..bf559f1b46 100644 --- a/src/grp-network/libnetworkd-core/networkd-netdev-macvlan.c +++ b/src/grp-network/libnetworkd-core/networkd-netdev-macvlan.c @@ -19,9 +19,10 @@ #include <net/if.h> +#include "basic/string-table.h" #include "shared/conf-parser.h" + #include "networkd-netdev-macvlan.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 1ede86737f..eaee167506 100644 --- a/src/grp-network/libnetworkd-core/networkd-netdev-tunnel.c +++ b/src/grp-network/libnetworkd-core/networkd-netdev-tunnel.c @@ -18,10 +18,10 @@ ***/ #include <arpa/inet.h> -#include <net/if.h> -#include <linux/ip.h> #include <linux/if_tunnel.h> +#include <linux/ip.h> #include <linux/ip6_tunnel.h> +#include <net/if.h> #include "basic/missing.h" #include "basic/parse-util.h" diff --git a/src/grp-network/libnetworkd-core/networkd-netdev-tuntap.c b/src/grp-network/libnetworkd-core/networkd-netdev-tuntap.c index 1f0752cd0a..5232f77ba8 100644 --- a/src/grp-network/libnetworkd-core/networkd-netdev-tuntap.c +++ b/src/grp-network/libnetworkd-core/networkd-netdev-tuntap.c @@ -27,9 +27,10 @@ #include "basic/alloc-util.h" #include "basic/fd-util.h" -#include "networkd-netdev-tuntap.h" #include "basic/user-util.h" +#include "networkd-netdev-tuntap.h" + #define TUN_DEV "/dev/net/tun" static int netdev_fill_tuntap_message(NetDev *netdev, struct ifreq *ifr) { diff --git a/src/grp-network/libnetworkd-core/networkd-netdev-veth.c b/src/grp-network/libnetworkd-core/networkd-netdev-veth.c index 185b441c5a..b25d468aa4 100644 --- a/src/grp-network/libnetworkd-core/networkd-netdev-veth.c +++ b/src/grp-network/libnetworkd-core/networkd-netdev-veth.c @@ -17,10 +17,10 @@ along with systemd; If not, see <http://www.gnu.org/licenses/>. ***/ -#include <net/if.h> #include <linux/veth.h> +#include <net/if.h> -#include <systemd/sd-netlink.h> +#include "sd-netlink/sd-netlink.h" #include "networkd-netdev-veth.h" diff --git a/src/grp-network/libnetworkd-core/networkd-netdev-vxlan.c b/src/grp-network/libnetworkd-core/networkd-netdev-vxlan.c index 1a36e8609f..8c611ac5db 100644 --- a/src/grp-network/libnetworkd-core/networkd-netdev-vxlan.c +++ b/src/grp-network/libnetworkd-core/networkd-netdev-vxlan.c @@ -19,13 +19,12 @@ #include <net/if.h> -#include <systemd/sd-netlink.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 "basic/parse-util.h" +#include "sd-netlink/sd-netlink.h" +#include "shared/conf-parser.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 097e4e2369..6e8393145e 100644 --- a/src/grp-network/libnetworkd-core/networkd-netdev-vxlan.h +++ b/src/grp-network/libnetworkd-core/networkd-netdev-vxlan.h @@ -22,6 +22,7 @@ typedef struct VxLan VxLan; #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 dc4cad9c33..c421042196 100644 --- a/src/grp-network/libnetworkd-core/networkd-netdev.c +++ b/src/grp-network/libnetworkd-core/networkd-netdev.c @@ -21,17 +21,18 @@ #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 "systemd-network/network-internal.h" -#include "networkd-netdev.h" -#include "networkd.h" #include "basic/siphash24.h" #include "basic/stat-util.h" #include "basic/string-table.h" #include "basic/string-util.h" +#include "sd-netlink/netlink-util.h" +#include "shared/conf-parser.h" +#include "systemd-network/network-internal.h" + +#include "networkd-netdev.h" +#include "networkd.h" const NetDevVTable * const netdev_vtable[_NETDEV_KIND_MAX] = { diff --git a/src/grp-network/libnetworkd-core/networkd-network-bus.c b/src/grp-network/libnetworkd-core/networkd-network-bus.c index f218cf624c..572c0913a9 100644 --- a/src/grp-network/libnetworkd-core/networkd-network-bus.c +++ b/src/grp-network/libnetworkd-core/networkd-network-bus.c @@ -18,10 +18,11 @@ ***/ #include "basic/alloc-util.h" -#include "networkd.h" #include "basic/string-util.h" #include "basic/strv.h" +#include "networkd.h" + static int property_get_ether_addrs( sd_bus *bus, const char *path, diff --git a/src/grp-network/libnetworkd-core/networkd-network.c b/src/grp-network/libnetworkd-core/networkd-network.c index 715be97d13..2895fd4bd9 100644 --- a/src/grp-network/libnetworkd-core/networkd-network.c +++ b/src/grp-network/libnetworkd-core/networkd-network.c @@ -22,19 +22,20 @@ #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 "systemd-network/network-internal.h" -#include "networkd-network.h" -#include "networkd.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" +#include "shared/conf-parser.h" +#include "shared/dns-domain.h" +#include "systemd-network/network-internal.h" + +#include "networkd-network.h" +#include "networkd.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 3d77524bba..fdf76b8924 100644 --- a/src/grp-network/libnetworkd-core/networkd-network.h +++ b/src/grp-network/libnetworkd-core/networkd-network.h @@ -20,12 +20,12 @@ ***/ #include <systemd/sd-bus.h> -#include "udev.h" -#include "shared/condition.h" -#include "systemd-network/dhcp-identifier.h" #include "basic/hashmap.h" +#include "shared/condition.h" #include "shared/resolve-util.h" +#include "systemd-network/dhcp-identifier.h" +#include "udev.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 ee34a7df01..974a7fa847 100644 --- a/src/grp-network/libnetworkd-core/networkd-route.c +++ b/src/grp-network/libnetworkd-core/networkd-route.c @@ -18,15 +18,16 @@ ***/ #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 "basic/parse-util.h" #include "basic/set.h" #include "basic/string-util.h" #include "basic/util.h" +#include "sd-netlink/netlink-util.h" +#include "shared/conf-parser.h" + +#include "networkd-route.h" +#include "networkd.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 7fb2fb26d2..e5a5bce8cb 100644 --- a/src/grp-network/libnetworkd-core/networkd-util.c +++ b/src/grp-network/libnetworkd-core/networkd-util.c @@ -17,12 +17,13 @@ along with systemd; If not, see <http://www.gnu.org/licenses/>. ***/ -#include "shared/conf-parser.h" -#include "networkd-util.h" #include "basic/parse-util.h" #include "basic/string-table.h" #include "basic/string-util.h" #include "basic/util.h" +#include "shared/conf-parser.h" + +#include "networkd-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.h b/src/grp-network/libnetworkd-core/networkd.h index a3ae0b988b..cfee5dd045 100644 --- a/src/grp-network/libnetworkd-core/networkd.h +++ b/src/grp-network/libnetworkd-core/networkd.h @@ -23,12 +23,12 @@ #include <systemd/sd-bus.h> #include <systemd/sd-event.h> -#include <systemd/sd-netlink.h> -#include "udev.h" -#include "systemd-network/dhcp-identifier.h" #include "basic/hashmap.h" #include "basic/list.h" +#include "sd-netlink/sd-netlink.h" +#include "systemd-network/dhcp-identifier.h" +#include "udev.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 205b051f9a..bedcca9a0e 100644 --- a/src/grp-network/networkctl/networkctl.c +++ b/src/grp-network/networkctl/networkctl.c @@ -21,11 +21,6 @@ #include <net/if.h> #include <stdbool.h> -#include <systemd/sd-device.h> -#include <systemd/sd-hwdb.h> -#include <systemd/sd-netlink.h> -#include <systemd/sd-network.h> - #include "basic/alloc-util.h" #include "basic/arphrd-list.h" #include "basic/ether-addr-util.h" @@ -42,14 +37,17 @@ #include "basic/terminal-util.h" #include "basic/util.h" #include "basic/verbs.h" +#include "sd-device/device-util.h" +#include "sd-device/sd-device.h" +#include "sd-hwdb/hwdb-util.h" +#include "sd-hwdb/sd-hwdb.h" +#include "sd-netlink/local-addresses.h" +#include "sd-netlink/netlink-util.h" +#include "sd-netlink/sd-netlink.h" +#include "sd-network/sd-network.h" #include "shared/pager.h" #include "systemd-network/sd-lldp.h" -#include "device-util.h" -#include "hwdb-util.h" -#include "local-addresses.h" -#include "netlink-util.h" - static bool arg_no_pager = false; static bool arg_legend = true; static bool arg_all = false; 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 f03de93540..29384baca3 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 @@ -18,11 +18,11 @@ along with systemd; If not, see <http://www.gnu.org/licenses/>. ***/ -#include <systemd/sd-network.h> - #include "basic/alloc-util.h" -#include "networkd-wait-online-link.h" #include "basic/string-util.h" +#include "sd-network/sd-network.h" + +#include "networkd-wait-online-link.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 d905590936..62ae9e9b4f 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 @@ -17,17 +17,18 @@ along with systemd; If not, see <http://www.gnu.org/licenses/>. ***/ -#include <netinet/ether.h> -#include <linux/if.h> #include <fnmatch.h> +#include <linux/if.h> +#include <netinet/ether.h> #include "basic/alloc-util.h" -#include "netlink-util.h" +#include "basic/time-util.h" +#include "basic/util.h" +#include "sd-netlink/netlink-util.h" #include "systemd-network/network-internal.h" + #include "networkd-wait-online-link.h" #include "networkd-wait-online.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 ac3109ee78..feea7c9f34 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 @@ -22,10 +22,11 @@ #include <systemd/sd-daemon.h> -#include "networkd-wait-online.h" #include "basic/signal-util.h" #include "basic/strv.h" +#include "networkd-wait-online.h" + static bool arg_quiet = false; static usec_t arg_timeout = 120 * USEC_PER_SEC; static char **arg_interfaces = NULL; 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 46d01d2bf3..b0d70a18d0 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 @@ -20,10 +20,10 @@ ***/ #include <systemd/sd-event.h> -#include <systemd/sd-netlink.h> -#include <systemd/sd-network.h> #include "basic/hashmap.h" +#include "sd-netlink/sd-netlink.h" +#include "sd-network/sd-network.h" typedef struct Manager Manager; diff --git a/src/grp-network/systemd-networkd/networkd.c b/src/grp-network/systemd-networkd/networkd.c index 641a1e2f08..4f79dfd409 100644 --- a/src/grp-network/systemd-networkd/networkd.c +++ b/src/grp-network/systemd-networkd/networkd.c @@ -20,10 +20,10 @@ #include <systemd/sd-daemon.h> #include "basic/capability-util.h" -#include "networkd.h" -#include "networkd-conf.h" #include "basic/signal-util.h" #include "basic/user-util.h" +#include "networkd-conf.h" +#include "networkd.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 2bdc2cee7a..366471e8bd 100644 --- a/src/grp-network/test-network-tables.c +++ b/src/grp-network/test-network-tables.c @@ -1,11 +1,11 @@ -#include "systemd-network/dhcp6-internal.h" -#include "systemd-network/dhcp6-protocol.h" #include "ethtool-util.h" -#include "netlink-internal.h" #include "networkd-netdev-bond.h" #include "networkd-netdev-macvlan.h" #include "networkd.h" +#include "sd-netlink/netlink-internal.h" #include "shared/test-tables.h" +#include "systemd-network/dhcp6-internal.h" +#include "systemd-network/dhcp6-protocol.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 b33965286d..a6af304d03 100644 --- a/src/grp-network/test-network.c +++ b/src/grp-network/test-network.c @@ -18,9 +18,9 @@ ***/ #include "basic/alloc-util.h" +#include "networkd.h" #include "systemd-network/dhcp-lease-internal.h" #include "systemd-network/network-internal.h" -#include "networkd.h" static void test_deserialize_in_addr(void) { _cleanup_free_ struct in_addr *addresses = NULL; diff --git a/src/grp-network/test-networkd-conf.c b/src/grp-network/test-networkd-conf.c index 56e9b48f01..d6a24281bb 100644 --- a/src/grp-network/test-networkd-conf.c +++ b/src/grp-network/test-networkd-conf.c @@ -17,12 +17,11 @@ along with systemd; If not, see <http://www.gnu.org/licenses/>. ***/ +#include "basic/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" #include "systemd-network/network-internal.h" diff --git a/src/grp-resolve/nss-resolve/nss-resolve.c b/src/grp-resolve/nss-resolve/nss-resolve.c index 7e10498156..e316803a58 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 "sd-bus/bus-common-errors.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/util.h" -#include "basic/signal-util.h" +#include "sd-bus/bus-common-errors.h" NSS_GETHOSTBYNAME_PROTOTYPES(resolve); NSS_GETHOSTBYADDR_PROTOTYPES(resolve); diff --git a/src/grp-resolve/systemd-resolved/dns-type.c b/src/grp-resolve/systemd-resolved/dns-type.c index 1aa9424222..6d5b9d616f 100644 --- a/src/grp-resolve/systemd-resolved/dns-type.c +++ b/src/grp-resolve/systemd-resolved/dns-type.c @@ -19,10 +19,11 @@ #include <sys/socket.h> -#include "dns-type.h" #include "basic/parse-util.h" #include "basic/string-util.h" +#include "dns-type.h" + typedef const struct { uint16_t type; const char *name; diff --git a/src/grp-resolve/systemd-resolved/resolve-tool.c b/src/grp-resolve/systemd-resolved/resolve-tool.c index f140820e0f..d9f28576b7 100644 --- a/src/grp-resolve/systemd-resolved/resolve-tool.c +++ b/src/grp-resolve/systemd-resolved/resolve-tool.c @@ -24,15 +24,16 @@ #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 "basic/terminal-util.h" +#include "sd-bus/bus-error.h" +#include "shared/bus-util.h" +#include "shared/gcrypt-util.h" + #include "resolved-def.h" #include "resolved-dns-packet.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 ff0bcdfef4..31c6999743 100644 --- a/src/grp-resolve/systemd-resolved/resolved-bus.c +++ b/src/grp-resolve/systemd-resolved/resolved-bus.c @@ -21,6 +21,7 @@ #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 e22f107419..4dc169094b 100644 --- a/src/grp-resolve/systemd-resolved/resolved-conf.c +++ b/src/grp-resolve/systemd-resolved/resolved-conf.c @@ -18,12 +18,13 @@ ***/ #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 "basic/string-util.h" +#include "shared/conf-parser.h" + +#include "resolved-conf.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 f9f7e91c1a..1ade0507db 100644 --- a/src/grp-resolve/systemd-resolved/resolved-dns-answer.c +++ b/src/grp-resolve/systemd-resolved/resolved-dns-answer.c @@ -18,10 +18,11 @@ ***/ #include "basic/alloc-util.h" +#include "basic/string-util.h" #include "shared/dns-domain.h" + #include "resolved-dns-answer.h" #include "resolved-dns-dnssec.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 b08fef39f5..920a3136d8 100644 --- a/src/grp-resolve/systemd-resolved/resolved-dns-answer.h +++ b/src/grp-resolve/systemd-resolved/resolved-dns-answer.h @@ -23,6 +23,7 @@ typedef struct DnsAnswer DnsAnswer; typedef struct DnsAnswerItem DnsAnswerItem; #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 0527c57e1c..8ef2048c49 100644 --- a/src/grp-resolve/systemd-resolved/resolved-dns-cache.c +++ b/src/grp-resolve/systemd-resolved/resolved-dns-cache.c @@ -21,11 +21,12 @@ #include "basic/af-list.h" #include "basic/alloc-util.h" +#include "basic/string-util.h" #include "shared/dns-domain.h" + #include "resolved-dns-answer.h" #include "resolved-dns-cache.h" #include "resolved-dns-packet.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-dnssec.h b/src/grp-resolve/systemd-resolved/resolved-dns-dnssec.h index c2ebff767f..81879e287f 100644 --- a/src/grp-resolve/systemd-resolved/resolved-dns-dnssec.h +++ b/src/grp-resolve/systemd-resolved/resolved-dns-dnssec.h @@ -23,6 +23,7 @@ typedef enum DnssecResult DnssecResult; typedef enum DnssecVerdict DnssecVerdict; #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 b379b2bb97..37c0244b7e 100644 --- a/src/grp-resolve/systemd-resolved/resolved-dns-packet.c +++ b/src/grp-resolve/systemd-resolved/resolved-dns-packet.c @@ -18,13 +18,14 @@ ***/ #include "basic/alloc-util.h" -#include "shared/dns-domain.h" -#include "resolved-dns-packet.h" #include "basic/string-table.h" #include "basic/strv.h" #include "basic/unaligned.h" #include "basic/utf8.h" #include "basic/util.h" +#include "shared/dns-domain.h" + +#include "resolved-dns-packet.h" #define EDNS0_OPT_DO (1<<15) diff --git a/src/grp-resolve/systemd-resolved/resolved-dns-query.c b/src/grp-resolve/systemd-resolved/resolved-dns-query.c index 0a62571af7..f512748f8d 100644 --- a/src/grp-resolve/systemd-resolved/resolved-dns-query.c +++ b/src/grp-resolve/systemd-resolved/resolved-dns-query.c @@ -18,14 +18,15 @@ ***/ #include "basic/alloc-util.h" -#include "shared/dns-domain.h" -#include "dns-type.h" #include "basic/hostname-util.h" +#include "basic/string-util.h" #include "sd-netlink/local-addresses.h" +#include "shared/dns-domain.h" + +#include "dns-type.h" #include "resolved-dns-query.h" #include "resolved-dns-synthesize.h" #include "resolved-etc-hosts.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-question.c b/src/grp-resolve/systemd-resolved/resolved-dns-question.c index cdbbecc488..ee53dbff9d 100644 --- a/src/grp-resolve/systemd-resolved/resolved-dns-question.c +++ b/src/grp-resolve/systemd-resolved/resolved-dns-question.c @@ -19,6 +19,7 @@ #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 68f9e019b6..3f9aa8fbe0 100644 --- a/src/grp-resolve/systemd-resolved/resolved-dns-question.h +++ b/src/grp-resolve/systemd-resolved/resolved-dns-question.h @@ -22,6 +22,7 @@ typedef struct DnsQuestion DnsQuestion; #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 e53b2c1831..c6a60b65b7 100644 --- a/src/grp-resolve/systemd-resolved/resolved-dns-rr.c +++ b/src/grp-resolve/systemd-resolved/resolved-dns-rr.c @@ -20,17 +20,18 @@ #include <math.h> #include "basic/alloc-util.h" -#include "shared/dns-domain.h" -#include "dns-type.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 "basic/string-table.h" #include "basic/string-util.h" #include "basic/strv.h" #include "basic/terminal-util.h" +#include "shared/dns-domain.h" + +#include "dns-type.h" +#include "resolved-dns-dnssec.h" +#include "resolved-dns-packet.h" +#include "resolved-dns-rr.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 b919de63ef..daf9c8c210 100644 --- a/src/grp-resolve/systemd-resolved/resolved-dns-rr.h +++ b/src/grp-resolve/systemd-resolved/resolved-dns-rr.h @@ -22,12 +22,13 @@ #include <netinet/in.h> #include "basic/bitmap.h" -#include "dns-type.h" #include "basic/hashmap.h" #include "basic/in-addr-util.h" #include "basic/list.h" #include "basic/string-util.h" +#include "dns-type.h" + typedef struct DnsResourceKey DnsResourceKey; typedef struct DnsResourceRecord DnsResourceRecord; typedef struct DnsTxtItem DnsTxtItem; diff --git a/src/grp-resolve/systemd-resolved/resolved-dns-scope.c b/src/grp-resolve/systemd-resolved/resolved-dns-scope.c index 98897ff41c..cf878cc783 100644 --- a/src/grp-resolve/systemd-resolved/resolved-dns-scope.c +++ b/src/grp-resolve/systemd-resolved/resolved-dns-scope.c @@ -21,16 +21,17 @@ #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 "basic/socket-util.h" +#include "basic/strv.h" +#include "shared/dns-domain.h" + #include "resolved-dns-scope.h" #include "resolved-llmnr.h" #include "resolved-mdns.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-search-domain.c b/src/grp-resolve/systemd-resolved/resolved-dns-search-domain.c index d3b8bf3b4d..7798c498a0 100644 --- a/src/grp-resolve/systemd-resolved/resolved-dns-search-domain.c +++ b/src/grp-resolve/systemd-resolved/resolved-dns-search-domain.c @@ -19,6 +19,7 @@ #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-server.c b/src/grp-resolve/systemd-resolved/resolved-dns-server.c index c8c898a866..be11cfa743 100644 --- a/src/grp-resolve/systemd-resolved/resolved-dns-server.c +++ b/src/grp-resolve/systemd-resolved/resolved-dns-server.c @@ -20,12 +20,13 @@ #include <systemd/sd-messages.h> #include "basic/alloc-util.h" -#include "resolved-dns-server.h" -#include "resolved-resolv-conf.h" #include "basic/siphash24.h" #include "basic/string-table.h" #include "basic/string-util.h" +#include "resolved-dns-server.h" +#include "resolved-resolv-conf.h" + /* After how much time to repeat classic DNS requests */ #define DNS_TIMEOUT_MIN_USEC (500 * USEC_PER_MSEC) #define DNS_TIMEOUT_MAX_USEC (5 * USEC_PER_SEC) diff --git a/src/grp-resolve/systemd-resolved/resolved-dns-stream.c b/src/grp-resolve/systemd-resolved/resolved-dns-stream.c index 4df19e7957..0c55f6d6c7 100644 --- a/src/grp-resolve/systemd-resolved/resolved-dns-stream.c +++ b/src/grp-resolve/systemd-resolved/resolved-dns-stream.c @@ -23,6 +23,7 @@ #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-synthesize.c b/src/grp-resolve/systemd-resolved/resolved-dns-synthesize.c index 9d7c483271..16e0410f98 100644 --- a/src/grp-resolve/systemd-resolved/resolved-dns-synthesize.c +++ b/src/grp-resolve/systemd-resolved/resolved-dns-synthesize.c @@ -20,6 +20,7 @@ #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 abaa11d803..3a19b12b47 100644 --- a/src/grp-resolve/systemd-resolved/resolved-dns-transaction.c +++ b/src/grp-resolve/systemd-resolved/resolved-dns-transaction.c @@ -21,14 +21,15 @@ #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 "basic/string-table.h" +#include "shared/dns-domain.h" + #include "resolved-dns-cache.h" #include "resolved-dns-transaction.h" #include "resolved-llmnr.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 f810c82848..b7c0b08fba 100644 --- a/src/grp-resolve/systemd-resolved/resolved-dns-trust-anchor.c +++ b/src/grp-resolve/systemd-resolved/resolved-dns-trust-anchor.c @@ -22,16 +22,17 @@ #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 "basic/set.h" #include "basic/string-util.h" #include "basic/strv.h" +#include "shared/dns-domain.h" + +#include "resolved-dns-dnssec.h" +#include "resolved-dns-trust-anchor.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 f252628822..5f4e3e236c 100644 --- a/src/grp-resolve/systemd-resolved/resolved-dns-trust-anchor.h +++ b/src/grp-resolve/systemd-resolved/resolved-dns-trust-anchor.h @@ -22,6 +22,7 @@ typedef struct DnsTrustAnchor DnsTrustAnchor; #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 97048c45d1..192811fc17 100644 --- a/src/grp-resolve/systemd-resolved/resolved-dns-zone.c +++ b/src/grp-resolve/systemd-resolved/resolved-dns-zone.c @@ -18,11 +18,12 @@ ***/ #include "basic/alloc-util.h" -#include "shared/dns-domain.h" #include "basic/list.h" +#include "basic/string-util.h" +#include "shared/dns-domain.h" + #include "resolved-dns-packet.h" #include "resolved-dns-zone.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-etc-hosts.c b/src/grp-resolve/systemd-resolved/resolved-etc-hosts.c index c5370129a6..2bab6fdc35 100644 --- a/src/grp-resolve/systemd-resolved/resolved-etc-hosts.c +++ b/src/grp-resolve/systemd-resolved/resolved-etc-hosts.c @@ -20,12 +20,13 @@ #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 "basic/string-util.h" #include "basic/strv.h" #include "basic/time-util.h" +#include "resolved-dns-synthesize.h" +#include "resolved-etc-hosts.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-etc-hosts.h b/src/grp-resolve/systemd-resolved/resolved-etc-hosts.h index 9d5a175f18..047443a896 100644 --- a/src/grp-resolve/systemd-resolved/resolved-etc-hosts.h +++ b/src/grp-resolve/systemd-resolved/resolved-etc-hosts.h @@ -19,9 +19,9 @@ along with systemd; If not, see <http://www.gnu.org/licenses/>. ***/ -#include "resolved-manager.h" -#include "resolved-dns-question.h" #include "resolved-dns-answer.h" +#include "resolved-dns-question.h" +#include "resolved-manager.h" void manager_etc_hosts_flush(Manager *m); int manager_etc_hosts_read(Manager *m); diff --git a/src/grp-resolve/systemd-resolved/resolved-link-bus.c b/src/grp-resolve/systemd-resolved/resolved-link-bus.c index 3c0c032fac..122c4dd45d 100644 --- a/src/grp-resolve/systemd-resolved/resolved-link-bus.c +++ b/src/grp-resolve/systemd-resolved/resolved-link-bus.c @@ -18,12 +18,13 @@ ***/ #include "basic/alloc-util.h" -#include "shared/bus-util.h" #include "basic/parse-util.h" +#include "basic/strv.h" +#include "shared/bus-util.h" #include "shared/resolve-util.h" + #include "resolved-bus.h" #include "resolved-link-bus.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-llmnr.c b/src/grp-resolve/systemd-resolved/resolved-llmnr.c index 4b303b6686..24b7a4784f 100644 --- a/src/grp-resolve/systemd-resolved/resolved-llmnr.c +++ b/src/grp-resolve/systemd-resolved/resolved-llmnr.c @@ -21,6 +21,7 @@ #include <resolv.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 b5bd140a54..a326823c3a 100644 --- a/src/grp-resolve/systemd-resolved/resolved-manager.c +++ b/src/grp-resolve/systemd-resolved/resolved-manager.c @@ -23,15 +23,20 @@ #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 "systemd-network/network-internal.h" #include "basic/ordered-set.h" #include "basic/parse-util.h" #include "basic/random-util.h" +#include "basic/socket-util.h" +#include "basic/string-table.h" +#include "basic/string-util.h" +#include "basic/utf8.h" +#include "shared/dns-domain.h" +#include "systemd-network/network-internal.h" + #include "resolved-bus.h" #include "resolved-conf.h" #include "resolved-etc-hosts.h" @@ -39,10 +44,6 @@ #include "resolved-manager.h" #include "resolved-mdns.h" #include "resolved-resolv-conf.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-mdns.c b/src/grp-resolve/systemd-resolved/resolved-mdns.c index 4ef3f1b37c..0c78f7bda5 100644 --- a/src/grp-resolve/systemd-resolved/resolved-mdns.c +++ b/src/grp-resolve/systemd-resolved/resolved-mdns.c @@ -17,11 +17,12 @@ along with systemd; If not, see <http://www.gnu.org/licenses/>. ***/ -#include <resolv.h> -#include <netinet/in.h> #include <arpa/inet.h> +#include <netinet/in.h> +#include <resolv.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 70f9173c22..c50796de2e 100644 --- a/src/grp-resolve/systemd-resolved/resolved-resolv-conf.c +++ b/src/grp-resolve/systemd-resolved/resolved-resolv-conf.c @@ -20,15 +20,16 @@ #include <resolv.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 "basic/string-util.h" #include "basic/strv.h" +#include "shared/dns-domain.h" + +#include "resolved-conf.h" +#include "resolved-resolv-conf.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 a59543d497..07952227ce 100644 --- a/src/grp-resolve/systemd-resolved/resolved.c +++ b/src/grp-resolve/systemd-resolved/resolved.c @@ -22,13 +22,14 @@ #include "basic/capability-util.h" #include "basic/mkdir.h" -#include "resolved-conf.h" -#include "resolved-manager.h" -#include "resolved-resolv-conf.h" #include "basic/selinux-util.h" #include "basic/signal-util.h" #include "basic/user-util.h" +#include "resolved-conf.h" +#include "resolved-manager.h" +#include "resolved-resolv-conf.h" + int main(int argc, char *argv[]) { _cleanup_(manager_freep) Manager *m = NULL; const char *user = "systemd-resolve"; diff --git a/src/grp-resolve/systemd-resolved/test-dns-packet.c b/src/grp-resolve/systemd-resolved/test-dns-packet.c index 8749461e8c..18d04b930d 100644 --- a/src/grp-resolve/systemd-resolved/test-dns-packet.c +++ b/src/grp-resolve/systemd-resolved/test-dns-packet.c @@ -17,19 +17,20 @@ along with systemd; If not, see <http://www.gnu.org/licenses/>. ***/ -#include <net/if.h> #include <glob.h> +#include <net/if.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 "basic/string-util.h" #include "basic/strv.h" +#include "resolved-dns-packet.h" +#include "resolved-dns-rr.h" + #define HASH_KEY SD_ID128_MAKE(d3,1e,48,90,4b,fa,4c,fe,af,9d,d5,a1,d7,2e,8a,b1) static uint64_t hash(DnsResourceRecord *rr) { diff --git a/src/grp-resolve/systemd-resolved/test-dnssec-complex.c b/src/grp-resolve/systemd-resolved/test-dnssec-complex.c index 9662a99409..ef78cd1ea5 100644 --- a/src/grp-resolve/systemd-resolved/test-dnssec-complex.c +++ b/src/grp-resolve/systemd-resolved/test-dnssec-complex.c @@ -23,11 +23,12 @@ #include "basic/af-list.h" #include "basic/alloc-util.h" -#include "bus-common-errors.h" -#include "dns-type.h" #include "basic/random-util.h" #include "basic/string-util.h" #include "basic/time-util.h" +#include "sd-bus/bus-common-errors.h" + +#include "dns-type.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 8e1fbad074..1f05196d8e 100644 --- a/src/grp-resolve/systemd-resolved/test-dnssec.c +++ b/src/grp-resolve/systemd-resolved/test-dnssec.c @@ -22,10 +22,11 @@ #include <sys/socket.h> #include "basic/alloc-util.h" +#include "basic/hexdecoct.h" +#include "basic/string-util.h" + #include "resolved-dns-dnssec.h" #include "resolved-dns-rr.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 0307c6485f..0eaab70687 100644 --- a/src/grp-resolve/systemd-resolved/test-resolve-tables.c +++ b/src/grp-resolve/systemd-resolved/test-resolve-tables.c @@ -17,9 +17,10 @@ along with systemd; If not, see <http://www.gnu.org/licenses/>. ***/ -#include "dns-type.h" #include "shared/test-tables.h" +#include "dns-type.h" + int main(int argc, char **argv) { uint16_t i; diff --git a/src/grp-system/grp-utils/systemd-analyze/analyze-verify.c b/src/grp-system/grp-utils/systemd-analyze/analyze-verify.c index 7553574f53..e27ae4f5c5 100644 --- a/src/grp-system/grp-utils/systemd-analyze/analyze-verify.c +++ b/src/grp-system/grp-utils/systemd-analyze/analyze-verify.c @@ -20,15 +20,16 @@ #include <stdlib.h> #include "basic/alloc-util.h" -#include "analyze-verify.h" -#include "sd-bus/bus-error.h" -#include "shared/bus-util.h" #include "basic/log.h" -#include "manager.h" -#include "shared/pager.h" #include "basic/path-util.h" #include "basic/strv.h" #include "basic/unit-name.h" +#include "manager.h" +#include "sd-bus/bus-error.h" +#include "shared/bus-util.h" +#include "shared/pager.h" + +#include "analyze-verify.h" static int prepare_filename(const char *filename, char **ret) { int r; diff --git a/src/grp-system/grp-utils/systemd-analyze/analyze.c b/src/grp-system/grp-utils/systemd-analyze/analyze.c index 1ce700ccba..41d3f0799a 100644 --- a/src/grp-system/grp-utils/systemd-analyze/analyze.c +++ b/src/grp-system/grp-utils/systemd-analyze/analyze.c @@ -26,15 +26,10 @@ #include <systemd/sd-bus.h> #include "basic/alloc-util.h" -#include "analyze-verify.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" @@ -42,6 +37,12 @@ #include "basic/terminal-util.h" #include "basic/unit-name.h" #include "basic/util.h" +#include "sd-bus/bus-error.h" +#include "shared/bus-unit-util.h" +#include "shared/bus-util.h" +#include "shared/pager.h" + +#include "analyze-verify.h" #define SCALE_X (0.1 / 1000.0) /* pixels per us */ #define SCALE_Y (20.0) diff --git a/src/grp-system/grp-utils/systemd-delta/delta.c b/src/grp-system/grp-utils/systemd-delta/delta.c index dd571e7195..5da779624d 100644 --- a/src/grp-system/grp-utils/systemd-delta/delta.c +++ b/src/grp-system/grp-utils/systemd-delta/delta.c @@ -31,7 +31,6 @@ #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" @@ -41,6 +40,7 @@ #include "basic/strv.h" #include "basic/terminal-util.h" #include "basic/util.h" +#include "shared/pager.h" static const char prefixes[] = "/etc\0" diff --git a/src/grp-system/grp-utils/systemd-fstab-generator/fstab-generator.c b/src/grp-system/grp-utils/systemd-fstab-generator/fstab-generator.c index bedf469f93..49c8487935 100644 --- a/src/grp-system/grp-utils/systemd-fstab-generator/fstab-generator.c +++ b/src/grp-system/grp-utils/systemd-fstab-generator/fstab-generator.c @@ -26,11 +26,8 @@ #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 "basic/mount-util.h" #include "basic/parse-util.h" #include "basic/path-util.h" @@ -42,6 +39,10 @@ #include "basic/unit-name.h" #include "basic/util.h" #include "basic/virt.h" +#include "shared/fstab-util.h" +#include "shared/generator.h" + +#include "mount-setup.h" static const char *arg_dest = "/tmp"; static bool arg_fstab_enabled = true; diff --git a/src/grp-system/grp-utils/systemd-run/run.c b/src/grp-system/grp-utils/systemd-run/run.c index 9ff2ba8003..10b6b4440f 100644 --- a/src/grp-system/grp-utils/systemd-run/run.c +++ b/src/grp-system/grp-utils/systemd-run/run.c @@ -24,22 +24,22 @@ #include <systemd/sd-event.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" +#include "sd-bus/bus-error.h" +#include "shared/bus-unit-util.h" +#include "shared/bus-util.h" +#include "shared/ptyfwd.h" +#include "shared/spawn-polkit-agent.h" static bool arg_ask_password = true; static bool arg_scope = false; diff --git a/src/grp-system/grp-utils/systemd-sysv-generator/sysv-generator.c b/src/grp-system/grp-utils/systemd-sysv-generator/sysv-generator.c index 183f93e9e7..0fb1f0b8a3 100644 --- a/src/grp-system/grp-utils/systemd-sysv-generator/sysv-generator.c +++ b/src/grp-system/grp-utils/systemd-sysv-generator/sysv-generator.c @@ -29,10 +29,8 @@ #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" @@ -41,6 +39,8 @@ #include "basic/strv.h" #include "basic/unit-name.h" #include "basic/util.h" +#include "shared/install.h" +#include "shared/path-lookup.h" typedef enum RunlevelType { RUNLEVEL_UP, diff --git a/src/grp-system/libcore/automount.c b/src/grp-system/libcore/automount.c index 145ed5ab5d..ca5deece11 100644 --- a/src/grp-system/libcore/automount.c +++ b/src/grp-system/libcore/automount.c @@ -20,7 +20,6 @@ #include <errno.h> #include <fcntl.h> #include <limits.h> -#include <linux/auto_dev-ioctl.h> #include <linux/auto_fs4.h> #include <sys/epoll.h> #include <sys/mount.h> @@ -29,17 +28,12 @@ #include "basic/alloc-util.h" #include "basic/async.h" -#include "automount.h" -#include "sd-bus/bus-error.h" -#include "shared/bus-util.h" -#include "dbus-automount.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 "basic/parse-util.h" #include "basic/path-util.h" #include "basic/process-util.h" @@ -48,6 +42,13 @@ #include "basic/string-table.h" #include "basic/string-util.h" #include "basic/unit-name.h" +#include "sd-bus/bus-error.h" +#include "shared/bus-util.h" + +#include "automount.h" +#include "dbus-automount.h" +#include "linux/auto_dev-ioctl.h" +#include "mount.h" #include "unit.h" static const UnitActiveState state_translation_table[_AUTOMOUNT_STATE_MAX] = { diff --git a/src/grp-system/libcore/bus-policy.c b/src/grp-system/libcore/bus-policy.c index cc228bc42f..b6dc2f5438 100644 --- a/src/grp-system/libcore/bus-policy.c +++ b/src/grp-system/libcore/bus-policy.c @@ -20,12 +20,13 @@ #include <stdlib.h> #include "basic/alloc-util.h" -#include "sd-bus/bus-kernel.h" -#include "bus-policy.h" -#include "sd-bus/kdbus.h" #include "basic/string-table.h" #include "basic/user-util.h" #include "basic/util.h" +#include "sd-bus/bus-kernel.h" +#include "sd-bus/kdbus.h" + +#include "bus-policy.h" int bus_kernel_translate_access(BusPolicyAccess access) { assert(access >= 0); diff --git a/src/grp-system/libcore/bus-policy.h b/src/grp-system/libcore/bus-policy.h index a6d19c1e9a..8cb6910c00 100644 --- a/src/grp-system/libcore/bus-policy.h +++ b/src/grp-system/libcore/bus-policy.h @@ -19,9 +19,9 @@ along with systemd; If not, see <http://www.gnu.org/licenses/>. ***/ -#include "sd-bus/kdbus.h" #include "basic/list.h" #include "basic/macro.h" +#include "sd-bus/kdbus.h" typedef struct BusNamePolicy BusNamePolicy; diff --git a/src/grp-system/libcore/busname.c b/src/grp-system/libcore/busname.c index 765fd7a442..5d85c20730 100644 --- a/src/grp-system/libcore/busname.c +++ b/src/grp-system/libcore/busname.c @@ -20,22 +20,23 @@ #include <sys/mman.h> #include "basic/alloc-util.h" -#include "sd-bus/bus-internal.h" -#include "sd-bus/bus-kernel.h" -#include "bus-policy.h" -#include "shared/bus-util.h" -#include "busname.h" -#include "dbus-busname.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 "basic/signal-util.h" #include "basic/special.h" #include "basic/string-table.h" #include "basic/string-util.h" +#include "sd-bus/bus-internal.h" +#include "sd-bus/bus-kernel.h" +#include "sd-bus/kdbus.h" +#include "shared/bus-util.h" + +#include "bus-policy.h" +#include "busname.h" +#include "dbus-busname.h" +#include "service.h" static const UnitActiveState state_translation_table[_BUSNAME_STATE_MAX] = { [BUSNAME_DEAD] = UNIT_INACTIVE, diff --git a/src/grp-system/libcore/busname.h b/src/grp-system/libcore/busname.h index a8562db458..aa7f0ecb1b 100644 --- a/src/grp-system/libcore/busname.h +++ b/src/grp-system/libcore/busname.h @@ -22,8 +22,8 @@ typedef struct BusName BusName; typedef struct BusNamePolicy BusNamePolicy; -#include "unit.h" #include "bus-policy.h" +#include "unit.h" typedef enum BusNameResult { BUSNAME_SUCCESS, diff --git a/src/grp-system/libcore/cgroup.c b/src/grp-system/libcore/cgroup.c index 43d494cee7..df850ec68f 100644 --- a/src/grp-system/libcore/cgroup.c +++ b/src/grp-system/libcore/cgroup.c @@ -22,7 +22,6 @@ #include "basic/alloc-util.h" #include "basic/cgroup-util.h" -#include "cgroup.h" #include "basic/fd-util.h" #include "basic/fileio.h" #include "basic/fs-util.h" @@ -30,9 +29,11 @@ #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/stdio-util.h" + +#include "cgroup.h" #define CGROUP_CPU_QUOTA_PERIOD_USEC ((usec_t) 100 * USEC_PER_MSEC) diff --git a/src/grp-system/libcore/cgroup.h b/src/grp-system/libcore/cgroup.h index 69ff9832bf..f0072986b6 100644 --- a/src/grp-system/libcore/cgroup.h +++ b/src/grp-system/libcore/cgroup.h @@ -21,9 +21,9 @@ #include <stdbool.h> +#include "basic/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; diff --git a/src/grp-system/libcore/dbus-automount.c b/src/grp-system/libcore/dbus-automount.c index bc44dc1c0a..2949c49a3f 100644 --- a/src/grp-system/libcore/dbus-automount.c +++ b/src/grp-system/libcore/dbus-automount.c @@ -17,10 +17,11 @@ along with systemd; If not, see <http://www.gnu.org/licenses/>. ***/ -#include "automount.h" +#include "basic/string-util.h" #include "shared/bus-util.h" + +#include "automount.h" #include "dbus-automount.h" -#include "basic/string-util.h" static BUS_DEFINE_PROPERTY_GET_ENUM(property_get_result, automount_result, AutomountResult); diff --git a/src/grp-system/libcore/dbus-busname.c b/src/grp-system/libcore/dbus-busname.c index 80e7484f46..65815bb826 100644 --- a/src/grp-system/libcore/dbus-busname.c +++ b/src/grp-system/libcore/dbus-busname.c @@ -17,10 +17,11 @@ along with systemd; If not, see <http://www.gnu.org/licenses/>. ***/ +#include "basic/string-util.h" #include "shared/bus-util.h" + #include "busname.h" #include "dbus-busname.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/grp-system/libcore/dbus-cgroup.c b/src/grp-system/libcore/dbus-cgroup.c index 86f7c626c4..d707ac51c3 100644 --- a/src/grp-system/libcore/dbus-cgroup.c +++ b/src/grp-system/libcore/dbus-cgroup.c @@ -18,13 +18,14 @@ ***/ #include "basic/alloc-util.h" -#include "shared/bus-util.h" #include "basic/cgroup-util.h" -#include "cgroup.h" -#include "dbus-cgroup.h" #include "basic/fd-util.h" #include "basic/fileio.h" #include "basic/path-util.h" +#include "shared/bus-util.h" + +#include "cgroup.h" +#include "dbus-cgroup.h" static BUS_DEFINE_PROPERTY_GET_ENUM(property_get_cgroup_device_policy, cgroup_device_policy, CGroupDevicePolicy); diff --git a/src/grp-system/libcore/dbus-job.c b/src/grp-system/libcore/dbus-job.c index dde6aa28ef..ee1774da36 100644 --- a/src/grp-system/libcore/dbus-job.c +++ b/src/grp-system/libcore/dbus-job.c @@ -20,12 +20,13 @@ #include <systemd/sd-bus.h> #include "basic/alloc-util.h" +#include "basic/log.h" +#include "basic/string-util.h" + #include "dbus-job.h" #include "dbus.h" #include "job.h" -#include "basic/log.h" #include "selinux-access.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/grp-system/libcore/dbus-kill.c b/src/grp-system/libcore/dbus-kill.c index cd76682298..ba7a3f3b72 100644 --- a/src/grp-system/libcore/dbus-kill.c +++ b/src/grp-system/libcore/dbus-kill.c @@ -17,10 +17,11 @@ along with systemd; If not, see <http://www.gnu.org/licenses/>. ***/ +#include "basic/signal-util.h" #include "shared/bus-util.h" + #include "dbus-kill.h" #include "kill.h" -#include "basic/signal-util.h" static BUS_DEFINE_PROPERTY_GET_ENUM(property_get_kill_mode, kill_mode, KillMode); diff --git a/src/grp-system/libcore/dbus-manager.c b/src/grp-system/libcore/dbus-manager.c index 59f8a7908a..b2ca867987 100644 --- a/src/grp-system/libcore/dbus-manager.c +++ b/src/grp-system/libcore/dbus-manager.c @@ -24,28 +24,29 @@ #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 "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 "basic/stat-util.h" #include "basic/string-util.h" #include "basic/strv.h" #include "basic/syslog-util.h" #include "basic/virt.h" +#include "sd-bus/bus-common-errors.h" +#include "shared/install.h" #include "shared/watchdog.h" +#include "dbus-execute.h" +#include "dbus-job.h" +#include "dbus-manager.h" +#include "dbus-unit.h" +#include "dbus.h" +#include "selinux-access.h" + static int property_get_version( sd_bus *bus, const char *path, diff --git a/src/grp-system/libcore/dbus-mount.c b/src/grp-system/libcore/dbus-mount.c index e6e824b6b9..837a262f61 100644 --- a/src/grp-system/libcore/dbus-mount.c +++ b/src/grp-system/libcore/dbus-mount.c @@ -17,13 +17,14 @@ along with systemd; If not, see <http://www.gnu.org/licenses/>. ***/ +#include "basic/string-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 "basic/string-util.h" #include "unit.h" static int property_get_what( diff --git a/src/grp-system/libcore/dbus-path.c b/src/grp-system/libcore/dbus-path.c index 2f2a65d4c1..d312652be4 100644 --- a/src/grp-system/libcore/dbus-path.c +++ b/src/grp-system/libcore/dbus-path.c @@ -17,10 +17,11 @@ along with systemd; If not, see <http://www.gnu.org/licenses/>. ***/ +#include "basic/string-util.h" #include "shared/bus-util.h" + #include "dbus-path.h" #include "path.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/grp-system/libcore/dbus-scope.c b/src/grp-system/libcore/dbus-scope.c index 3a9c3b98ec..9ecc01d275 100644 --- a/src/grp-system/libcore/dbus-scope.c +++ b/src/grp-system/libcore/dbus-scope.c @@ -21,6 +21,7 @@ #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/grp-system/libcore/dbus-service.c b/src/grp-system/libcore/dbus-service.c index 463d9da4e1..a666c9db95 100644 --- a/src/grp-system/libcore/dbus-service.c +++ b/src/grp-system/libcore/dbus-service.c @@ -19,17 +19,18 @@ #include "basic/alloc-util.h" #include "basic/async.h" +#include "basic/fd-util.h" +#include "basic/fileio.h" +#include "basic/path-util.h" +#include "basic/string-util.h" +#include "basic/strv.h" #include "shared/bus-util.h" + #include "dbus-cgroup.h" #include "dbus-execute.h" #include "dbus-kill.h" #include "dbus-service.h" -#include "basic/fd-util.h" -#include "basic/fileio.h" -#include "basic/path-util.h" #include "service.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/grp-system/libcore/dbus-socket.c b/src/grp-system/libcore/dbus-socket.c index 53c9911991..4d99628725 100644 --- a/src/grp-system/libcore/dbus-socket.c +++ b/src/grp-system/libcore/dbus-socket.c @@ -18,12 +18,13 @@ ***/ #include "basic/alloc-util.h" +#include "basic/string-util.h" #include "shared/bus-util.h" + #include "dbus-cgroup.h" #include "dbus-execute.h" #include "dbus-socket.h" #include "socket.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/grp-system/libcore/dbus-swap.c b/src/grp-system/libcore/dbus-swap.c index 2cfc8bd496..fc911b038f 100644 --- a/src/grp-system/libcore/dbus-swap.c +++ b/src/grp-system/libcore/dbus-swap.c @@ -18,11 +18,12 @@ along with systemd; If not, see <http://www.gnu.org/licenses/>. ***/ +#include "basic/string-util.h" #include "shared/bus-util.h" + #include "dbus-cgroup.h" #include "dbus-execute.h" #include "dbus-swap.h" -#include "basic/string-util.h" #include "swap.h" #include "unit.h" diff --git a/src/grp-system/libcore/dbus-timer.c b/src/grp-system/libcore/dbus-timer.c index be84522036..02036de42f 100644 --- a/src/grp-system/libcore/dbus-timer.c +++ b/src/grp-system/libcore/dbus-timer.c @@ -18,9 +18,10 @@ ***/ #include "basic/alloc-util.h" +#include "basic/strv.h" #include "shared/bus-util.h" + #include "dbus-timer.h" -#include "basic/strv.h" #include "timer.h" #include "unit.h" diff --git a/src/grp-system/libcore/dbus-unit.c b/src/grp-system/libcore/dbus-unit.c index dd5d6e4c5e..31fbb0d54d 100644 --- a/src/grp-system/libcore/dbus-unit.c +++ b/src/grp-system/libcore/dbus-unit.c @@ -20,20 +20,21 @@ #include <systemd/sd-bus.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 "basic/fd-util.h" #include "basic/locale-util.h" #include "basic/log.h" #include "basic/process-util.h" -#include "selinux-access.h" #include "basic/signal-util.h" #include "basic/special.h" #include "basic/string-util.h" #include "basic/strv.h" #include "basic/user-util.h" +#include "sd-bus/bus-common-errors.h" + +#include "dbus-unit.h" +#include "dbus.h" +#include "selinux-access.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/grp-system/libcore/dbus.c b/src/grp-system/libcore/dbus.c index d1d6248041..e8e57e6a89 100644 --- a/src/grp-system/libcore/dbus.c +++ b/src/grp-system/libcore/dbus.c @@ -24,10 +24,20 @@ #include <systemd/sd-bus.h> #include "basic/alloc-util.h" +#include "basic/fd-util.h" +#include "basic/log.h" +#include "basic/missing.h" +#include "basic/mkdir.h" +#include "basic/special.h" +#include "basic/string-util.h" +#include "basic/strv.h" +#include "basic/strxcpyx.h" +#include "basic/user-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 +45,7 @@ #include "dbus-manager.h" #include "dbus-unit.h" #include "dbus.h" -#include "basic/fd-util.h" -#include "basic/log.h" -#include "basic/missing.h" -#include "basic/mkdir.h" #include "selinux-access.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/grp-system/libcore/device.c b/src/grp-system/libcore/device.c index 10e9e9ae76..11ee2ad047 100644 --- a/src/grp-system/libcore/device.c +++ b/src/grp-system/libcore/device.c @@ -20,19 +20,20 @@ #include <errno.h> #include <sys/epoll.h> -#include "libudev.h" +#include <libudev.h> #include "basic/alloc-util.h" -#include "dbus-device.h" -#include "device.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 "shared/udev-util.h" #include "basic/unit-name.h" +#include "shared/udev-util.h" + +#include "dbus-device.h" +#include "device.h" +#include "swap.h" #include "unit.h" static const UnitActiveState state_translation_table[_DEVICE_STATE_MAX] = { diff --git a/src/grp-system/libcore/execute.h b/src/grp-system/libcore/execute.h index 190a56f443..38f21125cb 100644 --- a/src/grp-system/libcore/execute.h +++ b/src/grp-system/libcore/execute.h @@ -33,6 +33,7 @@ typedef struct ExecParameters ExecParameters; #include "basic/fdset.h" #include "basic/list.h" #include "basic/missing.h" + #include "namespace.h" typedef enum ExecUtmpMode { diff --git a/src/grp-system/libcore/failure-action.c b/src/grp-system/libcore/failure-action.c index be76c15a37..ee6025e7e2 100644 --- a/src/grp-system/libcore/failure-action.c +++ b/src/grp-system/libcore/failure-action.c @@ -18,15 +18,16 @@ along with systemd; If not, see <http://www.gnu.org/licenses/>. ***/ -#include <sys/reboot.h> #include <linux/reboot.h> +#include <sys/reboot.h> -#include "sd-bus/bus-error.h" -#include "shared/bus-util.h" -#include "failure-action.h" #include "basic/special.h" #include "basic/string-table.h" #include "basic/terminal-util.h" +#include "sd-bus/bus-error.h" +#include "shared/bus-util.h" + +#include "failure-action.h" static void log_and_status(Manager *m, const char *message) { log_warning("%s", message); diff --git a/src/grp-system/libcore/failure-action.h b/src/grp-system/libcore/failure-action.h index 96c6b51cb2..87b091f46e 100644 --- a/src/grp-system/libcore/failure-action.h +++ b/src/grp-system/libcore/failure-action.h @@ -33,6 +33,7 @@ typedef enum FailureAction { } FailureAction; #include "basic/macro.h" + #include "manager.h" int failure_action(Manager *m, FailureAction action, const char *reboot_arg); diff --git a/src/grp-system/libcore/hostname-setup.c b/src/grp-system/libcore/hostname-setup.c index 0085c0d405..71e5649952 100644 --- a/src/grp-system/libcore/hostname-setup.c +++ b/src/grp-system/libcore/hostname-setup.c @@ -23,13 +23,14 @@ #include "basic/alloc-util.h" #include "basic/fileio.h" -#include "hostname-setup.h" #include "basic/hostname-util.h" #include "basic/log.h" #include "basic/macro.h" #include "basic/string-util.h" #include "basic/util.h" +#include "hostname-setup.h" + int hostname_setup(void) { int r; _cleanup_free_ char *b = NULL; diff --git a/src/grp-system/libcore/ima-setup.c b/src/grp-system/libcore/ima-setup.c index c6eb358c9d..0b283d95f1 100644 --- a/src/grp-system/libcore/ima-setup.c +++ b/src/grp-system/libcore/ima-setup.c @@ -24,10 +24,11 @@ #include "basic/fd-util.h" #include "basic/fileio.h" -#include "ima-setup.h" #include "basic/log.h" #include "basic/util.h" +#include "ima-setup.h" + #define IMA_SECFS_DIR "/sys/kernel/security/ima" #define IMA_SECFS_POLICY IMA_SECFS_DIR "/policy" #define IMA_POLICY_PATH "/etc/ima/ima-policy" diff --git a/src/grp-system/libcore/job.c b/src/grp-system/libcore/job.c index 1a24a7f152..9dc44189e4 100644 --- a/src/grp-system/libcore/job.c +++ b/src/grp-system/libcore/job.c @@ -24,10 +24,7 @@ #include "basic/alloc-util.h" #include "basic/async.h" -#include "dbus-job.h" -#include "dbus.h" #include "basic/escape.h" -#include "job.h" #include "basic/log.h" #include "basic/macro.h" #include "basic/parse-util.h" @@ -38,9 +35,13 @@ #include "basic/string-util.h" #include "basic/strv.h" #include "basic/terminal-util.h" -#include "unit.h" #include "basic/virt.h" +#include "dbus-job.h" +#include "dbus.h" +#include "job.h" +#include "unit.h" + Job* job_new_raw(Unit *unit) { Job *j; diff --git a/src/grp-system/libcore/kill.c b/src/grp-system/libcore/kill.c index 22e5bdb4fe..9f8b45971f 100644 --- a/src/grp-system/libcore/kill.c +++ b/src/grp-system/libcore/kill.c @@ -17,11 +17,12 @@ along with systemd; If not, see <http://www.gnu.org/licenses/>. ***/ -#include "kill.h" #include "basic/signal-util.h" #include "basic/string-table.h" #include "basic/util.h" +#include "kill.h" + void kill_context_init(KillContext *c) { assert(c); diff --git a/src/grp-system/libcore/killall.c b/src/grp-system/libcore/killall.c index 03bed30704..bc4d67ae21 100644 --- a/src/grp-system/libcore/killall.c +++ b/src/grp-system/libcore/killall.c @@ -25,7 +25,6 @@ #include "basic/alloc-util.h" #include "basic/fd-util.h" #include "basic/formats-util.h" -#include "killall.h" #include "basic/parse-util.h" #include "basic/process-util.h" #include "basic/set.h" @@ -33,6 +32,8 @@ #include "basic/terminal-util.h" #include "basic/util.h" +#include "killall.h" + #define TIMEOUT_USEC (10 * USEC_PER_SEC) static bool ignore_proc(pid_t pid, bool warn_rootfs) { diff --git a/src/grp-system/libcore/load-dropin.c b/src/grp-system/libcore/load-dropin.c index bb6cf0f989..9a65b5038b 100644 --- a/src/grp-system/libcore/load-dropin.c +++ b/src/grp-system/libcore/load-dropin.c @@ -18,12 +18,13 @@ ***/ -#include "shared/conf-parser.h" -#include "load-dropin.h" -#include "load-fragment.h" #include "basic/log.h" #include "basic/strv.h" #include "basic/unit-name.h" +#include "shared/conf-parser.h" + +#include "load-dropin.h" +#include "load-fragment.h" #include "unit.h" static int add_dependency_consumer( diff --git a/src/grp-system/libcore/load-dropin.h b/src/grp-system/libcore/load-dropin.h index 067661b1ff..d91cf05197 100644 --- a/src/grp-system/libcore/load-dropin.h +++ b/src/grp-system/libcore/load-dropin.h @@ -20,6 +20,7 @@ ***/ #include "shared/dropin.h" + #include "unit.h" /* Read service data supplementary drop-in directories */ diff --git a/src/grp-system/libcore/locale-setup.c b/src/grp-system/libcore/locale-setup.c index 1c9660cdf4..ed50796c09 100644 --- a/src/grp-system/libcore/locale-setup.c +++ b/src/grp-system/libcore/locale-setup.c @@ -22,13 +22,14 @@ #include "basic/env-util.h" #include "basic/fileio.h" -#include "locale-setup.h" #include "basic/locale-util.h" #include "basic/string-util.h" #include "basic/strv.h" #include "basic/util.h" #include "basic/virt.h" +#include "locale-setup.h" + int locale_setup(char ***environment) { char **add; char *variables[_VARIABLE_LC_MAX] = {}; diff --git a/src/grp-system/libcore/machine-id-setup.c b/src/grp-system/libcore/machine-id-setup.c index 702cc90e89..28722b46f0 100644 --- a/src/grp-system/libcore/machine-id-setup.c +++ b/src/grp-system/libcore/machine-id-setup.c @@ -34,7 +34,6 @@ #include "basic/hexdecoct.h" #include "basic/io-util.h" #include "basic/log.h" -#include "machine-id-setup.h" #include "basic/macro.h" #include "basic/mkdir.h" #include "basic/mount-util.h" @@ -46,6 +45,8 @@ #include "basic/util.h" #include "basic/virt.h" +#include "machine-id-setup.h" + static int shorten_uuid(char destination[34], const char source[36]) { unsigned i, j; diff --git a/src/grp-system/libcore/mount-setup.c b/src/grp-system/libcore/mount-setup.c index 09df45c567..e90f0e918a 100644 --- a/src/grp-system/libcore/mount-setup.c +++ b/src/grp-system/libcore/mount-setup.c @@ -24,16 +24,12 @@ #include <unistd.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 "basic/mount-util.h" #include "basic/path-util.h" #include "basic/set.h" @@ -42,6 +38,11 @@ #include "basic/user-util.h" #include "basic/util.h" #include "basic/virt.h" +#include "shared/bus-util.h" +#include "shared/dev-setup.h" +#include "shared/efivars.h" + +#include "mount-setup.h" typedef enum MountMode { MNT_NONE = 0, diff --git a/src/grp-system/libcore/mount.c b/src/grp-system/libcore/mount.c index ab6efd4a9c..d4af6c65f6 100644 --- a/src/grp-system/libcore/mount.c +++ b/src/grp-system/libcore/mount.c @@ -25,17 +25,12 @@ #include <systemd/sd-messages.h> #include "basic/alloc-util.h" -#include "dbus-mount.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 "basic/mkdir.h" -#include "mount-setup.h" #include "basic/mount-util.h" -#include "mount.h" #include "basic/parse-util.h" #include "basic/path-util.h" #include "basic/process-util.h" @@ -44,6 +39,12 @@ #include "basic/string-util.h" #include "basic/strv.h" #include "basic/unit-name.h" +#include "shared/fstab-util.h" + +#include "dbus-mount.h" +#include "manager.h" +#include "mount-setup.h" +#include "mount.h" #include "unit.h" #define RETRY_UMOUNT_MAX 32 diff --git a/src/grp-system/libcore/namespace.c b/src/grp-system/libcore/namespace.c index f7c5364437..cb85074cce 100644 --- a/src/grp-system/libcore/namespace.c +++ b/src/grp-system/libcore/namespace.c @@ -18,22 +18,19 @@ ***/ #include <errno.h> +#include <linux/fs.h> #include <sched.h> #include <stdio.h> #include <string.h> #include <sys/mount.h> #include <sys/stat.h> #include <unistd.h> -#include <linux/fs.h> #include "basic/alloc-util.h" -#include "shared/dev-setup.h" #include "basic/fd-util.h" -#include "loopback-setup.h" #include "basic/missing.h" #include "basic/mkdir.h" #include "basic/mount-util.h" -#include "namespace.h" #include "basic/path-util.h" #include "basic/selinux-util.h" #include "basic/socket-util.h" @@ -43,6 +40,10 @@ #include "basic/umask-util.h" #include "basic/user-util.h" #include "basic/util.h" +#include "shared/dev-setup.h" + +#include "loopback-setup.h" +#include "namespace.h" #define DEV_MOUNT_OPTIONS (MS_NOSUID|MS_STRICTATIME|MS_NOEXEC) diff --git a/src/grp-system/libcore/path.c b/src/grp-system/libcore/path.c index 782e085174..ee1b9a3480 100644 --- a/src/grp-system/libcore/path.c +++ b/src/grp-system/libcore/path.c @@ -22,20 +22,21 @@ #include <sys/inotify.h> #include <unistd.h> -#include "sd-bus/bus-error.h" -#include "shared/bus-util.h" -#include "dbus-path.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 "basic/special.h" #include "basic/stat-util.h" #include "basic/string-table.h" #include "basic/string-util.h" #include "basic/unit-name.h" +#include "sd-bus/bus-error.h" +#include "shared/bus-util.h" + +#include "dbus-path.h" +#include "path.h" #include "unit.h" static const UnitActiveState state_translation_table[_PATH_STATE_MAX] = { diff --git a/src/grp-system/libcore/scope.c b/src/grp-system/libcore/scope.c index baf1051375..c290529e14 100644 --- a/src/grp-system/libcore/scope.c +++ b/src/grp-system/libcore/scope.c @@ -21,15 +21,16 @@ #include <unistd.h> #include "basic/alloc-util.h" -#include "dbus-scope.h" -#include "load-dropin.h" #include "basic/log.h" -#include "scope.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 "dbus-scope.h" +#include "load-dropin.h" +#include "scope.h" #include "unit.h" static const UnitActiveState state_translation_table[_SCOPE_STATE_MAX] = { diff --git a/src/grp-system/libcore/selinux-access.h b/src/grp-system/libcore/selinux-access.h index 1b1a8418ec..8d91eea38f 100644 --- a/src/grp-system/libcore/selinux-access.h +++ b/src/grp-system/libcore/selinux-access.h @@ -22,6 +22,7 @@ #include <systemd/sd-bus.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/grp-system/libcore/service.c b/src/grp-system/libcore/service.c index 2845a841c3..9b7f7bd68c 100644 --- a/src/grp-system/libcore/service.c +++ b/src/grp-system/libcore/service.c @@ -23,10 +23,6 @@ #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 "basic/def.h" #include "basic/env-util.h" #include "basic/escape.h" @@ -35,24 +31,29 @@ #include "basic/fileio.h" #include "basic/formats-util.h" #include "basic/fs-util.h" -#include "load-dropin.h" -#include "load-fragment.h" #include "basic/log.h" -#include "manager.h" #include "basic/parse-util.h" #include "basic/path-util.h" #include "basic/process-util.h" -#include "service.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 "basic/utf8.h" #include "basic/util.h" +#include "sd-bus/bus-error.h" +#include "sd-bus/bus-kernel.h" +#include "shared/bus-util.h" + +#include "dbus-service.h" +#include "load-dropin.h" +#include "load-fragment.h" +#include "manager.h" +#include "service.h" +#include "unit-printf.h" +#include "unit.h" static const UnitActiveState state_translation_table[_SERVICE_STATE_MAX] = { [SERVICE_DEAD] = UNIT_INACTIVE, diff --git a/src/grp-system/libcore/service.h b/src/grp-system/libcore/service.h index 66e2c387fe..e67e242ab1 100644 --- a/src/grp-system/libcore/service.h +++ b/src/grp-system/libcore/service.h @@ -23,9 +23,10 @@ typedef struct Service Service; typedef struct ServiceFDStore ServiceFDStore; #include "basic/exit-status.h" +#include "basic/ratelimit.h" + #include "kill.h" #include "path.h" -#include "basic/ratelimit.h" typedef enum ServiceRestart { SERVICE_RESTART_NO, diff --git a/src/grp-system/libcore/show-status.c b/src/grp-system/libcore/show-status.c index 03a3117f53..bb6889630d 100644 --- a/src/grp-system/libcore/show-status.c +++ b/src/grp-system/libcore/show-status.c @@ -21,11 +21,12 @@ #include "basic/fd-util.h" #include "basic/io-util.h" #include "basic/parse-util.h" -#include "show-status.h" #include "basic/string-util.h" #include "basic/terminal-util.h" #include "basic/util.h" +#include "show-status.h" + int parse_show_status(const char *v, ShowStatus *ret) { int r; diff --git a/src/grp-system/libcore/slice.c b/src/grp-system/libcore/slice.c index d9b3fa9525..d646b838ac 100644 --- a/src/grp-system/libcore/slice.c +++ b/src/grp-system/libcore/slice.c @@ -20,13 +20,14 @@ #include <errno.h> #include "basic/alloc-util.h" -#include "dbus-slice.h" #include "basic/log.h" -#include "slice.h" #include "basic/special.h" #include "basic/string-util.h" #include "basic/strv.h" #include "basic/unit-name.h" + +#include "dbus-slice.h" +#include "slice.h" #include "unit.h" static const UnitActiveState state_translation_table[_SLICE_STATE_MAX] = { diff --git a/src/grp-system/libcore/smack-setup.c b/src/grp-system/libcore/smack-setup.c index 16eb234202..ab316b69c9 100644 --- a/src/grp-system/libcore/smack-setup.c +++ b/src/grp-system/libcore/smack-setup.c @@ -32,10 +32,11 @@ #include "basic/fileio.h" #include "basic/log.h" #include "basic/macro.h" -#include "smack-setup.h" #include "basic/string-util.h" #include "basic/util.h" +#include "smack-setup.h" + #ifdef HAVE_SMACK static int write_access2_rules(const char* srcdir) { diff --git a/src/grp-system/libcore/socket.c b/src/grp-system/libcore/socket.c index 7ee5edfef8..cb2cb884d0 100644 --- a/src/grp-system/libcore/socket.c +++ b/src/grp-system/libcore/socket.c @@ -20,19 +20,16 @@ #include <arpa/inet.h> #include <errno.h> #include <fcntl.h> +#include <linux/sctp.h> #include <mqueue.h> #include <netinet/tcp.h> #include <signal.h> #include <sys/epoll.h> #include <sys/stat.h> #include <unistd.h> -#include <linux/sctp.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 "basic/def.h" #include "basic/exit-status.h" #include "basic/fd-util.h" @@ -48,15 +45,19 @@ #include "basic/selinux-util.h" #include "basic/signal-util.h" #include "basic/smack-util.h" -#include "socket.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 "basic/user-util.h" +#include "sd-bus/bus-error.h" +#include "shared/bus-util.h" + +#include "dbus-socket.h" +#include "socket.h" #include "unit-printf.h" #include "unit.h" -#include "basic/user-util.h" static const UnitActiveState state_translation_table[_SOCKET_STATE_MAX] = { [SOCKET_DEAD] = UNIT_INACTIVE, diff --git a/src/grp-system/libcore/socket.h b/src/grp-system/libcore/socket.h index 4f25eabd5d..6e485f51c3 100644 --- a/src/grp-system/libcore/socket.h +++ b/src/grp-system/libcore/socket.h @@ -21,9 +21,10 @@ typedef struct Socket Socket; +#include "basic/socket-util.h" + #include "mount.h" #include "service.h" -#include "basic/socket-util.h" typedef enum SocketExecCommand { SOCKET_EXEC_START_PRE, diff --git a/src/grp-system/libcore/swap.c b/src/grp-system/libcore/swap.c index c08057a9fe..b787fc15a1 100644 --- a/src/grp-system/libcore/swap.c +++ b/src/grp-system/libcore/swap.c @@ -22,26 +22,27 @@ #include <sys/stat.h> #include <unistd.h> -#include "libudev.h" +#include <libudev.h> #include "basic/alloc-util.h" -#include "dbus-swap.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 "shared/udev-util.h" #include "basic/unit-name.h" -#include "unit.h" #include "basic/virt.h" +#include "shared/fstab-util.h" +#include "shared/udev-util.h" + +#include "dbus-swap.h" +#include "swap.h" +#include "unit.h" static const UnitActiveState state_translation_table[_SWAP_STATE_MAX] = { [SWAP_DEAD] = UNIT_INACTIVE, diff --git a/src/grp-system/libcore/swap.h b/src/grp-system/libcore/swap.h index fbf66debdc..c2cbfc5d2a 100644 --- a/src/grp-system/libcore/swap.h +++ b/src/grp-system/libcore/swap.h @@ -20,7 +20,7 @@ along with systemd; If not, see <http://www.gnu.org/licenses/>. ***/ -#include "libudev.h" +#include <libudev.h> typedef struct Swap Swap; diff --git a/src/grp-system/libcore/target.c b/src/grp-system/libcore/target.c index 25630b80e5..e62a49be84 100644 --- a/src/grp-system/libcore/target.c +++ b/src/grp-system/libcore/target.c @@ -17,13 +17,14 @@ along with systemd; If not, see <http://www.gnu.org/licenses/>. ***/ -#include "dbus-target.h" #include "basic/log.h" #include "basic/special.h" #include "basic/string-util.h" #include "basic/unit-name.h" -#include "unit.h" + +#include "dbus-target.h" #include "target.h" +#include "unit.h" static const UnitActiveState state_translation_table[_TARGET_STATE_MAX] = { [TARGET_DEAD] = UNIT_INACTIVE, diff --git a/src/grp-system/libcore/timer.c b/src/grp-system/libcore/timer.c index 45eec02dee..8b9fa71d27 100644 --- a/src/grp-system/libcore/timer.c +++ b/src/grp-system/libcore/timer.c @@ -20,20 +20,21 @@ #include <errno.h> #include "basic/alloc-util.h" -#include "sd-bus/bus-error.h" -#include "shared/bus-util.h" -#include "dbus-timer.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 "basic/unit-name.h" -#include "unit.h" #include "basic/user-util.h" #include "basic/virt.h" +#include "sd-bus/bus-error.h" +#include "shared/bus-util.h" + +#include "dbus-timer.h" +#include "timer.h" +#include "unit.h" static const UnitActiveState state_translation_table[_TIMER_STATE_MAX] = { [TIMER_DEAD] = UNIT_INACTIVE, diff --git a/src/grp-system/libcore/transaction.c b/src/grp-system/libcore/transaction.c index a0ff69e2dc..d19e19f978 100644 --- a/src/grp-system/libcore/transaction.c +++ b/src/grp-system/libcore/transaction.c @@ -21,11 +21,12 @@ #include <unistd.h> #include "basic/alloc-util.h" +#include "basic/terminal-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" +#include "transaction.h" static void transaction_unlink_job(Transaction *tr, Job *j, bool delete_dependencies); diff --git a/src/grp-system/libcore/transaction.h b/src/grp-system/libcore/transaction.h index 73489af0e6..e89dad99bf 100644 --- a/src/grp-system/libcore/transaction.h +++ b/src/grp-system/libcore/transaction.h @@ -22,6 +22,7 @@ typedef struct Transaction Transaction; #include "basic/hashmap.h" + #include "job.h" #include "manager.h" #include "unit.h" diff --git a/src/grp-system/libcore/unit-printf.c b/src/grp-system/libcore/unit-printf.c index c64d45e251..14c36ab494 100644 --- a/src/grp-system/libcore/unit-printf.c +++ b/src/grp-system/libcore/unit-printf.c @@ -21,13 +21,14 @@ #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 "basic/user-util.h" +#include "shared/specifier.h" + #include "unit-printf.h" #include "unit.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/grp-system/libcore/unit.c b/src/grp-system/libcore/unit.c index 3caa8baa26..f539c3971d 100644 --- a/src/grp-system/libcore/unit.c +++ b/src/grp-system/libcore/unit.c @@ -27,18 +27,10 @@ #include <systemd/sd-messages.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 "shared/dropin.h" #include "basic/escape.h" -#include "execute.h" #include "basic/fileio-label.h" #include "basic/formats-util.h" -#include "load-dropin.h" -#include "load-fragment.h" #include "basic/log.h" #include "basic/macro.h" #include "basic/missing.h" @@ -55,9 +47,18 @@ #include "basic/strv.h" #include "basic/umask-util.h" #include "basic/unit-name.h" -#include "unit.h" #include "basic/user-util.h" #include "basic/virt.h" +#include "sd-bus/bus-common-errors.h" +#include "shared/bus-util.h" +#include "shared/dropin.h" + +#include "dbus-unit.h" +#include "dbus.h" +#include "execute.h" +#include "load-dropin.h" +#include "load-fragment.h" +#include "unit.h" const UnitVTable * const unit_vtable[_UNIT_TYPE_MAX] = { [UNIT_SERVICE] = &service_vtable, diff --git a/src/grp-timedate/systemd-timedated/timedated.c b/src/grp-timedate/systemd-timedated/timedated.c index 2d3f1d4fd2..aad94024b8 100644 --- a/src/grp-timedate/systemd-timedated/timedated.c +++ b/src/grp-timedate/systemd-timedated/timedated.c @@ -26,9 +26,6 @@ #include <systemd/sd-messages.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" @@ -38,6 +35,9 @@ #include "basic/strv.h" #include "basic/user-util.h" #include "basic/util.h" +#include "sd-bus/bus-common-errors.h" +#include "sd-bus/bus-error.h" +#include "shared/bus-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/timedatectl.c b/src/grp-timedate/timedatectl/timedatectl.c index 323d2d7d53..b85d2fdb80 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 "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" +#include "sd-bus/bus-error.h" +#include "shared/bus-util.h" +#include "shared/pager.h" +#include "shared/spawn-polkit-agent.h" static bool arg_no_pager = false; static bool arg_ask_password = true; diff --git a/src/grp-udev/ata_id/ata_id.c b/src/grp-udev/ata_id/ata_id.c index 962332c0ad..22231225b6 100644 --- a/src/grp-udev/ata_id/ata_id.c +++ b/src/grp-udev/ata_id/ata_id.c @@ -37,11 +37,11 @@ #include <sys/types.h> #include <unistd.h> -#include "libudev.h" +#include <libudev.h> #include "basic/fd-util.h" -#include "libudev-private.h" #include "basic/log.h" +#include "libudev-private.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 1e9c75acfd..90df241b45 100644 --- a/src/grp-udev/cdrom_id/cdrom_id.c +++ b/src/grp-udev/cdrom_id/cdrom_id.c @@ -34,10 +34,10 @@ #include <time.h> #include <unistd.h> -#include "libudev.h" +#include <libudev.h> -#include "libudev-private.h" #include "basic/random-util.h" +#include "libudev-private.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 0ad6c4ca43..0e8f6b97fe 100644 --- a/src/grp-udev/collect/collect.c +++ b/src/grp-udev/collect/collect.c @@ -25,10 +25,10 @@ #include <stdio.h> #include "basic/alloc-util.h" -#include "libudev-private.h" #include "basic/macro.h" #include "basic/stdio-util.h" #include "basic/string-util.h" +#include "libudev-private.h" #define BUFSIZE 16 #define UDEV_ALARM_TIMEOUT 180 diff --git a/src/grp-udev/libudev-core/net/ethtool-util.c b/src/grp-udev/libudev-core/net/ethtool-util.c index 09a3517444..759ecde5e4 100644 --- a/src/grp-udev/libudev-core/net/ethtool-util.c +++ b/src/grp-udev/libudev-core/net/ethtool-util.c @@ -17,17 +17,18 @@ along with systemd; If not, see <http://www.gnu.org/licenses/>. ***/ -#include <net/if.h> -#include <sys/ioctl.h> #include <linux/ethtool.h> #include <linux/sockios.h> +#include <net/if.h> +#include <sys/ioctl.h> -#include "shared/conf-parser.h" -#include "ethtool-util.h" #include "basic/log.h" #include "basic/string-table.h" #include "basic/strxcpyx.h" #include "basic/util.h" +#include "shared/conf-parser.h" + +#include "ethtool-util.h" static const char* const duplex_table[_DUP_MAX] = { [DUP_FULL] = "full", diff --git a/src/grp-udev/libudev-core/net/link-config.c b/src/grp-udev/libudev-core/net/link-config.c index c2cd3dcc3c..f6803e00df 100644 --- a/src/grp-udev/libudev-core/net/link-config.c +++ b/src/grp-udev/libudev-core/net/link-config.c @@ -33,11 +33,11 @@ #include "basic/string-util.h" #include "basic/strv.h" #include "basic/util.h" +#include "libudev-private.h" #include "sd-netlink/netlink-util.h" #include "sd-netlink/sd-netlink.h" #include "shared/conf-parser.h" #include "systemd-network/network-internal.h" -#include "libudev-private.h" #include "ethtool-util.h" #include "link-config.h" diff --git a/src/grp-udev/libudev-core/net/link-config.h b/src/grp-udev/libudev-core/net/link-config.h index b520e1ee9e..ad5211610a 100644 --- a/src/grp-udev/libudev-core/net/link-config.h +++ b/src/grp-udev/libudev-core/net/link-config.h @@ -19,11 +19,12 @@ along with systemd; If not, see <http://www.gnu.org/licenses/>. ***/ -#include "libudev.h" +#include <libudev.h> +#include "basic/list.h" #include "shared/condition.h" + #include "ethtool-util.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/udev-builtin-blkid.c b/src/grp-udev/libudev-core/udev-builtin-blkid.c index b226626e8d..89fa75fa73 100644 --- a/src/grp-udev/libudev-core/udev-builtin-blkid.c +++ b/src/grp-udev/libudev-core/udev-builtin-blkid.c @@ -30,10 +30,10 @@ #include <systemd/sd-id128.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 "shared/efivars.h" +#include "shared/gpt.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-hwdb.c b/src/grp-udev/libudev-core/udev-builtin-hwdb.c index a5290ebf2b..d2d95bf394 100644 --- a/src/grp-udev/libudev-core/udev-builtin-hwdb.c +++ b/src/grp-udev/libudev-core/udev-builtin-hwdb.c @@ -22,13 +22,12 @@ #include <stdio.h> #include <stdlib.h> -#include "udev.h" - #include "basic/alloc-util.h" #include "basic/string-util.h" #include "sd-hwdb/hwdb-util.h" #include "sd-hwdb/sd-hwdb.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 ba2c819bfa..f5d700e299 100644 --- a/src/grp-udev/libudev-core/udev-builtin-input_id.c +++ b/src/grp-udev/libudev-core/udev-builtin-input_id.c @@ -22,19 +22,19 @@ */ #include <errno.h> +#include <linux/input.h> +#include <linux/limits.h> #include <stdarg.h> #include <stdio.h> #include <stdlib.h> #include <string.h> #include <unistd.h> -#include <linux/limits.h> -#include <linux/input.h> #include "basic/fd-util.h" #include "basic/stdio-util.h" #include "basic/string-util.h" -#include "udev.h" #include "basic/util.h" +#include "udev.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 f3ea583134..5067e2247a 100644 --- a/src/grp-udev/libudev-core/udev-builtin-keyboard.c +++ b/src/grp-udev/libudev-core/udev-builtin-keyboard.c @@ -17,11 +17,11 @@ along with systemd; If not, see <http://www.gnu.org/licenses/>. ***/ +#include <linux/input.h> #include <stdio.h> #include <stdlib.h> #include <string.h> #include <sys/ioctl.h> -#include <linux/input.h> #include "basic/fd-util.h" #include "basic/parse-util.h" 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 3441f844be..f120f816e8 100644 --- a/src/grp-udev/libudev-core/udev-builtin-net_id.c +++ b/src/grp-udev/libudev-core/udev-builtin-net_id.c @@ -89,6 +89,7 @@ #include <errno.h> #include <fcntl.h> +#include <linux/pci_regs.h> #include <net/if.h> #include <net/if_arp.h> #include <stdarg.h> @@ -96,7 +97,6 @@ #include <stdlib.h> #include <string.h> #include <unistd.h> -#include <linux/pci_regs.h> #include "basic/fd-util.h" #include "basic/fileio.h" 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 4a32bac98a..3f3522f5e1 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 @@ -18,10 +18,11 @@ ***/ #include "basic/alloc-util.h" -#include "net/link-config.h" #include "basic/log.h" #include "udev.h" +#include "net/link-config.h" + static link_config_ctx *ctx = NULL; static int builtin_net_setup_link(struct udev_device *dev, int argc, char **argv, bool test) { diff --git a/src/grp-udev/libudev-core/udev-builtin-uaccess.c b/src/grp-udev/libudev-core/udev-builtin-uaccess.c index f15f07ad95..aab1c376de 100644 --- a/src/grp-udev/libudev-core/udev-builtin-uaccess.c +++ b/src/grp-udev/libudev-core/udev-builtin-uaccess.c @@ -25,9 +25,10 @@ #include <systemd/sd-login.h> #include "basic/login-util.h" -#include "logind-acl.h" -#include "udev.h" #include "basic/util.h" +#include "udev.h" + +#include "logind-acl.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-event.c b/src/grp-udev/libudev-core/udev-event.c index 6825863c86..59f4e1fb35 100644 --- a/src/grp-udev/libudev-core/udev-event.c +++ b/src/grp-udev/libudev-core/udev-event.c @@ -33,10 +33,10 @@ #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 "sd-netlink/netlink-util.h" #include "udev.h" typedef struct Spawn { diff --git a/src/grp-udev/libudev-core/udev-rules.c b/src/grp-udev/libudev-core/udev-rules.c index 73fb7677da..134d269fd8 100644 --- a/src/grp-udev/libudev-core/udev-rules.c +++ b/src/grp-udev/libudev-core/udev-rules.c @@ -41,10 +41,10 @@ #include "basic/strbuf.h" #include "basic/string-util.h" #include "basic/strv.h" -#include "shared/sysctl-util.h" -#include "udev.h" #include "basic/user-util.h" #include "basic/util.h" +#include "shared/sysctl-util.h" +#include "udev.h" #define PREALLOC_TOKEN 2048 diff --git a/src/grp-udev/scsi_id/scsi_id.c b/src/grp-udev/scsi_id/scsi_id.c index 48c6cb4074..83011e918e 100644 --- a/src/grp-udev/scsi_id/scsi_id.c +++ b/src/grp-udev/scsi_id/scsi_id.c @@ -29,14 +29,15 @@ #include <sys/stat.h> #include <unistd.h> -#include "libudev.h" +#include <libudev.h> #include "basic/fd-util.h" -#include "libudev-private.h" -#include "scsi_id.h" #include "basic/string-util.h" +#include "libudev-private.h" #include "shared/udev-util.h" +#include "scsi_id.h" + static const struct option options[] = { { "device", required_argument, NULL, 'd' }, { "config", required_argument, NULL, 'f' }, diff --git a/src/grp-udev/scsi_id/scsi_serial.c b/src/grp-udev/scsi_id/scsi_serial.c index a7d76d0ab7..f926e17dad 100644 --- a/src/grp-udev/scsi_id/scsi_serial.c +++ b/src/grp-udev/scsi_id/scsi_serial.c @@ -33,13 +33,14 @@ #include <time.h> #include <unistd.h> -#include "libudev.h" +#include <libudev.h> -#include "libudev-private.h" #include "basic/random-util.h" +#include "basic/string-util.h" +#include "libudev-private.h" + #include "scsi.h" #include "scsi_id.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 8033ab4eab..07edbb3450 100644 --- a/src/grp-udev/systemd-udevd/udevd.c +++ b/src/grp-udev/systemd-udevd/udevd.c @@ -46,7 +46,6 @@ #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" @@ -61,9 +60,10 @@ #include "basic/socket-util.h" #include "basic/string-util.h" #include "basic/terminal-util.h" +#include "basic/user-util.h" +#include "shared/dev-setup.h" #include "shared/udev-util.h" #include "udev.h" -#include "basic/user-util.h" static bool arg_debug = false; static int arg_daemonize = false; diff --git a/src/grp-udev/udevadm/udevadm-hwdb.c b/src/grp-udev/udevadm/udevadm-hwdb.c index 264e8027e2..3446de358c 100644 --- a/src/grp-udev/udevadm/udevadm-hwdb.c +++ b/src/grp-udev/udevadm/udevadm-hwdb.c @@ -26,12 +26,12 @@ #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 "basic/util.h" +#include "sd-hwdb/hwdb-internal.h" +#include "sd-hwdb/hwdb-util.h" +#include "udev.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 9694a991ec..f8b2d915a4 100644 --- a/src/grp-udev/udevadm/udevadm-info.c +++ b/src/grp-udev/udevadm/udevadm-info.c @@ -30,6 +30,7 @@ #include "basic/string-util.h" #include "shared/udev-util.h" #include "udev.h" + #include "udevadm-util.h" static bool skip_attribute(const char *name) { diff --git a/src/grp-udev/udevadm/udevadm-settle.c b/src/grp-udev/udevadm/udevadm-settle.c index 8b32e58a0c..2a7a150517 100644 --- a/src/grp-udev/udevadm/udevadm-settle.c +++ b/src/grp-udev/udevadm/udevadm-settle.c @@ -27,8 +27,8 @@ #include <unistd.h> #include "basic/parse-util.h" -#include "udev.h" #include "basic/util.h" +#include "udev.h" static void help(void) { printf("%s settle OPTIONS\n\n" diff --git a/src/grp-udev/udevadm/udevadm-trigger.c b/src/grp-udev/udevadm/udevadm-trigger.c index 89ca90d01b..280f348fae 100644 --- a/src/grp-udev/udevadm/udevadm-trigger.c +++ b/src/grp-udev/udevadm/udevadm-trigger.c @@ -24,10 +24,11 @@ #include <unistd.h> #include "basic/string-util.h" +#include "basic/util.h" #include "shared/udev-util.h" #include "udev.h" + #include "udevadm-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 4ae5e6c7ef..8dc871cb10 100644 --- a/src/grp-udev/udevadm/udevadm-util.c +++ b/src/grp-udev/udevadm/udevadm-util.c @@ -16,6 +16,7 @@ */ #include "basic/string-util.h" + #include "udevadm-util.h" struct udev_device *find_device(struct udev *udev, diff --git a/src/grp-udev/v4l_id/v4l_id.c b/src/grp-udev/v4l_id/v4l_id.c index 4779cf34f3..3271121a3b 100644 --- a/src/grp-udev/v4l_id/v4l_id.c +++ b/src/grp-udev/v4l_id/v4l_id.c @@ -17,6 +17,7 @@ #include <errno.h> #include <fcntl.h> #include <getopt.h> +#include <linux/videodev2.h> #include <stdio.h> #include <stdlib.h> #include <string.h> @@ -24,7 +25,6 @@ #include <sys/time.h> #include <sys/types.h> #include <unistd.h> -#include <linux/videodev2.h> #include "basic/fd-util.h" #include "basic/util.h" diff --git a/src/grp-utils/systemd-path/path.c b/src/grp-utils/systemd-path/path.c index aa63884365..ed824fa857 100644 --- a/src/grp-utils/systemd-path/path.c +++ b/src/grp-utils/systemd-path/path.c @@ -22,14 +22,14 @@ #include <stdio.h> #include <stdlib.h> -#include "sd-path.h" - #include "basic/alloc-util.h" #include "basic/log.h" #include "basic/macro.h" #include "basic/string-util.h" #include "basic/util.h" +#include "sd-path.h" + static const char *arg_suffix = NULL; static const char* const path_table[_SD_PATH_MAX] = { diff --git a/src/grp-utils/systemd-path/sd-path.c b/src/grp-utils/systemd-path/sd-path.c index b904b56c01..2e0a0a7cfd 100644 --- a/src/grp-utils/systemd-path/sd-path.c +++ b/src/grp-utils/systemd-path/sd-path.c @@ -17,8 +17,6 @@ along with systemd; If not, see <http://www.gnu.org/licenses/>. ***/ -#include "sd-path.h" - #include "basic/alloc-util.h" #include "basic/architecture.h" #include "basic/fd-util.h" @@ -30,6 +28,8 @@ #include "basic/user-util.h" #include "basic/util.h" +#include "sd-path.h" + static int from_environment(const char *envname, const char *fallback, const char **ret) { assert(ret); diff --git a/src/libbasic/include/basic/escape.h b/src/libbasic/include/basic/escape.h index dffe417cc6..97fa90caf0 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 "basic/string-util.h" #include "basic/missing.h" +#include "basic/string-util.h" /* What characters are special in the shell? */ /* must be escaped outside and inside double-quotes */ diff --git a/src/libbasic/include/basic/socket-util.h b/src/libbasic/include/basic/socket-util.h index a711d368d5..199e026198 100644 --- a/src/libbasic/include/basic/socket-util.h +++ b/src/libbasic/include/basic/socket-util.h @@ -19,6 +19,8 @@ along with systemd; If not, see <http://www.gnu.org/licenses/>. ***/ +#include <linux/if_packet.h> +#include <linux/netlink.h> #include <netinet/ether.h> #include <netinet/in.h> #include <stdbool.h> @@ -26,8 +28,6 @@ #include <sys/socket.h> #include <sys/types.h> #include <sys/un.h> -#include <linux/netlink.h> -#include <linux/if_packet.h> #include "basic/macro.h" #include "basic/util.h" diff --git a/src/libbasic/src/chattr-util.c b/src/libbasic/src/chattr-util.c index a227ce6b05..ab6d8706de 100644 --- a/src/libbasic/src/chattr-util.c +++ b/src/libbasic/src/chattr-util.c @@ -19,9 +19,9 @@ #include <errno.h> #include <fcntl.h> +#include <linux/fs.h> #include <sys/ioctl.h> #include <sys/stat.h> -#include <linux/fs.h> #include "basic/chattr-util.h" #include "basic/fd-util.h" diff --git a/src/libbasic/src/clock-util.c b/src/libbasic/src/clock-util.c index a6d43803a1..50c3738414 100644 --- a/src/libbasic/src/clock-util.c +++ b/src/libbasic/src/clock-util.c @@ -20,12 +20,12 @@ #include <errno.h> #include <fcntl.h> #include <limits.h> -#include <stdbool.h> -#include <time.h> #include <linux/rtc.h> +#include <stdbool.h> #include <stdio.h> #include <sys/ioctl.h> #include <sys/time.h> +#include <time.h> #include "basic/clock-util.h" #include "basic/fd-util.h" diff --git a/src/libbasic/src/fileio.c b/src/libbasic/src/fileio.c index 358477cebe..c784aaac54 100644 --- a/src/libbasic/src/fileio.c +++ b/src/libbasic/src/fileio.c @@ -17,6 +17,7 @@ along with systemd; If not, see <http://www.gnu.org/licenses/>. ***/ +#include <ctype.h> #include <errno.h> #include <fcntl.h> #include <limits.h> @@ -29,7 +30,6 @@ #include <unistd.h> #include "basic/alloc-util.h" -#include "ctype.h" #include "basic/escape.h" #include "basic/fd-util.h" #include "basic/fileio.h" diff --git a/src/libbasic/src/random-util.c b/src/libbasic/src/random-util.c index 6c903cbb9a..6f1b1adead 100644 --- a/src/libbasic/src/random-util.c +++ b/src/libbasic/src/random-util.c @@ -20,11 +20,11 @@ #include <elf.h> #include <errno.h> #include <fcntl.h> +#include <linux/random.h> #include <stdbool.h> +#include <stdint.h> #include <stdlib.h> #include <sys/time.h> -#include <linux/random.h> -#include <stdint.h> #ifdef HAVE_SYS_AUXV_H #include <sys/auxv.h> diff --git a/src/libbasic/src/stat-util.c b/src/libbasic/src/stat-util.c index 64f01e5b4d..83edbd3ecc 100644 --- a/src/libbasic/src/stat-util.c +++ b/src/libbasic/src/stat-util.c @@ -20,10 +20,10 @@ #include <dirent.h> #include <errno.h> #include <fcntl.h> -#include <sys/stat.h> -#include <sys/types.h> #include <linux/magic.h> +#include <sys/stat.h> #include <sys/statvfs.h> +#include <sys/types.h> #include <unistd.h> #include "basic/dirent-util.h" diff --git a/src/libbasic/src/terminal-util.c b/src/libbasic/src/terminal-util.c index 6755a3f787..ce750abb08 100644 --- a/src/libbasic/src/terminal-util.c +++ b/src/libbasic/src/terminal-util.c @@ -20,20 +20,20 @@ #include <errno.h> #include <fcntl.h> #include <limits.h> +#include <linux/kd.h> +#include <linux/tiocl.h> +#include <linux/vt.h> +#include <poll.h> +#include <signal.h> #include <stdarg.h> #include <stddef.h> #include <stdlib.h> #include <string.h> #include <sys/inotify.h> +#include <sys/ioctl.h> #include <sys/socket.h> #include <sys/sysmacros.h> #include <sys/time.h> -#include <linux/kd.h> -#include <linux/tiocl.h> -#include <linux/vt.h> -#include <poll.h> -#include <signal.h> -#include <sys/ioctl.h> #include <sys/types.h> #include <termios.h> #include <unistd.h> diff --git a/src/libbasic/src/user-util.c b/src/libbasic/src/user-util.c index aeada699ac..c85eb06491 100644 --- a/src/libbasic/src/user-util.c +++ b/src/libbasic/src/user-util.c @@ -30,11 +30,11 @@ #include <sys/stat.h> #include <unistd.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/missing.h" #include "basic/parse-util.h" #include "basic/path-util.h" #include "basic/string-util.h" diff --git a/src/libfirewall/firewall-util.c b/src/libfirewall/firewall-util.c index 5423b8cc3a..212bbe00ee 100644 --- a/src/libfirewall/firewall-util.c +++ b/src/libfirewall/firewall-util.c @@ -25,10 +25,10 @@ #include <arpa/inet.h> #include <endian.h> #include <errno.h> +#include <net/if.h> #include <stddef.h> #include <string.h> #include <sys/socket.h> -#include <net/if.h> #ifndef IFNAMSIZ #define IFNAMSIZ 16 #endif diff --git a/src/libshared/include/shared/bus-unit-util.h b/src/libshared/include/shared/bus-unit-util.h index e657b42ecb..5e5b33ded1 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 "shared/output-mode.h" #include "shared/install.h" +#include "shared/output-mode.h" typedef struct UnitInfo { const char *machine; diff --git a/src/libshared/include/shared/install.h b/src/libshared/include/shared/install.h index 2f9b15a1c8..bf1f6f25c8 100644 --- a/src/libshared/include/shared/install.h +++ b/src/libshared/include/shared/install.h @@ -32,9 +32,9 @@ typedef struct UnitFileInstallInfo UnitFileInstallInfo; #include "basic/hashmap.h" #include "basic/macro.h" -#include "shared/path-lookup.h" #include "basic/strv.h" #include "basic/unit-name.h" +#include "shared/path-lookup.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 8f3cadd0e3..14f955dfb4 100644 --- a/src/libshared/include/shared/logs-show.h +++ b/src/libshared/include/shared/logs-show.h @@ -27,9 +27,9 @@ #include <systemd/sd-journal.h> #include "basic/macro.h" -#include "shared/output-mode.h" #include "basic/time-util.h" #include "basic/util.h" +#include "shared/output-mode.h" int output_journal( FILE *f, diff --git a/src/libshared/include/shared/udev-util.h b/src/libshared/include/shared/udev-util.h index 7765918a12..c3db8ab30e 100644 --- a/src/libshared/include/shared/udev-util.h +++ b/src/libshared/include/shared/udev-util.h @@ -19,8 +19,8 @@ along with systemd; If not, see <http://www.gnu.org/licenses/>. ***/ -#include "udev.h" #include "basic/util.h" +#include "udev.h" DEFINE_TRIVIAL_CLEANUP_FUNC(struct udev*, udev_unref); DEFINE_TRIVIAL_CLEANUP_FUNC(struct udev_device*, udev_device_unref); diff --git a/src/libshared/src/acl-util.c b/src/libshared/src/acl-util.c index fb19394e02..b9af6aca5c 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 "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" +#include "shared/acl-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 a43bf3847a..d3a744acbd 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 "shared/acpi-fpdt.h" #include "basic/alloc-util.h" #include "basic/fd-util.h" #include "basic/fileio.h" #include "basic/time-util.h" +#include "shared/acpi-fpdt.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 7d638d0a28..af5498e05e 100644 --- a/src/libshared/src/apparmor-util.c +++ b/src/libshared/src/apparmor-util.c @@ -20,9 +20,9 @@ #include <stddef.h> #include "basic/alloc-util.h" -#include "shared/apparmor-util.h" #include "basic/fileio.h" #include "basic/parse-util.h" +#include "shared/apparmor-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 864c62ee9b..9be47256aa 100644 --- a/src/libshared/src/ask-password-api.c +++ b/src/libshared/src/ask-password-api.c @@ -40,7 +40,6 @@ #include <unistd.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" @@ -59,6 +58,7 @@ #include "basic/umask-util.h" #include "basic/utf8.h" #include "basic/util.h" +#include "shared/ask-password-api.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 ac3a1bf6b9..881bfb061c 100644 --- a/src/libshared/src/base-filesystem.c +++ b/src/libshared/src/base-filesystem.c @@ -26,7 +26,6 @@ #include <unistd.h> #include "basic/alloc-util.h" -#include "shared/base-filesystem.h" #include "basic/fd-util.h" #include "basic/log.h" #include "basic/macro.h" @@ -34,6 +33,7 @@ #include "basic/umask-util.h" #include "basic/user-util.h" #include "basic/util.h" +#include "shared/base-filesystem.h" typedef struct BaseFilesystem { const char *dir; diff --git a/src/libshared/src/boot-timestamps.c b/src/libshared/src/boot-timestamps.c index 4d2bad0492..3e3034f032 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 "basic/macro.h" +#include "basic/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 9ae172c181..08c495aae5 100644 --- a/src/libshared/src/bus-unit-util.c +++ b/src/libshared/src/bus-unit-util.c @@ -18,9 +18,6 @@ ***/ #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" @@ -37,6 +34,9 @@ #include "basic/terminal-util.h" #include "basic/utf8.h" #include "basic/util.h" +#include "sd-bus/bus-internal.h" +#include "shared/bus-unit-util.h" +#include "shared/bus-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 6163b40679..b303509f34 100644 --- a/src/libshared/src/bus-util.c +++ b/src/libshared/src/bus-util.c @@ -35,10 +35,7 @@ #include <systemd/sd-id128.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" @@ -49,6 +46,9 @@ #include "basic/stdio-util.h" #include "basic/strv.h" #include "basic/user-util.h" +#include "sd-bus/bus-internal.h" +#include "sd-bus/bus-message.h" +#include "shared/bus-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 6b1b8dba99..e8dae923f5 100644 --- a/src/libshared/src/cgroup-show.c +++ b/src/libshared/src/cgroup-show.c @@ -25,17 +25,17 @@ #include <string.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" +#include "shared/cgroup-show.h" +#include "shared/output-mode.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 326fa32a3a..b9c60c48ae 100644 --- a/src/libshared/src/clean-ipc.c +++ b/src/libshared/src/clean-ipc.c @@ -32,7 +32,6 @@ #include <sys/stat.h> #include <unistd.h> -#include "shared/clean-ipc.h" #include "basic/dirent-util.h" #include "basic/fd-util.h" #include "basic/fileio.h" @@ -41,6 +40,7 @@ #include "basic/macro.h" #include "basic/string-util.h" #include "basic/strv.h" +#include "shared/clean-ipc.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 bb0346f416..fdfa3b0941 100644 --- a/src/libshared/src/condition.c +++ b/src/libshared/src/condition.c @@ -30,16 +30,13 @@ #include <systemd/sd-id128.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" @@ -53,6 +50,9 @@ #include "basic/string-util.h" #include "basic/util.h" #include "basic/virt.h" +#include "shared/apparmor-util.h" +#include "shared/condition.h" +#include "shared/ima-util.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 ee1cb0f5d7..6631ff966f 100644 --- a/src/libshared/src/conf-parser.c +++ b/src/libshared/src/conf-parser.c @@ -27,7 +27,6 @@ #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" @@ -43,6 +42,7 @@ #include "basic/syslog-util.h" #include "basic/time-util.h" #include "basic/utf8.h" +#include "shared/conf-parser.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 57489ef6d9..495099dc28 100644 --- a/src/libshared/src/dev-setup.c +++ b/src/libshared/src/dev-setup.c @@ -22,12 +22,12 @@ #include <unistd.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" +#include "shared/dev-setup.h" int dev_setup(const char *prefix, uid_t uid, gid_t gid) { static const char symlinks[] = diff --git a/src/libshared/src/dropin.c b/src/libshared/src/dropin.c index 8a2cccb38f..ed044e0ba4 100644 --- a/src/libshared/src/dropin.c +++ b/src/libshared/src/dropin.c @@ -25,7 +25,6 @@ #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" @@ -38,6 +37,7 @@ #include "basic/string-util.h" #include "basic/strv.h" #include "basic/unit-name.h" +#include "shared/dropin.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 28bf61c11a..41247eac03 100644 --- a/src/libshared/src/efivars.c +++ b/src/libshared/src/efivars.c @@ -31,7 +31,6 @@ #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" @@ -41,6 +40,7 @@ #include "basic/utf8.h" #include "basic/util.h" #include "basic/virt.h" +#include "shared/efivars.h" #ifdef ENABLE_EFI diff --git a/src/libshared/src/fstab-util.c b/src/libshared/src/fstab-util.c index 82a175bfd6..3f301c6fe3 100644 --- a/src/libshared/src/fstab-util.c +++ b/src/libshared/src/fstab-util.c @@ -25,7 +25,6 @@ #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" @@ -33,6 +32,7 @@ #include "basic/string-util.h" #include "basic/strv.h" #include "basic/util.h" +#include "shared/fstab-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 f222de6b4f..069134a4be 100644 --- a/src/libshared/src/gcrypt-util.c +++ b/src/libshared/src/gcrypt-util.c @@ -22,8 +22,8 @@ #ifdef HAVE_GCRYPT #include <gcrypt.h> -#include "gcrypt-util.h" #include "basic/hexdecoct.h" +#include "shared/gcrypt-util.h" void initialize_libgcrypt(bool secmem) { const char *p; diff --git a/src/libshared/src/generator.c b/src/libshared/src/generator.c index f7ced68f36..7e7c3fd78b 100644 --- a/src/libshared/src/generator.c +++ b/src/libshared/src/generator.c @@ -21,12 +21,9 @@ #include <unistd.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" @@ -36,6 +33,9 @@ #include "basic/time-util.h" #include "basic/unit-name.h" #include "basic/util.h" +#include "shared/dropin.h" +#include "shared/fstab-util.h" +#include "shared/generator.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/import-util.c b/src/libshared/src/import-util.c index d587b596b2..286cc1398a 100644 --- a/src/libshared/src/import-util.c +++ b/src/libshared/src/import-util.c @@ -22,13 +22,13 @@ #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" +#include "shared/import-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 d22057d5aa..2d62e3dfd2 100644 --- a/src/libshared/src/install-printf.c +++ b/src/libshared/src/install-printf.c @@ -23,12 +23,12 @@ #include <unistd.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" +#include "shared/install-printf.h" +#include "shared/install.h" +#include "shared/specifier.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 d07ff0a652..bd360abcee 100644 --- a/src/libshared/src/install.c +++ b/src/libshared/src/install.c @@ -31,20 +31,16 @@ #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" @@ -54,6 +50,10 @@ #include "basic/string-util.h" #include "basic/strv.h" #include "basic/unit-name.h" +#include "shared/conf-parser.h" +#include "shared/install-printf.h" +#include "shared/install.h" +#include "shared/path-lookup.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 8956728414..1e5a7c6f01 100644 --- a/src/libshared/src/logs-show.c +++ b/src/libshared/src/logs-show.c @@ -37,11 +37,8 @@ #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" @@ -51,6 +48,9 @@ #include "basic/time-util.h" #include "basic/utf8.h" #include "basic/util.h" +#include "sd-journal/journal-internal.h" +#include "shared/logs-show.h" +#include "shared/output-mode.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 8f533d82ec..c7b0a33ce5 100644 --- a/src/libshared/src/machine-image.c +++ b/src/libshared/src/machine-image.c @@ -20,13 +20,14 @@ #include <dirent.h> #include <errno.h> #include <fcntl.h> +#include <linux/fs.h> #include <stdio.h> #include <stdlib.h> #include <string.h> #include <sys/file.h> #include <sys/stat.h> #include <unistd.h> -#include <linux/fs.h> + #include "basic/alloc-util.h" #include "basic/btrfs-util.h" #include "basic/chattr-util.h" @@ -38,7 +39,6 @@ #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" @@ -49,6 +49,7 @@ #include "basic/utf8.h" #include "basic/util.h" #include "basic/xattr-util.h" +#include "shared/machine-image.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 7ca3980ece..ee8c0a9ba1 100644 --- a/src/libshared/src/machine-pool.c +++ b/src/libshared/src/machine-pool.c @@ -43,7 +43,6 @@ #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" @@ -54,6 +53,7 @@ #include "basic/signal-util.h" #include "basic/stat-util.h" #include "basic/string-util.h" +#include "shared/machine-pool.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 b112ceb20f..f482b0fa06 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 "shared/output-mode.h" #include "basic/string-table.h" +#include "shared/output-mode.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 611337bed3..8598d8e51a 100644 --- a/src/libshared/src/pager.c +++ b/src/libshared/src/pager.c @@ -32,11 +32,11 @@ #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" +#include "shared/pager.h" static pid_t pager_pid = 0; diff --git a/src/libshared/src/path-lookup.c b/src/libshared/src/path-lookup.c index 3e9a478075..6ce89f4ed4 100644 --- a/src/libshared/src/path-lookup.c +++ b/src/libshared/src/path-lookup.c @@ -23,17 +23,17 @@ #include <string.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" +#include "shared/install.h" +#include "shared/path-lookup.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 d8d8af6b4a..cd6a360ae4 100644 --- a/src/libshared/src/ptyfwd.c +++ b/src/libshared/src/ptyfwd.c @@ -36,8 +36,8 @@ #include "basic/fd-util.h" #include "basic/log.h" #include "basic/macro.h" -#include "shared/ptyfwd.h" #include "basic/time-util.h" +#include "shared/ptyfwd.h" struct PTYForward { sd_event *event; diff --git a/src/libshared/src/resolve-util.c b/src/libshared/src/resolve-util.c index 17d6188ba3..1f031e566d 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 "basic/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 2278a0e904..a7063539fb 100644 --- a/src/libshared/src/seccomp-util.c +++ b/src/libshared/src/seccomp-util.c @@ -22,8 +22,8 @@ #include <stddef.h> #include "basic/macro.h" -#include "shared/seccomp-util.h" #include "basic/string-util.h" +#include "shared/seccomp-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 9525246fb3..fd33763f68 100644 --- a/src/libshared/src/sleep-config.c +++ b/src/libshared/src/sleep-config.c @@ -26,7 +26,6 @@ #include <unistd.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" @@ -34,9 +33,10 @@ #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" +#include "shared/conf-parser.h" +#include "shared/sleep-config.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 bfd47d88dc..6c8aafcfb1 100644 --- a/src/libshared/src/spawn-ask-password-agent.c +++ b/src/libshared/src/spawn-ask-password-agent.c @@ -23,8 +23,8 @@ #include "basic/log.h" #include "basic/process-util.h" -#include "shared/spawn-ask-password-agent.h" #include "basic/util.h" +#include "shared/spawn-ask-password-agent.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 d5d129ccad..cb191fb6c5 100644 --- a/src/libshared/src/spawn-polkit-agent.c +++ b/src/libshared/src/spawn-polkit-agent.c @@ -28,10 +28,10 @@ #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" +#include "shared/spawn-polkit-agent.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 195854f212..42bd306e00 100644 --- a/src/libshared/src/specifier.c +++ b/src/libshared/src/specifier.c @@ -29,8 +29,8 @@ #include "basic/alloc-util.h" #include "basic/hostname-util.h" #include "basic/macro.h" -#include "shared/specifier.h" #include "basic/string-util.h" +#include "shared/specifier.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 42079ea70b..d41a114ae1 100644 --- a/src/libshared/src/switch-root.c +++ b/src/libshared/src/switch-root.c @@ -26,7 +26,6 @@ #include <sys/stat.h> #include <unistd.h> -#include "shared/base-filesystem.h" #include "basic/fd-util.h" #include "basic/log.h" #include "basic/missing.h" @@ -35,9 +34,10 @@ #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" +#include "shared/base-filesystem.h" +#include "shared/switch-root.h" int switch_root(const char *new_root, const char *oldroot, bool detach_oldroot, unsigned long mountflags) { diff --git a/src/libshared/src/uid-range.c b/src/libshared/src/uid-range.c index 3764198610..22cac34c6e 100644 --- a/src/libshared/src/uid-range.c +++ b/src/libshared/src/uid-range.c @@ -22,8 +22,8 @@ #include <string.h> #include "basic/macro.h" -#include "shared/uid-range.h" #include "basic/user-util.h" +#include "shared/uid-range.h" static bool uid_range_intersect(UidRange *range, uid_t start, uid_t nr) { assert(range); diff --git a/src/libshared/src/watchdog.c b/src/libshared/src/watchdog.c index bc5c5f0503..49577669f4 100644 --- a/src/libshared/src/watchdog.c +++ b/src/libshared/src/watchdog.c @@ -19,10 +19,10 @@ #include <errno.h> #include <fcntl.h> +#include <linux/watchdog.h> #include <sys/ioctl.h> #include <syslog.h> #include <unistd.h> -#include <linux/watchdog.h> #include "basic/fd-util.h" #include "basic/log.h" diff --git a/src/libsystemd-network/include/systemd-network/dhcp-internal.h b/src/libsystemd-network/include/systemd-network/dhcp-internal.h index ac9f9705eb..0fb012e240 100644 --- a/src/libsystemd-network/include/systemd-network/dhcp-internal.h +++ b/src/libsystemd-network/include/systemd-network/dhcp-internal.h @@ -25,10 +25,9 @@ #include <net/if_arp.h> #include <stdint.h> -#include "systemd-network/sd-dhcp-client.h" - -#include "systemd-network/dhcp-protocol.h" #include "basic/socket-util.h" +#include "systemd-network/dhcp-protocol.h" +#include "systemd-network/sd-dhcp-client.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 048e89dc9a..d4108c1095 100644 --- a/src/libsystemd-network/include/systemd-network/dhcp-lease-internal.h +++ b/src/libsystemd-network/include/systemd-network/dhcp-lease-internal.h @@ -20,14 +20,13 @@ along with systemd; If not, see <http://www.gnu.org/licenses/>. ***/ -#include <stdint.h> #include <linux/if_packet.h> +#include <stdint.h> -#include "systemd-network/sd-dhcp-client.h" - -#include "systemd-network/dhcp-protocol.h" #include "basic/list.h" #include "basic/util.h" +#include "systemd-network/dhcp-protocol.h" +#include "systemd-network/sd-dhcp-client.h" struct sd_dhcp_route { struct in_addr dst_addr; 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 97543b992a..53b46a8514 100644 --- a/src/libsystemd-network/include/systemd-network/dhcp-server-internal.h +++ b/src/libsystemd-network/include/systemd-network/dhcp-server-internal.h @@ -20,13 +20,13 @@ along with systemd; If not, see <http://www.gnu.org/licenses/>. ***/ -#include "systemd-network/sd-dhcp-server.h" #include <systemd/sd-event.h> -#include "systemd-network/dhcp-internal.h" #include "basic/hashmap.h" #include "basic/log.h" #include "basic/util.h" +#include "systemd-network/dhcp-internal.h" +#include "systemd-network/sd-dhcp-server.h" typedef struct DHCPClientId { size_t length; diff --git a/src/libsystemd-network/include/systemd-network/dhcp6-lease-internal.h b/src/libsystemd-network/include/systemd-network/dhcp6-lease-internal.h index c7c7a08769..3f51830c94 100644 --- a/src/libsystemd-network/include/systemd-network/dhcp6-lease-internal.h +++ b/src/libsystemd-network/include/systemd-network/dhcp6-lease-internal.h @@ -22,9 +22,8 @@ #include <stdint.h> -#include "systemd-network/sd-dhcp6-lease.h" - #include "systemd-network/dhcp6-internal.h" +#include "systemd-network/sd-dhcp6-lease.h" struct sd_dhcp6_lease { unsigned n_ref; diff --git a/src/libsystemd-network/include/systemd-network/lldp-internal.h b/src/libsystemd-network/include/systemd-network/lldp-internal.h index 9001237fe2..a79031b40d 100644 --- a/src/libsystemd-network/include/systemd-network/lldp-internal.h +++ b/src/libsystemd-network/include/systemd-network/lldp-internal.h @@ -21,11 +21,11 @@ ***/ #include <systemd/sd-event.h> -#include "systemd-network/sd-lldp.h" #include "basic/hashmap.h" #include "basic/log.h" #include "basic/prioq.h" +#include "systemd-network/sd-lldp.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 f2730bb608..cbd9470be0 100644 --- a/src/libsystemd-network/include/systemd-network/lldp-neighbor.h +++ b/src/libsystemd-network/include/systemd-network/lldp-neighbor.h @@ -23,11 +23,10 @@ #include <stdbool.h> #include <sys/types.h> -#include "systemd-network/sd-lldp.h" - #include "basic/hash-funcs.h" -#include "systemd-network/lldp-internal.h" #include "basic/time-util.h" +#include "systemd-network/lldp-internal.h" +#include "systemd-network/sd-lldp.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 a5606cb2a8..4f98e84c80 100644 --- a/src/libsystemd-network/include/systemd-network/network-internal.h +++ b/src/libsystemd-network/include/systemd-network/network-internal.h @@ -21,9 +21,8 @@ #include <stdbool.h> -#include "systemd-network/sd-dhcp-lease.h" - #include "shared/condition.h" +#include "systemd-network/sd-dhcp-lease.h" #include "udev.h" bool net_match_config(const struct ether_addr *match_mac, 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 cc51933b1b..375acd5ea7 100644 --- a/src/libsystemd-network/include/systemd-network/sd-dhcp-client.h +++ b/src/libsystemd-network/include/systemd-network/sd-dhcp-client.h @@ -25,9 +25,10 @@ #include <netinet/in.h> #include <sys/types.h> -#include "systemd-network/sd-dhcp-lease.h" #include <systemd/sd-event.h> +#include "systemd-network/sd-dhcp-lease.h" + #include "_sd-common.h" _SD_BEGIN_DECLARATIONS; 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 dd6cb32aae..7111ca1274 100644 --- a/src/libsystemd-network/include/systemd-network/sd-dhcp6-client.h +++ b/src/libsystemd-network/include/systemd-network/sd-dhcp6-client.h @@ -24,9 +24,10 @@ #include <net/ethernet.h> #include <sys/types.h> -#include "systemd-network/sd-dhcp6-lease.h" #include <systemd/sd-event.h> +#include "systemd-network/sd-dhcp6-lease.h" + #include "_sd-common.h" _SD_BEGIN_DECLARATIONS; diff --git a/src/libsystemd-network/src/arp-util.c b/src/libsystemd-network/src/arp-util.c index a254fe7c62..15867c24a3 100644 --- a/src/libsystemd-network/src/arp-util.c +++ b/src/libsystemd-network/src/arp-util.c @@ -18,12 +18,12 @@ along with systemd; If not, see <http://www.gnu.org/licenses/>. ***/ -#include <linux/filter.h> #include <arpa/inet.h> +#include <linux/filter.h> -#include "systemd-network/arp-util.h" #include "basic/fd-util.h" #include "basic/util.h" +#include "systemd-network/arp-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 fce44636bc..3edba38bd8 100644 --- a/src/libsystemd-network/src/dhcp-identifier.c +++ b/src/libsystemd-network/src/dhcp-identifier.c @@ -17,16 +17,16 @@ along with systemd; If not, see <http://www.gnu.org/licenses/>. ***/ -#include "libudev.h" +#include <libudev.h> #include <systemd/sd-id128.h> -#include "systemd-network/dhcp-identifier.h" -#include "systemd-network/dhcp6-protocol.h" -#include "systemd-network/network-internal.h" #include "basic/siphash24.h" #include "basic/sparse-endian.h" -#include "shared/udev-util.h" #include "basic/virt.h" +#include "shared/udev-util.h" +#include "systemd-network/dhcp-identifier.h" +#include "systemd-network/dhcp6-protocol.h" +#include "systemd-network/network-internal.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 a310e9e88e..d5fa3ebf2d 100644 --- a/src/libsystemd-network/src/dhcp-network.c +++ b/src/libsystemd-network/src/dhcp-network.c @@ -18,18 +18,18 @@ ***/ #include <errno.h> +#include <linux/filter.h> +#include <linux/if_infiniband.h> +#include <linux/if_packet.h> #include <net/ethernet.h> #include <net/if_arp.h> #include <stdio.h> #include <string.h> #include <sys/socket.h> -#include <linux/filter.h> -#include <linux/if_infiniband.h> -#include <linux/if_packet.h> -#include "systemd-network/dhcp-internal.h" #include "basic/fd-util.h" #include "basic/socket-util.h" +#include "systemd-network/dhcp-internal.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 bd0ecd11e6..f47b2ae9e7 100644 --- a/src/libsystemd-network/src/dhcp-option.c +++ b/src/libsystemd-network/src/dhcp-option.c @@ -24,7 +24,6 @@ #include "basic/alloc-util.h" #include "basic/utf8.h" - #include "systemd-network/dhcp-internal.h" static int option_append(uint8_t options[], size_t size, size_t *offset, diff --git a/src/libsystemd-network/src/dhcp6-network.c b/src/libsystemd-network/src/dhcp6-network.c index 53019977fd..0222b03a75 100644 --- a/src/libsystemd-network/src/dhcp6-network.c +++ b/src/libsystemd-network/src/dhcp6-network.c @@ -18,6 +18,7 @@ ***/ #include <errno.h> +#include <linux/if_packet.h> #include <netinet/in.h> #include <netinet/ip6.h> #include <stdio.h> @@ -25,12 +26,11 @@ #include <sys/socket.h> #include <sys/types.h> #include <unistd.h> -#include <linux/if_packet.h> -#include "systemd-network/dhcp6-internal.h" -#include "systemd-network/dhcp6-protocol.h" #include "basic/fd-util.h" #include "basic/socket-util.h" +#include "systemd-network/dhcp6-internal.h" +#include "systemd-network/dhcp6-protocol.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 8c7c179587..060a822834 100644 --- a/src/libsystemd-network/src/dhcp6-option.c +++ b/src/libsystemd-network/src/dhcp6-option.c @@ -21,16 +21,15 @@ #include <netinet/in.h> #include <string.h> -#include "systemd-network/sd-dhcp6-client.h" - #include "basic/alloc-util.h" -#include "systemd-network/dhcp6-internal.h" -#include "systemd-network/dhcp6-protocol.h" -#include "shared/dns-domain.h" #include "basic/sparse-endian.h" #include "basic/strv.h" #include "basic/unaligned.h" #include "basic/util.h" +#include "shared/dns-domain.h" +#include "systemd-network/dhcp6-internal.h" +#include "systemd-network/dhcp6-protocol.h" +#include "systemd-network/sd-dhcp6-client.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 582e5d89c1..cdca20efa5 100644 --- a/src/libsystemd-network/src/icmp6-util.c +++ b/src/libsystemd-network/src/icmp6-util.c @@ -18,6 +18,7 @@ ***/ #include <errno.h> +#include <linux/if_packet.h> #include <netinet/icmp6.h> #include <netinet/in.h> #include <netinet/ip6.h> @@ -26,11 +27,10 @@ #include <sys/socket.h> #include <sys/types.h> #include <unistd.h> -#include <linux/if_packet.h> #include "basic/fd-util.h" -#include "systemd-network/icmp6-util.h" #include "basic/socket-util.h" +#include "systemd-network/icmp6-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 520d0090af..406af019f5 100644 --- a/src/libsystemd-network/src/lldp-neighbor.c +++ b/src/libsystemd-network/src/lldp-neighbor.c @@ -22,9 +22,9 @@ #include "basic/ether-addr-util.h" #include "basic/hexdecoct.h" #include "basic/in-addr-util.h" +#include "basic/unaligned.h" #include "systemd-network/lldp-internal.h" #include "systemd-network/lldp-neighbor.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 9af66bdcb5..7e7281d53b 100644 --- a/src/libsystemd-network/src/lldp-network.c +++ b/src/libsystemd-network/src/lldp-network.c @@ -22,8 +22,8 @@ #include <netinet/if_ether.h> #include "basic/fd-util.h" -#include "systemd-network/lldp-network.h" #include "basic/socket-util.h" +#include "systemd-network/lldp-network.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 e3973c11a9..87feb094c6 100644 --- a/src/libsystemd-network/src/network-internal.c +++ b/src/libsystemd-network/src/network-internal.c @@ -21,16 +21,10 @@ #include <linux/if.h> #include <netinet/ether.h> -#include "systemd-network/sd-ndisc.h" - #include "basic/alloc-util.h" -#include "shared/condition.h" -#include "shared/conf-parser.h" -#include "systemd-network/dhcp-lease-internal.h" #include "basic/ether-addr-util.h" #include "basic/hexdecoct.h" #include "basic/log.h" -#include "systemd-network/network-internal.h" #include "basic/parse-util.h" #include "basic/siphash24.h" #include "basic/socket-util.h" @@ -38,6 +32,11 @@ #include "basic/strv.h" #include "basic/utf8.h" #include "basic/util.h" +#include "shared/condition.h" +#include "shared/conf-parser.h" +#include "systemd-network/dhcp-lease-internal.h" +#include "systemd-network/network-internal.h" +#include "systemd-network/sd-ndisc.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 7f734a7b37..b3ef17961d 100644 --- a/src/libsystemd-network/src/sd-dhcp-client.c +++ b/src/libsystemd-network/src/sd-dhcp-client.c @@ -18,27 +18,26 @@ ***/ #include <errno.h> +#include <linux/if_infiniband.h> #include <net/ethernet.h> #include <net/if_arp.h> #include <stdio.h> #include <stdlib.h> #include <string.h> #include <sys/ioctl.h> -#include <linux/if_infiniband.h> - -#include "systemd-network/sd-dhcp-client.h" #include "basic/alloc-util.h" #include "basic/async.h" -#include "systemd-network/dhcp-identifier.h" -#include "systemd-network/dhcp-internal.h" -#include "systemd-network/dhcp-lease-internal.h" -#include "systemd-network/dhcp-protocol.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" +#include "shared/dns-domain.h" +#include "systemd-network/dhcp-identifier.h" +#include "systemd-network/dhcp-internal.h" +#include "systemd-network/dhcp-lease-internal.h" +#include "systemd-network/dhcp-protocol.h" +#include "systemd-network/sd-dhcp-client.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 d0e54ae376..0edc075b58 100644 --- a/src/libsystemd-network/src/sd-dhcp-lease.c +++ b/src/libsystemd-network/src/sd-dhcp-lease.c @@ -24,22 +24,21 @@ #include <stdlib.h> #include <string.h> -#include "systemd-network/sd-dhcp-lease.h" - #include "basic/alloc-util.h" -#include "systemd-network/dhcp-lease-internal.h" -#include "systemd-network/dhcp-protocol.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 "systemd-network/network-internal.h" #include "basic/parse-util.h" #include "basic/stdio-util.h" #include "basic/string-util.h" #include "basic/unaligned.h" +#include "shared/dns-domain.h" +#include "systemd-network/dhcp-lease-internal.h" +#include "systemd-network/dhcp-protocol.h" +#include "systemd-network/network-internal.h" +#include "systemd-network/sd-dhcp-lease.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 2209855067..5abc923d92 100644 --- a/src/libsystemd-network/src/sd-dhcp-server.c +++ b/src/libsystemd-network/src/sd-dhcp-server.c @@ -20,15 +20,14 @@ #include <sys/ioctl.h> -#include "systemd-network/sd-dhcp-server.h" - #include "basic/alloc-util.h" -#include "systemd-network/dhcp-internal.h" -#include "systemd-network/dhcp-server-internal.h" #include "basic/fd-util.h" #include "basic/in-addr-util.h" #include "basic/siphash24.h" #include "basic/string-util.h" +#include "systemd-network/dhcp-internal.h" +#include "systemd-network/dhcp-server-internal.h" +#include "systemd-network/sd-dhcp-server.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 c2aa36aa9d..1f46946b14 100644 --- a/src/libsystemd-network/src/sd-dhcp6-client.c +++ b/src/libsystemd-network/src/sd-dhcp6-client.c @@ -18,24 +18,23 @@ ***/ #include <errno.h> +#include <linux/if_infiniband.h> #include <string.h> #include <sys/ioctl.h> -#include <linux/if_infiniband.h> - -#include "systemd-network/sd-dhcp6-client.h" #include "basic/alloc-util.h" -#include "systemd-network/dhcp-identifier.h" -#include "systemd-network/dhcp6-internal.h" -#include "systemd-network/dhcp6-lease-internal.h" -#include "systemd-network/dhcp6-protocol.h" #include "basic/fd-util.h" #include "basic/in-addr-util.h" -#include "systemd-network/network-internal.h" #include "basic/random-util.h" #include "basic/socket-util.h" #include "basic/string-table.h" #include "basic/util.h" +#include "systemd-network/dhcp-identifier.h" +#include "systemd-network/dhcp6-internal.h" +#include "systemd-network/dhcp6-lease-internal.h" +#include "systemd-network/dhcp6-protocol.h" +#include "systemd-network/network-internal.h" +#include "systemd-network/sd-dhcp6-client.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 da241936c5..cb53533492 100644 --- a/src/libsystemd-network/src/sd-dhcp6-lease.c +++ b/src/libsystemd-network/src/sd-dhcp6-lease.c @@ -21,10 +21,10 @@ #include <errno.h> #include "basic/alloc-util.h" -#include "systemd-network/dhcp6-lease-internal.h" -#include "systemd-network/dhcp6-protocol.h" #include "basic/strv.h" #include "basic/util.h" +#include "systemd-network/dhcp6-lease-internal.h" +#include "systemd-network/dhcp6-protocol.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 8c603d8a7d..b361b16e7f 100644 --- a/src/libsystemd-network/src/sd-ipv4acd.c +++ b/src/libsystemd-network/src/sd-ipv4acd.c @@ -24,10 +24,7 @@ #include <stdlib.h> #include <string.h> -#include "systemd-network/sd-ipv4acd.h" - #include "basic/alloc-util.h" -#include "systemd-network/arp-util.h" #include "basic/fd-util.h" #include "basic/in-addr-util.h" #include "basic/list.h" @@ -35,6 +32,8 @@ #include "basic/refcnt.h" #include "basic/siphash24.h" #include "basic/util.h" +#include "systemd-network/arp-util.h" +#include "systemd-network/sd-ipv4acd.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 fc3c0dd090..c8428ba489 100644 --- a/src/libsystemd-network/src/sd-ipv4ll.c +++ b/src/libsystemd-network/src/sd-ipv4ll.c @@ -24,9 +24,6 @@ #include <stdlib.h> #include <string.h> -#include "systemd-network/sd-ipv4acd.h" -#include "systemd-network/sd-ipv4ll.h" - #include "basic/alloc-util.h" #include "basic/in-addr-util.h" #include "basic/list.h" @@ -35,6 +32,8 @@ #include "basic/siphash24.h" #include "basic/sparse-endian.h" #include "basic/util.h" +#include "systemd-network/sd-ipv4acd.h" +#include "systemd-network/sd-ipv4ll.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 09c5ba5a5b..412c070ebb 100644 --- a/src/libsystemd-network/src/sd-lldp.c +++ b/src/libsystemd-network/src/sd-lldp.c @@ -20,15 +20,14 @@ #include <arpa/inet.h> -#include "systemd-network/sd-lldp.h" - #include "basic/alloc-util.h" +#include "basic/ether-addr-util.h" #include "basic/fd-util.h" +#include "basic/socket-util.h" #include "systemd-network/lldp-internal.h" #include "systemd-network/lldp-neighbor.h" #include "systemd-network/lldp-network.h" -#include "basic/socket-util.h" -#include "basic/ether-addr-util.h" +#include "systemd-network/sd-lldp.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 0e19febff1..7d19373f18 100644 --- a/src/libsystemd-network/src/sd-ndisc.c +++ b/src/libsystemd-network/src/sd-ndisc.c @@ -24,15 +24,14 @@ #include <string.h> #include <sys/ioctl.h> -#include "systemd-network/sd-ndisc.h" - #include "basic/alloc-util.h" #include "basic/async.h" -#include "systemd-network/icmp6-util.h" #include "basic/in-addr-util.h" #include "basic/list.h" #include "basic/socket-util.h" #include "basic/string-util.h" +#include "systemd-network/icmp6-util.h" +#include "systemd-network/sd-ndisc.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 bf3f401ade..73f9e04e6f 100644 --- a/src/libsystemd-network/test/test-acd.c +++ b/src/libsystemd-network/test/test-acd.c @@ -18,11 +18,10 @@ ***/ #include <errno.h> -#include <stdlib.h> -#include <unistd.h> - #include <linux/veth.h> #include <net/if.h> +#include <stdlib.h> +#include <unistd.h> #include <systemd/sd-event.h> diff --git a/src/libsystemd-network/test/test-dhcp-client.c b/src/libsystemd-network/test/test-dhcp-client.c index bee542ac42..c116696c8d 100644 --- a/src/libsystemd-network/test/test-dhcp-client.c +++ b/src/libsystemd-network/test/test-dhcp-client.c @@ -22,15 +22,15 @@ #include <sys/socket.h> #include <unistd.h> -#include "systemd-network/sd-dhcp-client.h" #include <systemd/sd-event.h> #include "basic/alloc-util.h" +#include "basic/fd-util.h" +#include "basic/util.h" #include "systemd-network/dhcp-identifier.h" #include "systemd-network/dhcp-internal.h" #include "systemd-network/dhcp-protocol.h" -#include "basic/fd-util.h" -#include "basic/util.h" +#include "systemd-network/sd-dhcp-client.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 20995c98ba..eda42b0ba5 100644 --- a/src/libsystemd-network/test/test-dhcp-option.c +++ b/src/libsystemd-network/test/test-dhcp-option.c @@ -4,10 +4,10 @@ #include <string.h> #include "basic/alloc-util.h" -#include "systemd-network/dhcp-internal.h" -#include "systemd-network/dhcp-protocol.h" #include "basic/macro.h" #include "basic/util.h" +#include "systemd-network/dhcp-internal.h" +#include "systemd-network/dhcp-protocol.h" struct option_desc { uint8_t sname[64]; diff --git a/src/libsystemd-network/test/test-dhcp-server.c b/src/libsystemd-network/test/test-dhcp-server.c index d7029d1cc5..0796a98707 100644 --- a/src/libsystemd-network/test/test-dhcp-server.c +++ b/src/libsystemd-network/test/test-dhcp-server.c @@ -20,10 +20,10 @@ #include <errno.h> -#include "systemd-network/sd-dhcp-server.h" #include <systemd/sd-event.h> #include "systemd-network/dhcp-server-internal.h" +#include "systemd-network/sd-dhcp-server.h" static void test_pool(struct in_addr *address, unsigned size, int ret) { _cleanup_(sd_dhcp_server_unrefp) sd_dhcp_server *server = NULL; diff --git a/src/libsystemd-network/test/test-dhcp6-client.c b/src/libsystemd-network/test/test-dhcp6-client.c index 9709fabf74..66424bc624 100644 --- a/src/libsystemd-network/test/test-dhcp6-client.c +++ b/src/libsystemd-network/test/test-dhcp6-client.c @@ -24,16 +24,16 @@ #include <sys/types.h> #include <unistd.h> -#include "systemd-network/sd-dhcp6-client.h" #include <systemd/sd-event.h> -#include "systemd-network/dhcp6-internal.h" -#include "systemd-network/dhcp6-lease-internal.h" -#include "systemd-network/dhcp6-protocol.h" #include "basic/fd-util.h" #include "basic/macro.h" #include "basic/socket-util.h" #include "basic/virt.h" +#include "systemd-network/dhcp6-internal.h" +#include "systemd-network/dhcp6-lease-internal.h" +#include "systemd-network/dhcp6-protocol.h" +#include "systemd-network/sd-dhcp6-client.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 aba41f4af9..00b909f021 100644 --- a/src/libsystemd-network/test/test-ipv4ll-manual.c +++ b/src/libsystemd-network/test/test-ipv4ll-manual.c @@ -18,10 +18,10 @@ ***/ #include <errno.h> +#include <linux/veth.h> #include <net/if.h> #include <stdlib.h> #include <unistd.h> -#include <linux/veth.h> #include <systemd/sd-event.h> diff --git a/src/libsystemd-network/test/test-ipv4ll.c b/src/libsystemd-network/test/test-ipv4ll.c index afb69a22fc..af259cf0de 100644 --- a/src/libsystemd-network/test/test-ipv4ll.c +++ b/src/libsystemd-network/test/test-ipv4ll.c @@ -25,12 +25,11 @@ #include <sys/types.h> #include <unistd.h> -#include "systemd-network/sd-ipv4ll.h" -#include "systemd-network/arp-util.h" - #include "basic/fd-util.h" #include "basic/socket-util.h" #include "basic/util.h" +#include "systemd-network/arp-util.h" +#include "systemd-network/sd-ipv4ll.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 ea625ea28b..858c7789d7 100644 --- a/src/libsystemd-network/test/test-lldp.c +++ b/src/libsystemd-network/test/test-lldp.c @@ -25,13 +25,13 @@ #include <unistd.h> #include <systemd/sd-event.h> -#include "systemd-network/sd-lldp.h" #include "basic/alloc-util.h" #include "basic/fd-util.h" -#include "systemd-network/lldp-network.h" #include "basic/macro.h" #include "basic/string-util.h" +#include "systemd-network/lldp-network.h" +#include "systemd-network/sd-lldp.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 200983b4ab..92445eff5d 100644 --- a/src/libsystemd-network/test/test-ndisc-rs.c +++ b/src/libsystemd-network/test/test-ndisc-rs.c @@ -19,10 +19,9 @@ #include <netinet/icmp6.h> -#include "systemd-network/sd-ndisc.h" - -#include "systemd-network/icmp6-util.h" #include "basic/socket-util.h" +#include "systemd-network/icmp6-util.h" +#include "systemd-network/sd-ndisc.h" static struct ether_addr mac_addr = { .ether_addr_octet = {'A', 'B', 'C', '1', '2', '3'} diff --git a/src/libsystemd/src/sd-bus/bus-bloom.c b/src/libsystemd/src/sd-bus/bus-bloom.c index d8bc9172f2..9327fb40c7 100644 --- a/src/libsystemd/src/sd-bus/bus-bloom.c +++ b/src/libsystemd/src/sd-bus/bus-bloom.c @@ -17,10 +17,11 @@ along with systemd; If not, see <http://www.gnu.org/licenses/>. ***/ -#include "bus-bloom.h" #include "basic/siphash24.h" #include "basic/util.h" +#include "bus-bloom.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 8eb0ee31be..43b9d03aa9 100644 --- a/src/libsystemd/src/sd-bus/bus-container.c +++ b/src/libsystemd/src/sd-bus/bus-container.c @@ -20,13 +20,14 @@ #include <fcntl.h> #include <unistd.h> -#include "bus-container.h" -#include "bus-internal.h" -#include "bus-socket.h" #include "basic/fd-util.h" #include "basic/process-util.h" #include "basic/util.h" +#include "bus-container.h" +#include "bus-internal.h" +#include "bus-socket.h" + int bus_container_connect_socket(sd_bus *b) { _cleanup_close_pair_ int pair[2] = { -1, -1 }; _cleanup_close_ int pidnsfd = -1, mntnsfd = -1, usernsfd = -1, rootfd = -1; diff --git a/src/libsystemd/src/sd-bus/bus-convenience.c b/src/libsystemd/src/sd-bus/bus-convenience.c index 12fcc89d92..f76cbaf3d3 100644 --- a/src/libsystemd/src/sd-bus/bus-convenience.c +++ b/src/libsystemd/src/sd-bus/bus-convenience.c @@ -17,12 +17,13 @@ along with systemd; If not, see <http://www.gnu.org/licenses/>. ***/ +#include "basic/string-util.h" +#include "shared/bus-util.h" + #include "bus-internal.h" #include "bus-message.h" #include "bus-signature.h" #include "bus-type.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 30b80d88e0..3a93c59a7b 100644 --- a/src/libsystemd/src/sd-bus/bus-creds.c +++ b/src/libsystemd/src/sd-bus/bus-creds.c @@ -22,10 +22,7 @@ #include "basic/alloc-util.h" #include "basic/audit-util.h" -#include "bus-creds.h" #include "basic/bus-label.h" -#include "bus-message.h" -#include "shared/bus-util.h" #include "basic/capability-util.h" #include "basic/cgroup-util.h" #include "basic/fd-util.h" @@ -39,6 +36,10 @@ #include "basic/terminal-util.h" #include "basic/user-util.h" #include "basic/util.h" +#include "shared/bus-util.h" + +#include "bus-creds.h" +#include "bus-message.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 ed24e48495..cec53d75e5 100644 --- a/src/libsystemd/src/sd-bus/bus-dump.c +++ b/src/libsystemd/src/sd-bus/bus-dump.c @@ -18,10 +18,6 @@ ***/ #include "basic/alloc-util.h" -#include "bus-dump.h" -#include "bus-internal.h" -#include "bus-message.h" -#include "bus-type.h" #include "basic/cap-list.h" #include "basic/capability-util.h" #include "basic/fileio.h" @@ -33,6 +29,11 @@ #include "basic/terminal-util.h" #include "basic/util.h" +#include "bus-dump.h" +#include "bus-internal.h" +#include "bus-message.h" +#include "bus-type.h" + static char *indent(unsigned level, unsigned flags) { char *p; unsigned n, i = 0; diff --git a/src/libsystemd/src/sd-bus/bus-error.c b/src/libsystemd/src/sd-bus/bus-error.c index 69d14ba9ae..616d784590 100644 --- a/src/libsystemd/src/sd-bus/bus-error.c +++ b/src/libsystemd/src/sd-bus/bus-error.c @@ -27,11 +27,12 @@ #include <systemd/sd-bus.h> #include "basic/alloc-util.h" -#include "bus-error.h" #include "basic/errno-list.h" #include "basic/string-util.h" #include "basic/util.h" +#include "bus-error.h" + BUS_ERROR_MAP_ELF_REGISTER const sd_bus_error_map bus_standard_errors[] = { SD_BUS_ERROR_MAP("org.freedesktop.DBus.Error.Failed", EACCES), SD_BUS_ERROR_MAP("org.freedesktop.DBus.Error.NoMemory", ENOMEM), diff --git a/src/libsystemd/src/sd-bus/bus-internal.c b/src/libsystemd/src/sd-bus/bus-internal.c index 0dc1db607e..8dc441227a 100644 --- a/src/libsystemd/src/sd-bus/bus-internal.c +++ b/src/libsystemd/src/sd-bus/bus-internal.c @@ -18,11 +18,12 @@ ***/ #include "basic/alloc-util.h" -#include "bus-internal.h" -#include "bus-message.h" #include "basic/hexdecoct.h" #include "basic/string-util.h" +#include "bus-internal.h" +#include "bus-message.h" + bool object_path_is_valid(const char *p) { const char *q; bool slash; diff --git a/src/libsystemd/src/sd-bus/bus-internal.h b/src/libsystemd/src/sd-bus/bus-internal.h index 7cf0925876..e02df7981d 100644 --- a/src/libsystemd/src/sd-bus/bus-internal.h +++ b/src/libsystemd/src/sd-bus/bus-internal.h @@ -24,17 +24,18 @@ #include <systemd/sd-bus.h> -#include "bus-error.h" -#include "bus-kernel.h" -#include "bus-match.h" #include "basic/hashmap.h" -#include "kdbus.h" #include "basic/list.h" #include "basic/prioq.h" #include "basic/refcnt.h" #include "basic/socket-util.h" #include "basic/util.h" +#include "bus-error.h" +#include "bus-kernel.h" +#include "bus-match.h" +#include "kdbus.h" + struct reply_callback { sd_bus_message_handler_t callback; usec_t timeout; diff --git a/src/libsystemd/src/sd-bus/bus-introspect.c b/src/libsystemd/src/sd-bus/bus-introspect.c index 63499d8a19..835b5e3909 100644 --- a/src/libsystemd/src/sd-bus/bus-introspect.c +++ b/src/libsystemd/src/sd-bus/bus-introspect.c @@ -17,15 +17,16 @@ along with systemd; If not, see <http://www.gnu.org/licenses/>. ***/ -#include "bus-internal.h" -#include "bus-introspect.h" -#include "bus-protocol.h" -#include "bus-signature.h" #include "basic/fd-util.h" #include "basic/fileio.h" #include "basic/string-util.h" #include "basic/util.h" +#include "bus-internal.h" +#include "bus-introspect.h" +#include "bus-protocol.h" +#include "bus-signature.h" + int introspect_begin(struct introspect *i, bool trusted) { assert(i); diff --git a/src/libsystemd/src/sd-bus/bus-match.c b/src/libsystemd/src/sd-bus/bus-match.c index be5a0975e3..0dc5e45288 100644 --- a/src/libsystemd/src/sd-bus/bus-match.c +++ b/src/libsystemd/src/sd-bus/bus-match.c @@ -18,15 +18,16 @@ ***/ #include "basic/alloc-util.h" -#include "bus-internal.h" -#include "bus-match.h" -#include "bus-message.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" +#include "shared/bus-util.h" + +#include "bus-internal.h" +#include "bus-match.h" +#include "bus-message.h" /* Example: * diff --git a/src/libsystemd/src/sd-bus/bus-message.c b/src/libsystemd/src/sd-bus/bus-message.c index 96f4213416..a34a4a1619 100644 --- a/src/libsystemd/src/sd-bus/bus-message.c +++ b/src/libsystemd/src/sd-bus/bus-message.c @@ -24,12 +24,6 @@ #include <systemd/sd-bus.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 "shared/bus-util.h" #include "basic/fd-util.h" #include "basic/io-util.h" #include "basic/memfd-util.h" @@ -38,6 +32,13 @@ #include "basic/time-util.h" #include "basic/utf8.h" #include "basic/util.h" +#include "shared/bus-util.h" + +#include "bus-gvariant.h" +#include "bus-internal.h" +#include "bus-message.h" +#include "bus-signature.h" +#include "bus-type.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 6c33343753..35116c3803 100644 --- a/src/libsystemd/src/sd-bus/bus-message.h +++ b/src/libsystemd/src/sd-bus/bus-message.h @@ -25,11 +25,12 @@ #include <systemd/sd-bus.h> -#include "bus-creds.h" -#include "bus-protocol.h" #include "basic/macro.h" #include "basic/time-util.h" +#include "bus-creds.h" +#include "bus-protocol.h" + struct bus_container { char enclosing; bool need_offsets:1; diff --git a/src/libsystemd/src/sd-bus/bus-objects.c b/src/libsystemd/src/sd-bus/bus-objects.c index f0e80017c5..a56b7e8d7e 100644 --- a/src/libsystemd/src/sd-bus/bus-objects.c +++ b/src/libsystemd/src/sd-bus/bus-objects.c @@ -18,6 +18,11 @@ ***/ #include "basic/alloc-util.h" +#include "basic/set.h" +#include "basic/string-util.h" +#include "basic/strv.h" +#include "shared/bus-util.h" + #include "bus-internal.h" #include "bus-introspect.h" #include "bus-message.h" @@ -25,10 +30,6 @@ #include "bus-signature.h" #include "bus-slot.h" #include "bus-type.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-slot.c b/src/libsystemd/src/sd-bus/bus-slot.c index 96fc3f82c4..ebac784433 100644 --- a/src/libsystemd/src/sd-bus/bus-slot.c +++ b/src/libsystemd/src/sd-bus/bus-slot.c @@ -20,10 +20,11 @@ #include <systemd/sd-bus.h> #include "basic/alloc-util.h" +#include "basic/string-util.h" + #include "bus-control.h" #include "bus-objects.h" #include "bus-slot.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 e05f6d1b04..4d6e21f977 100644 --- a/src/libsystemd/src/sd-bus/bus-socket.c +++ b/src/libsystemd/src/sd-bus/bus-socket.c @@ -26,9 +26,6 @@ #include <systemd/sd-daemon.h> #include "basic/alloc-util.h" -#include "bus-internal.h" -#include "bus-message.h" -#include "bus-socket.h" #include "basic/fd-util.h" #include "basic/formats-util.h" #include "basic/hexdecoct.h" @@ -42,6 +39,10 @@ #include "basic/utf8.h" #include "basic/util.h" +#include "bus-internal.h" +#include "bus-message.h" +#include "bus-socket.h" + #define SNDBUF_SIZE (8*1024*1024) static void iovec_advance(struct iovec iov[], unsigned *idx, size_t size) { diff --git a/src/libsystemd/src/sd-bus/bus-track.c b/src/libsystemd/src/sd-bus/bus-track.c index 997afd9dc9..24c3a7050d 100644 --- a/src/libsystemd/src/sd-bus/bus-track.c +++ b/src/libsystemd/src/sd-bus/bus-track.c @@ -20,9 +20,10 @@ #include <systemd/sd-bus.h> #include "basic/alloc-util.h" +#include "shared/bus-util.h" + #include "bus-internal.h" #include "bus-track.h" -#include "shared/bus-util.h" struct sd_bus_track { unsigned n_ref; diff --git a/src/libsystemd/src/sd-bus/sd-bus.c b/src/libsystemd/src/sd-bus/sd-bus.c index 748b46413d..83a021e2f5 100644 --- a/src/libsystemd/src/sd-bus/sd-bus.c +++ b/src/libsystemd/src/sd-bus/sd-bus.c @@ -28,19 +28,7 @@ #include <systemd/sd-bus.h> #include "basic/alloc-util.h" -#include "bus-container.h" -#include "bus-control.h" -#include "bus-internal.h" -#include "bus-kernel.h" #include "basic/bus-label.h" -#include "bus-message.h" -#include "bus-objects.h" -#include "bus-protocol.h" -#include "bus-slot.h" -#include "bus-socket.h" -#include "bus-track.h" -#include "bus-type.h" -#include "shared/bus-util.h" #include "basic/cgroup-util.h" #include "basic/def.h" #include "basic/fd-util.h" @@ -52,6 +40,19 @@ #include "basic/string-util.h" #include "basic/strv.h" #include "basic/util.h" +#include "shared/bus-util.h" + +#include "bus-container.h" +#include "bus-control.h" +#include "bus-internal.h" +#include "bus-kernel.h" +#include "bus-message.h" +#include "bus-objects.h" +#include "bus-protocol.h" +#include "bus-slot.h" +#include "bus-socket.h" +#include "bus-track.h" +#include "bus-type.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 08186870cb..c8f0d11b84 100644 --- a/src/libsystemd/src/sd-bus/test-bus-benchmark.c +++ b/src/libsystemd/src/sd-bus/test-bus-benchmark.c @@ -22,13 +22,14 @@ #include <systemd/sd-bus.h> #include "basic/alloc-util.h" -#include "bus-internal.h" -#include "bus-kernel.h" -#include "shared/bus-util.h" #include "basic/def.h" #include "basic/fd-util.h" #include "basic/time-util.h" #include "basic/util.h" +#include "shared/bus-util.h" + +#include "bus-internal.h" +#include "bus-kernel.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 353edc9c7c..8f3e88a7c0 100644 --- a/src/libsystemd/src/sd-bus/test-bus-chat.c +++ b/src/libsystemd/src/sd-bus/test-bus-chat.c @@ -25,15 +25,16 @@ #include <systemd/sd-bus.h> #include "basic/alloc-util.h" -#include "bus-error.h" -#include "bus-internal.h" -#include "bus-match.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" +#include "shared/bus-util.h" + +#include "bus-error.h" +#include "bus-internal.h" +#include "bus-match.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 3a308453ed..f4b9f96c03 100644 --- a/src/libsystemd/src/sd-bus/test-bus-cleanup.c +++ b/src/libsystemd/src/sd-bus/test-bus-cleanup.c @@ -21,10 +21,11 @@ #include <systemd/sd-bus.h> +#include "basic/refcnt.h" +#include "shared/bus-util.h" + #include "bus-internal.h" #include "bus-message.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 22fe1fa759..125d7db810 100644 --- a/src/libsystemd/src/sd-bus/test-bus-creds.c +++ b/src/libsystemd/src/sd-bus/test-bus-creds.c @@ -19,9 +19,10 @@ #include <systemd/sd-bus.h> -#include "bus-dump.h" -#include "shared/bus-util.h" #include "basic/cgroup-util.h" +#include "shared/bus-util.h" + +#include "bus-dump.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 348629c718..2d0aa92c6c 100644 --- a/src/libsystemd/src/sd-bus/test-bus-error.c +++ b/src/libsystemd/src/sd-bus/test-bus-error.c @@ -19,10 +19,11 @@ #include <systemd/sd-bus.h> +#include "basic/errno-list.h" +#include "shared/bus-util.h" + #include "bus-common-errors.h" #include "bus-error.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-introspect.c b/src/libsystemd/src/sd-bus/test-bus-introspect.c index b7b2b79f95..517e3668ae 100644 --- a/src/libsystemd/src/sd-bus/test-bus-introspect.c +++ b/src/libsystemd/src/sd-bus/test-bus-introspect.c @@ -17,9 +17,10 @@ along with systemd; If not, see <http://www.gnu.org/licenses/>. ***/ -#include "bus-introspect.h" #include "basic/log.h" +#include "bus-introspect.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 75874a6892..cb8c41b792 100644 --- a/src/libsystemd/src/sd-bus/test-bus-kernel-bloom.c +++ b/src/libsystemd/src/sd-bus/test-bus-kernel-bloom.c @@ -20,11 +20,12 @@ #include <systemd/sd-bus.h> #include "basic/alloc-util.h" -#include "bus-kernel.h" -#include "shared/bus-util.h" #include "basic/fd-util.h" #include "basic/log.h" #include "basic/util.h" +#include "shared/bus-util.h" + +#include "bus-kernel.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 79ac9064d6..871bf2e62c 100644 --- a/src/libsystemd/src/sd-bus/test-bus-kernel.c +++ b/src/libsystemd/src/sd-bus/test-bus-kernel.c @@ -22,12 +22,13 @@ #include <systemd/sd-bus.h> #include "basic/alloc-util.h" -#include "bus-dump.h" -#include "bus-kernel.h" -#include "shared/bus-util.h" #include "basic/fd-util.h" #include "basic/log.h" #include "basic/util.h" +#include "shared/bus-util.h" + +#include "bus-dump.h" +#include "bus-kernel.h" int main(int argc, char *argv[]) { _cleanup_close_ int bus_ref = -1; diff --git a/src/libsystemd/src/sd-bus/test-bus-match.c b/src/libsystemd/src/sd-bus/test-bus-match.c index c73643ec37..e50cebcdc6 100644 --- a/src/libsystemd/src/sd-bus/test-bus-match.c +++ b/src/libsystemd/src/sd-bus/test-bus-match.c @@ -17,12 +17,13 @@ along with systemd; If not, see <http://www.gnu.org/licenses/>. ***/ +#include "basic/log.h" +#include "basic/macro.h" +#include "shared/bus-util.h" + #include "bus-match.h" #include "bus-message.h" #include "bus-slot.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 990dd196e2..1c6e28e76e 100644 --- a/src/libsystemd/src/sd-bus/test-bus-objects.c +++ b/src/libsystemd/src/sd-bus/test-bus-objects.c @@ -23,14 +23,15 @@ #include <systemd/sd-bus.h> #include "basic/alloc-util.h" -#include "bus-dump.h" -#include "bus-internal.h" -#include "bus-message.h" -#include "shared/bus-util.h" #include "basic/log.h" #include "basic/macro.h" #include "basic/strv.h" #include "basic/util.h" +#include "shared/bus-util.h" + +#include "bus-dump.h" +#include "bus-internal.h" +#include "bus-message.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 596529b7e4..9ffefa6cd0 100644 --- a/src/libsystemd/src/sd-bus/test-bus-server.c +++ b/src/libsystemd/src/sd-bus/test-bus-server.c @@ -22,11 +22,12 @@ #include <systemd/sd-bus.h> -#include "bus-internal.h" -#include "shared/bus-util.h" #include "basic/log.h" #include "basic/macro.h" #include "basic/util.h" +#include "shared/bus-util.h" + +#include "bus-internal.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 b2651a1824..c08999b8e1 100644 --- a/src/libsystemd/src/sd-bus/test-bus-signature.c +++ b/src/libsystemd/src/sd-bus/test-bus-signature.c @@ -17,11 +17,12 @@ along with systemd; If not, see <http://www.gnu.org/licenses/>. ***/ -#include "bus-internal.h" -#include "bus-signature.h" #include "basic/log.h" #include "basic/string-util.h" +#include "bus-internal.h" +#include "bus-signature.h" + int main(int argc, char *argv[]) { char prefix[256]; int r; 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 e43ce8bc33..ac453e5887 100644 --- a/src/libsystemd/src/sd-bus/test-bus-zero-copy.c +++ b/src/libsystemd/src/sd-bus/test-bus-zero-copy.c @@ -22,15 +22,16 @@ #include <systemd/sd-bus.h> #include "basic/alloc-util.h" -#include "bus-dump.h" -#include "bus-kernel.h" -#include "bus-message.h" #include "basic/fd-util.h" #include "basic/log.h" #include "basic/memfd-util.h" #include "basic/string-util.h" #include "basic/util.h" +#include "bus-dump.h" +#include "bus-kernel.h" +#include "bus-message.h" + #define FIRST_ARRAY 17 #define SECOND_ARRAY 33 diff --git a/src/libsystemd/src/sd-device/device-enumerator.c b/src/libsystemd/src/sd-device/device-enumerator.c index 97f3453898..6378f9c93c 100644 --- a/src/libsystemd/src/sd-device/device-enumerator.c +++ b/src/libsystemd/src/sd-device/device-enumerator.c @@ -18,11 +18,7 @@ along with systemd; If not, see <http://www.gnu.org/licenses/>. ***/ -#include "sd-device.h" - #include "basic/alloc-util.h" -#include "device-enumerator-private.h" -#include "device-util.h" #include "basic/dirent-util.h" #include "basic/fd-util.h" #include "basic/prioq.h" @@ -31,6 +27,10 @@ #include "basic/strv.h" #include "basic/util.h" +#include "device-enumerator-private.h" +#include "device-util.h" +#include "sd-device.h" + #define DEVICE_ENUMERATE_MAX_DEPTH 256 typedef enum DeviceEnumerationType { diff --git a/src/libsystemd/src/sd-device/device-private.c b/src/libsystemd/src/sd-device/device-private.c index dce2ba091a..bf028fbbc6 100644 --- a/src/libsystemd/src/sd-device/device-private.c +++ b/src/libsystemd/src/sd-device/device-private.c @@ -22,12 +22,7 @@ #include <net/if.h> #include <sys/types.h> -#include "sd-device.h" - #include "basic/alloc-util.h" -#include "device-internal.h" -#include "device-private.h" -#include "device-util.h" #include "basic/fd-util.h" #include "basic/fileio.h" #include "basic/fs-util.h" @@ -45,6 +40,11 @@ #include "basic/user-util.h" #include "basic/util.h" +#include "device-internal.h" +#include "device-private.h" +#include "device-util.h" +#include "sd-device.h" + int device_add_property(sd_device *device, const char *key, const char *value) { int r; diff --git a/src/libsystemd/src/sd-device/sd-device.c b/src/libsystemd/src/sd-device/sd-device.c index 20c7684b97..b8e6f8580e 100644 --- a/src/libsystemd/src/sd-device/sd-device.c +++ b/src/libsystemd/src/sd-device/sd-device.c @@ -22,12 +22,7 @@ #include <net/if.h> #include <sys/types.h> -#include "sd-device.h" - #include "basic/alloc-util.h" -#include "device-internal.h" -#include "device-private.h" -#include "device-util.h" #include "basic/fd-util.h" #include "basic/fileio.h" #include "basic/fs-util.h" @@ -42,6 +37,11 @@ #include "basic/strxcpyx.h" #include "basic/util.h" +#include "device-internal.h" +#include "device-private.h" +#include "device-util.h" +#include "sd-device.h" + int device_new_aux(sd_device **ret) { _cleanup_(sd_device_unrefp) sd_device *device = NULL; diff --git a/src/libsystemd/src/sd-hwdb/hwdb-util.h b/src/libsystemd/src/sd-hwdb/hwdb-util.h index 63c154d34e..c8c0a4938e 100644 --- a/src/libsystemd/src/sd-hwdb/hwdb-util.h +++ b/src/libsystemd/src/sd-hwdb/hwdb-util.h @@ -19,8 +19,8 @@ along with systemd; If not, see <http://www.gnu.org/licenses/>. ***/ -#include "sd-hwdb.h" - #include "basic/util.h" +#include "sd-hwdb.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 9964599c99..a48c7af124 100644 --- a/src/libsystemd/src/sd-hwdb/sd-hwdb.c +++ b/src/libsystemd/src/sd-hwdb/sd-hwdb.c @@ -27,16 +27,16 @@ #include <string.h> #include <sys/mman.h> -#include "sd-hwdb.h" - #include "basic/alloc-util.h" #include "basic/fd-util.h" #include "basic/hashmap.h" -#include "hwdb-internal.h" -#include "hwdb-util.h" #include "basic/refcnt.h" #include "basic/string-util.h" +#include "hwdb-internal.h" +#include "hwdb-util.h" +#include "sd-hwdb.h" + struct sd_hwdb { RefCount n_ref; int refcount; diff --git a/src/libsystemd/src/sd-journal/audit-type.c b/src/libsystemd/src/sd-journal/audit-type.c index 330e0b5d9d..d335e0495d 100644 --- a/src/libsystemd/src/sd-journal/audit-type.c +++ b/src/libsystemd/src/sd-journal/audit-type.c @@ -17,8 +17,8 @@ along with systemd; If not, see <http://www.gnu.org/licenses/>. ***/ -#include <stdio.h> #include <linux/audit.h> +#include <stdio.h> #ifdef HAVE_AUDIT # include <libaudit.h> #endif diff --git a/src/libsystemd/src/sd-journal/catalog.c b/src/libsystemd/src/sd-journal/catalog.c index 173f320f40..7dc02deb49 100644 --- a/src/libsystemd/src/sd-journal/catalog.c +++ b/src/libsystemd/src/sd-journal/catalog.c @@ -28,7 +28,6 @@ #include <systemd/sd-id128.h> #include "basic/alloc-util.h" -#include "catalog.h" #include "basic/conf-files.h" #include "basic/fd-util.h" #include "basic/fileio.h" @@ -43,6 +42,8 @@ #include "basic/strv.h" #include "basic/util.h" +#include "catalog.h" + const char * const catalog_file_dirs[] = { "/usr/local/lib/systemd/catalog/", "/usr/lib/systemd/catalog/", diff --git a/src/libsystemd/src/sd-journal/journal-authenticate.c b/src/libsystemd/src/sd-journal/journal-authenticate.c index ecdbdb08b5..5400d38ffd 100644 --- a/src/libsystemd/src/sd-journal/journal-authenticate.c +++ b/src/libsystemd/src/sd-journal/journal-authenticate.c @@ -21,9 +21,10 @@ #include <sys/mman.h> #include "basic/fd-util.h" +#include "basic/hexdecoct.h" + #include "fsprg.h" #include "gcrypt-util.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-file.c b/src/libsystemd/src/sd-journal/journal-file.c index f626ea0ee9..af8a4e436f 100644 --- a/src/libsystemd/src/sd-journal/journal-file.c +++ b/src/libsystemd/src/sd-journal/journal-file.c @@ -27,23 +27,25 @@ #include <sys/uio.h> #include <unistd.h> +#include <systemd/sd-event.h> + #include "basic/alloc-util.h" #include "basic/btrfs-util.h" #include "basic/chattr-util.h" -#include "compress.h" #include "basic/fd-util.h" -#include "journal-authenticate.h" -#include "journal-def.h" -#include "journal-file.h" -#include "lookup3.h" #include "basic/parse-util.h" #include "basic/path-util.h" #include "basic/random-util.h" -#include <systemd/sd-event.h> #include "basic/set.h" #include "basic/string-util.h" #include "basic/xattr-util.h" +#include "compress.h" +#include "journal-authenticate.h" +#include "journal-def.h" +#include "journal-file.h" +#include "lookup3.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-internal.h b/src/libsystemd/src/sd-journal/journal-internal.h index ff6bf6f2b4..e249a8b979 100644 --- a/src/libsystemd/src/sd-journal/journal-internal.h +++ b/src/libsystemd/src/sd-journal/journal-internal.h @@ -27,11 +27,12 @@ #include <systemd/sd-journal.h> #include "basic/hashmap.h" -#include "journal-def.h" -#include "journal-file.h" #include "basic/list.h" #include "basic/set.h" +#include "journal-def.h" +#include "journal-file.h" + typedef struct Match Match; typedef struct Location Location; typedef struct Directory Directory; diff --git a/src/libsystemd/src/sd-journal/journal-vacuum.c b/src/libsystemd/src/sd-journal/journal-vacuum.c index 3ce00bec7d..a3ebf9b029 100644 --- a/src/libsystemd/src/sd-journal/journal-vacuum.c +++ b/src/libsystemd/src/sd-journal/journal-vacuum.c @@ -26,14 +26,15 @@ #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 "basic/parse-util.h" #include "basic/string-util.h" #include "basic/util.h" #include "basic/xattr-util.h" +#include "journal-def.h" +#include "journal-file.h" +#include "journal-vacuum.h" + struct vacuum_info { uint64_t usage; char *filename; diff --git a/src/libsystemd/src/sd-journal/journal-verify.c b/src/libsystemd/src/sd-journal/journal-verify.c index 3fcae64f92..f82bdf8518 100644 --- a/src/libsystemd/src/sd-journal/journal-verify.c +++ b/src/libsystemd/src/sd-journal/journal-verify.c @@ -23,17 +23,18 @@ #include <unistd.h> #include "basic/alloc-util.h" -#include "compress.h" #include "basic/fd-util.h" #include "basic/fileio.h" +#include "basic/macro.h" +#include "basic/terminal-util.h" +#include "basic/util.h" + +#include "compress.h" #include "journal-authenticate.h" #include "journal-def.h" #include "journal-file.h" #include "journal-verify.h" #include "lookup3.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/mmap-cache.c b/src/libsystemd/src/sd-journal/mmap-cache.c index e488755e67..7f4aa78308 100644 --- a/src/libsystemd/src/sd-journal/mmap-cache.c +++ b/src/libsystemd/src/sd-journal/mmap-cache.c @@ -27,10 +27,11 @@ #include "basic/list.h" #include "basic/log.h" #include "basic/macro.h" -#include "mmap-cache.h" #include "basic/sigbus.h" #include "basic/util.h" +#include "mmap-cache.h" + typedef struct Window Window; typedef struct Context Context; typedef struct FileDescriptor FileDescriptor; diff --git a/src/libsystemd/src/sd-journal/sd-journal.c b/src/libsystemd/src/sd-journal/sd-journal.c index aada73f8ec..ce03f24d4d 100644 --- a/src/libsystemd/src/sd-journal/sd-journal.c +++ b/src/libsystemd/src/sd-journal/sd-journal.c @@ -30,8 +30,6 @@ #include <systemd/sd-journal.h> #include "basic/alloc-util.h" -#include "catalog.h" -#include "compress.h" #include "basic/dirent-util.h" #include "basic/fd-util.h" #include "basic/fileio.h" @@ -40,11 +38,7 @@ #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 "basic/list.h" -#include "lookup3.h" #include "basic/missing.h" #include "basic/path-util.h" #include "basic/replace-var.h" @@ -53,6 +47,13 @@ #include "basic/string-util.h" #include "basic/strv.h" +#include "catalog.h" +#include "compress.h" +#include "journal-def.h" +#include "journal-file.h" +#include "journal-internal.h" +#include "lookup3.h" + #define JOURNAL_FILES_MAX 7168 #define JOURNAL_FILES_RECHECK_USEC (2 * USEC_PER_SEC) diff --git a/src/libsystemd/src/sd-netlink/local-addresses.c b/src/libsystemd/src/sd-netlink/local-addresses.c index f2382847dd..0baaab557f 100644 --- a/src/libsystemd/src/sd-netlink/local-addresses.c +++ b/src/libsystemd/src/sd-netlink/local-addresses.c @@ -18,12 +18,12 @@ along with systemd; If not, see <http://www.gnu.org/licenses/>. ***/ -#include "sd-netlink.h" - #include "basic/alloc-util.h" -#include "local-addresses.h" #include "basic/macro.h" +#include "local-addresses.h" +#include "sd-netlink.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 498797f515..5eb0683131 100644 --- a/src/libsystemd/src/sd-netlink/local-addresses.h +++ b/src/libsystemd/src/sd-netlink/local-addresses.h @@ -20,10 +20,10 @@ ***/ -#include "sd-netlink.h" - #include "basic/in-addr-util.h" +#include "sd-netlink.h" + struct local_address { int family, ifindex; unsigned char scope; diff --git a/src/libsystemd/src/sd-netlink/netlink-internal.h b/src/libsystemd/src/sd-netlink/netlink-internal.h index d989789fe5..69511f87ad 100644 --- a/src/libsystemd/src/sd-netlink/netlink-internal.h +++ b/src/libsystemd/src/sd-netlink/netlink-internal.h @@ -21,13 +21,13 @@ #include <linux/netlink.h> -#include "sd-netlink.h" - #include "basic/list.h" -#include "netlink-types.h" #include "basic/prioq.h" #include "basic/refcnt.h" +#include "netlink-types.h" +#include "sd-netlink.h" + #define RTNL_DEFAULT_TIMEOUT ((usec_t) (25 * USEC_PER_SEC)) #define RTNL_WQUEUE_MAX 1024 diff --git a/src/libsystemd/src/sd-netlink/netlink-message.c b/src/libsystemd/src/sd-netlink/netlink-message.c index c885b97117..fd32776a19 100644 --- a/src/libsystemd/src/sd-netlink/netlink-message.c +++ b/src/libsystemd/src/sd-netlink/netlink-message.c @@ -21,18 +21,18 @@ #include <stdbool.h> #include <unistd.h> -#include "sd-netlink.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 "basic/refcnt.h" #include "basic/socket-util.h" #include "basic/util.h" +#include "netlink-internal.h" +#include "netlink-types.h" +#include "netlink-util.h" +#include "sd-netlink.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 8e0e5d2b04..ec3513bcf8 100644 --- a/src/libsystemd/src/sd-netlink/netlink-socket.c +++ b/src/libsystemd/src/sd-netlink/netlink-socket.c @@ -21,18 +21,18 @@ #include <stdbool.h> #include <unistd.h> -#include "sd-netlink.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 "basic/refcnt.h" #include "basic/socket-util.h" #include "basic/util.h" +#include "netlink-internal.h" +#include "netlink-types.h" +#include "netlink-util.h" +#include "sd-netlink.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 9f7ddf08d8..3b013507bd 100644 --- a/src/libsystemd/src/sd-netlink/netlink-types.c +++ b/src/libsystemd/src/sd-netlink/netlink-types.c @@ -17,25 +17,26 @@ along with systemd; If not, see <http://www.gnu.org/licenses/>. ***/ -#include <stdint.h> -#include <sys/socket.h> -#include <linux/netlink.h> -#include <linux/rtnetlink.h> -#include <linux/in6.h> -#include <linux/veth.h> -#include <linux/if_bridge.h> -#include <linux/if_addr.h> #include <linux/if.h> -#include <linux/ip.h> +#include <linux/if_addr.h> +#include <linux/if_bridge.h> #include <linux/if_link.h> #include <linux/if_tunnel.h> +#include <linux/in6.h> +#include <linux/ip.h> +#include <linux/netlink.h> +#include <linux/rtnetlink.h> +#include <linux/veth.h> +#include <stdint.h> +#include <sys/socket.h> #include "basic/macro.h" #include "basic/missing.h" -#include "netlink-types.h" #include "basic/string-table.h" #include "basic/util.h" +#include "netlink-types.h" + /* Maximum ARP IP target defined in kernel */ #define BOND_MAX_ARP_TARGETS 16 diff --git a/src/libsystemd/src/sd-netlink/netlink-util.c b/src/libsystemd/src/sd-netlink/netlink-util.c index 73b9ac0258..9248aa0b18 100644 --- a/src/libsystemd/src/sd-netlink/netlink-util.c +++ b/src/libsystemd/src/sd-netlink/netlink-util.c @@ -17,10 +17,9 @@ along with systemd; If not, see <http://www.gnu.org/licenses/>. ***/ -#include "sd-netlink.h" - #include "netlink-internal.h" #include "netlink-util.h" +#include "sd-netlink.h" int rtnl_set_link_name(sd_netlink **rtnl, int ifindex, const char *name) { _cleanup_(sd_netlink_message_unrefp) sd_netlink_message *message = NULL; diff --git a/src/libsystemd/src/sd-netlink/netlink-util.h b/src/libsystemd/src/sd-netlink/netlink-util.h index ddd25e36be..c9b932f994 100644 --- a/src/libsystemd/src/sd-netlink/netlink-util.h +++ b/src/libsystemd/src/sd-netlink/netlink-util.h @@ -19,10 +19,10 @@ along with systemd; If not, see <http://www.gnu.org/licenses/>. ***/ -#include "sd-netlink.h" - #include "basic/util.h" +#include "sd-netlink.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); void rtnl_message_seal(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 0c1b7b3218..42178e5706 100644 --- a/src/libsystemd/src/sd-netlink/rtnl-message.c +++ b/src/libsystemd/src/sd-netlink/rtnl-message.c @@ -21,17 +21,17 @@ #include <stdbool.h> #include <unistd.h> -#include "sd-netlink.h" - #include "basic/formats-util.h" #include "basic/missing.h" -#include "netlink-internal.h" -#include "netlink-types.h" -#include "netlink-util.h" #include "basic/refcnt.h" #include "basic/socket-util.h" #include "basic/util.h" +#include "netlink-internal.h" +#include "netlink-types.h" +#include "netlink-util.h" +#include "sd-netlink.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 2314dfabe8..1329c56bbd 100644 --- a/src/libsystemd/src/sd-netlink/sd-netlink.c +++ b/src/libsystemd/src/sd-netlink/sd-netlink.c @@ -20,18 +20,18 @@ #include <poll.h> #include <sys/socket.h> -#include "sd-netlink.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 "basic/socket-util.h" #include "basic/util.h" +#include "netlink-internal.h" +#include "netlink-util.h" +#include "sd-netlink.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/sd-netlink.h b/src/libsystemd/src/sd-netlink/sd-netlink.h index 1faca07ce8..5d30127f8f 100644 --- a/src/libsystemd/src/sd-netlink/sd-netlink.h +++ b/src/libsystemd/src/sd-netlink/sd-netlink.h @@ -21,14 +21,13 @@ ***/ #include <inttypes.h> +#include <linux/neighbour.h> +#include <linux/rtnetlink.h> #include <netinet/ether.h> #include <netinet/in.h> -#include <linux/rtnetlink.h> -#include <linux/neighbour.h> - -#include <systemd/sd-event.h> #include <systemd/_sd-common.h> +#include <systemd/sd-event.h> _SD_BEGIN_DECLARATIONS; diff --git a/src/libsystemd/src/sd-netlink/test-local-addresses.c b/src/libsystemd/src/sd-netlink/test-local-addresses.c index 7582a331c8..8755a27182 100644 --- a/src/libsystemd/src/sd-netlink/test-local-addresses.c +++ b/src/libsystemd/src/sd-netlink/test-local-addresses.c @@ -20,6 +20,7 @@ #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 90513fa5a2..1fde81778e 100644 --- a/src/libsystemd/src/sd-netlink/test-netlink.c +++ b/src/libsystemd/src/sd-netlink/test-netlink.c @@ -20,16 +20,16 @@ #include <net/if.h> #include <netinet/ether.h> -#include "sd-netlink.h" - #include "basic/ether-addr-util.h" #include "basic/macro.h" #include "basic/missing.h" -#include "netlink-util.h" #include "basic/socket-util.h" #include "basic/string-util.h" #include "basic/util.h" +#include "netlink-util.h" +#include "sd-netlink.h" + static void test_message_link_bridge(sd_netlink *rtnl) { _cleanup_(sd_netlink_message_unrefp) sd_netlink_message *message = NULL; uint32_t cost; diff --git a/src/libsystemd/src/sd-network/network-util.c b/src/libsystemd/src/sd-network/network-util.c index ac488a0bf2..ae3e51ae77 100644 --- a/src/libsystemd/src/sd-network/network-util.c +++ b/src/libsystemd/src/sd-network/network-util.c @@ -19,9 +19,10 @@ #include "basic/alloc-util.h" #include "basic/fd-util.h" -#include "network-util.h" #include "basic/strv.h" +#include "network-util.h" + bool network_is_online(void) { _cleanup_free_ char *state = NULL; int r; diff --git a/src/libsystemd/src/sd-network/sd-network.c b/src/libsystemd/src/sd-network/sd-network.c index e97a68f566..c3755371ff 100644 --- a/src/libsystemd/src/sd-network/sd-network.c +++ b/src/libsystemd/src/sd-network/sd-network.c @@ -23,8 +23,6 @@ #include <string.h> #include <sys/inotify.h> -#include "sd-network.h" - #include "basic/alloc-util.h" #include "basic/fd-util.h" #include "basic/fileio.h" @@ -36,6 +34,8 @@ #include "basic/strv.h" #include "basic/util.h" +#include "sd-network.h" + _public_ int sd_network_get_operational_state(char **state) { _cleanup_free_ char *s = NULL; int r; diff --git a/src/libsystemd/src/sd-resolve/sd-resolve.c b/src/libsystemd/src/sd-resolve/sd-resolve.c index 001f527c68..d10204cde9 100644 --- a/src/libsystemd/src/sd-resolve/sd-resolve.c +++ b/src/libsystemd/src/sd-resolve/sd-resolve.c @@ -29,8 +29,6 @@ #include <sys/prctl.h> #include <unistd.h> -#include "sd-resolve.h" - #include "basic/alloc-util.h" #include "basic/fd-util.h" #include "basic/io-util.h" @@ -39,6 +37,8 @@ #include "basic/socket-util.h" #include "basic/util.h" +#include "sd-resolve.h" + #define WORKERS_MIN 1U #define WORKERS_MAX 16U #define QUERIES_MAX 256U diff --git a/src/libsystemd/src/sd-resolve/sd-resolve.h b/src/libsystemd/src/sd-resolve/sd-resolve.h index 2e718ec543..1996ae401a 100644 --- a/src/libsystemd/src/sd-resolve/sd-resolve.h +++ b/src/libsystemd/src/sd-resolve/sd-resolve.h @@ -25,9 +25,8 @@ #include <sys/socket.h> #include <sys/types.h> -#include <systemd/sd-event.h> - #include <systemd/_sd-common.h> +#include <systemd/sd-event.h> _SD_BEGIN_DECLARATIONS; diff --git a/src/libsystemd/src/sd-resolve/test-resolve.c b/src/libsystemd/src/sd-resolve/test-resolve.c index 59dd0d540f..d552a48da8 100644 --- a/src/libsystemd/src/sd-resolve/test-resolve.c +++ b/src/libsystemd/src/sd-resolve/test-resolve.c @@ -26,13 +26,13 @@ #include <string.h> #include <sys/socket.h> -#include "sd-resolve.h" - #include "basic/alloc-util.h" #include "basic/macro.h" #include "basic/socket-util.h" #include "basic/string-util.h" +#include "sd-resolve.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/libudev/src/libudev-device-internal.h b/src/libudev/src/libudev-device-internal.h index fd3711626c..07a73e6b9c 100644 --- a/src/libudev/src/libudev-device-internal.h +++ b/src/libudev/src/libudev-device-internal.h @@ -20,7 +20,7 @@ along with systemd; If not, see <http://www.gnu.org/licenses/>. ***/ -#include "libudev.h" +#include <libudev.h> #include "sd-device/sd-device.h" diff --git a/src/libudev/src/libudev-device-private.c b/src/libudev/src/libudev-device-private.c index 654895e652..97b60da3f1 100644 --- a/src/libudev/src/libudev-device-private.c +++ b/src/libudev/src/libudev-device-private.c @@ -18,7 +18,7 @@ along with systemd; If not, see <http://www.gnu.org/licenses/>. ***/ -#include "libudev.h" +#include <libudev.h> #include "sd-device/device-private.h" diff --git a/src/libudev/src/libudev-enumerate.c b/src/libudev/src/libudev-enumerate.c index 4b24c437e0..52b2ccff0b 100644 --- a/src/libudev/src/libudev-enumerate.c +++ b/src/libudev/src/libudev-enumerate.c @@ -28,7 +28,7 @@ #include <string.h> #include <sys/stat.h> -#include "libudev.h" +#include <libudev.h> #include "basic/alloc-util.h" #include "sd-device/device-enumerator-private.h" diff --git a/src/libudev/src/libudev-list.c b/src/libudev/src/libudev-list.c index ed40ab2600..a943dc0cd1 100644 --- a/src/libudev/src/libudev-list.c +++ b/src/libudev/src/libudev-list.c @@ -23,6 +23,7 @@ #include <string.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 b15869ea2e..64a647f945 100644 --- a/src/libudev/src/libudev-monitor.c +++ b/src/libudev/src/libudev-monitor.c @@ -28,18 +28,19 @@ #include <sys/socket.h> #include <unistd.h> -#include "libudev.h" +#include <libudev.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 "basic/missing.h" #include "basic/mount-util.h" #include "basic/socket-util.h" #include "basic/string-util.h" +#include "libudev-private.h" + /** * SECTION:libudev-monitor * @short_description: device event source diff --git a/src/libudev/src/libudev-queue.c b/src/libudev/src/libudev-queue.c index 31386282b7..bc89252096 100644 --- a/src/libudev/src/libudev-queue.c +++ b/src/libudev/src/libudev-queue.c @@ -27,6 +27,7 @@ #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 be1b851aa4..661039ecea 100644 --- a/src/libudev/src/libudev-util.c +++ b/src/libudev/src/libudev-util.c @@ -24,14 +24,15 @@ #include <string.h> #include <unistd.h> -#include "libudev.h" +#include <libudev.h> #include "basic/MurmurHash2.h" #include "basic/device-nodes.h" -#include "libudev-private.h" #include "basic/syslog-util.h" #include "basic/utf8.h" +#include "libudev-private.h" + /** * SECTION:libudev-util * @short_description: utils diff --git a/src/libudev/src/libudev.c b/src/libudev/src/libudev.c index bdb26d8873..c1af43e3ca 100644 --- a/src/libudev/src/libudev.c +++ b/src/libudev/src/libudev.c @@ -24,14 +24,15 @@ #include <stdlib.h> #include <string.h> -#include "libudev.h" +#include <libudev.h> #include "basic/alloc-util.h" #include "basic/fd-util.h" -#include "libudev-private.h" #include "basic/missing.h" #include "basic/string-util.h" +#include "libudev-private.h" + /** * SECTION:libudev * @short_description: libudev context diff --git a/src/nss-myhostname/nss-myhostname.c b/src/nss-myhostname/nss-myhostname.c index 832ab62d36..e31b959584 100644 --- a/src/nss-myhostname/nss-myhostname.c +++ b/src/nss-myhostname/nss-myhostname.c @@ -26,12 +26,12 @@ #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" +#include "sd-netlink/local-addresses.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-ask-password/ask-password.c b/src/systemd-ask-password/ask-password.c index 95951601c1..a30833b6b3 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 "shared/ask-password-api.h" #include "basic/def.h" #include "basic/log.h" #include "basic/macro.h" #include "basic/strv.h" +#include "shared/ask-password-api.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 8f1757924f..0d2459133d 100644 --- a/src/systemd-cgls/cgls.c +++ b/src/systemd-cgls/cgls.c @@ -26,17 +26,17 @@ #include <systemd/sd-bus.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" +#include "sd-bus/bus-error.h" +#include "shared/bus-util.h" +#include "shared/cgroup-show.h" +#include "shared/output-mode.h" +#include "shared/pager.h" static bool arg_no_pager = false; static bool arg_kernel_threads = false; diff --git a/src/systemd-cgtop/cgtop.c b/src/systemd-cgtop/cgtop.c index 78e9950a5b..91cab3f6b1 100644 --- a/src/systemd-cgtop/cgtop.c +++ b/src/systemd-cgtop/cgtop.c @@ -29,8 +29,6 @@ #include <systemd/sd-bus.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" @@ -42,6 +40,8 @@ #include "basic/terminal-util.h" #include "basic/unit-name.h" #include "basic/util.h" +#include "sd-bus/bus-error.h" +#include "shared/bus-util.h" typedef struct Group { char *path; diff --git a/src/systemd-cryptsetup/cryptsetup-generator.c b/src/systemd-cryptsetup/cryptsetup-generator.c index 69787fc719..3ad6d34a98 100644 --- a/src/systemd-cryptsetup/cryptsetup-generator.c +++ b/src/systemd-cryptsetup/cryptsetup-generator.c @@ -20,11 +20,8 @@ #include <errno.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" @@ -35,6 +32,9 @@ #include "basic/strv.h" #include "basic/unit-name.h" #include "basic/util.h" +#include "shared/dropin.h" +#include "shared/fstab-util.h" +#include "shared/generator.h" typedef struct crypto_device { char *uuid; diff --git a/src/systemd-dbus1-generator/dbus1-generator.c b/src/systemd-dbus1-generator/dbus1-generator.c index 55bee9fd0d..762a374fe4 100644 --- a/src/systemd-dbus1-generator/dbus1-generator.c +++ b/src/systemd-dbus1-generator/dbus1-generator.c @@ -18,10 +18,7 @@ ***/ #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" @@ -29,6 +26,9 @@ #include "basic/special.h" #include "basic/unit-name.h" #include "basic/util.h" +#include "sd-bus/bus-internal.h" +#include "shared/bus-util.h" +#include "shared/conf-parser.h" static const char *arg_dest_late = "/tmp", *arg_dest = "/tmp"; diff --git a/src/systemd-gpt-auto-generator/gpt-auto-generator.c b/src/systemd-gpt-auto-generator/gpt-auto-generator.c index b878d438b0..4edcd42239 100644 --- a/src/systemd-gpt-auto-generator/gpt-auto-generator.c +++ b/src/systemd-gpt-auto-generator/gpt-auto-generator.c @@ -22,19 +22,15 @@ #include <sys/statfs.h> #include <unistd.h> -#include "libudev.h" +#include <libudev.h> #include <systemd/sd-id128.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" @@ -44,10 +40,14 @@ #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" +#include "shared/efivars.h" +#include "shared/fstab-util.h" +#include "shared/generator.h" +#include "shared/gpt.h" +#include "shared/udev-util.h" static const char *arg_dest = "/tmp"; static bool arg_enabled = true; diff --git a/src/systemd-hibernate-resume/hibernate-resume-generator.c b/src/systemd-hibernate-resume/hibernate-resume-generator.c index 08de7e1983..6380c297c2 100644 --- a/src/systemd-hibernate-resume/hibernate-resume-generator.c +++ b/src/systemd-hibernate-resume/hibernate-resume-generator.c @@ -21,7 +21,6 @@ #include <stdio.h> #include "basic/alloc-util.h" -#include "shared/fstab-util.h" #include "basic/log.h" #include "basic/mkdir.h" #include "basic/proc-cmdline.h" @@ -29,6 +28,7 @@ #include "basic/string-util.h" #include "basic/unit-name.h" #include "basic/util.h" +#include "shared/fstab-util.h" static const char *arg_dest = "/tmp"; static char *arg_resume_dev = NULL; diff --git a/src/systemd-initctl/initctl.c b/src/systemd-initctl/initctl.c index 986c463389..66b40ce6f8 100644 --- a/src/systemd-initctl/initctl.c +++ b/src/systemd-initctl/initctl.c @@ -27,16 +27,16 @@ #include <systemd/sd-daemon.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" +#include "sd-bus/bus-error.h" +#include "shared/bus-util.h" +#include "shared/initreq.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 aca7d01129..009bb5c5c0 100644 --- a/src/systemd-machine-id-setup/machine-id-setup-main.c +++ b/src/systemd-machine-id-setup/machine-id-setup-main.c @@ -23,10 +23,11 @@ #include <stdlib.h> #include "basic/log.h" -#include "machine-id-setup.h" #include "basic/path-util.h" #include "basic/util.h" +#include "machine-id-setup.h" + static char *arg_root = NULL; static bool arg_commit = false; diff --git a/src/systemd-nspawn/nspawn-cgroup.c b/src/systemd-nspawn/nspawn-cgroup.c index 67c86303e5..d0e2de2345 100644 --- a/src/systemd-nspawn/nspawn-cgroup.c +++ b/src/systemd-nspawn/nspawn-cgroup.c @@ -24,11 +24,12 @@ #include "basic/fd-util.h" #include "basic/fileio.h" #include "basic/mkdir.h" -#include "nspawn-cgroup.h" #include "basic/string-util.h" #include "basic/strv.h" #include "basic/util.h" +#include "nspawn-cgroup.h" + int chown_cgroup(pid_t pid, uid_t uid_shift) { _cleanup_free_ char *path = NULL, *fs = NULL; _cleanup_close_ int fd = -1; diff --git a/src/systemd-nspawn/nspawn-mount.c b/src/systemd-nspawn/nspawn-mount.c index 7e8bd936f2..bb2906e8d7 100644 --- a/src/systemd-nspawn/nspawn-mount.c +++ b/src/systemd-nspawn/nspawn-mount.c @@ -17,8 +17,8 @@ along with systemd; If not, see <http://www.gnu.org/licenses/>. ***/ -#include <sys/mount.h> #include <linux/magic.h> +#include <sys/mount.h> #include "basic/alloc-util.h" #include "basic/cgroup-util.h" @@ -27,7 +27,6 @@ #include "basic/label.h" #include "basic/mkdir.h" #include "basic/mount-util.h" -#include "nspawn-mount.h" #include "basic/parse-util.h" #include "basic/path-util.h" #include "basic/rm-rf.h" @@ -38,6 +37,8 @@ #include "basic/user-util.h" #include "basic/util.h" +#include "nspawn-mount.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 4929615b74..45caddb75b 100644 --- a/src/systemd-nspawn/nspawn-network.c +++ b/src/systemd-nspawn/nspawn-network.c @@ -20,7 +20,7 @@ #include <linux/veth.h> #include <net/if.h> -#include "libudev.h" +#include <libudev.h> #include <systemd/sd-id128.h> #include "basic/alloc-util.h" diff --git a/src/systemd-nspawn/nspawn-settings.c b/src/systemd-nspawn/nspawn-settings.c index e5cc385e07..f05c671946 100644 --- a/src/systemd-nspawn/nspawn-settings.c +++ b/src/systemd-nspawn/nspawn-settings.c @@ -19,9 +19,6 @@ #include "basic/alloc-util.h" #include "basic/cap-list.h" -#include "shared/conf-parser.h" -#include "nspawn-network.h" -#include "nspawn-settings.h" #include "basic/parse-util.h" #include "basic/process-util.h" #include "basic/socket-util.h" @@ -29,6 +26,10 @@ #include "basic/strv.h" #include "basic/user-util.h" #include "basic/util.h" +#include "shared/conf-parser.h" + +#include "nspawn-network.h" +#include "nspawn-settings.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 0abf4c9835..95e70d5fa4 100644 --- a/src/systemd-nspawn/nspawn-settings.h +++ b/src/systemd-nspawn/nspawn-settings.h @@ -22,6 +22,7 @@ #include <stdio.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 b42c4c2456..38ca9e2e24 100644 --- a/src/systemd-nspawn/nspawn-setuid.c +++ b/src/systemd-nspawn/nspawn-setuid.c @@ -24,13 +24,14 @@ #include "basic/alloc-util.h" #include "basic/fd-util.h" #include "basic/mkdir.h" -#include "nspawn-setuid.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" +#include "nspawn-setuid.h" + static int spawn_getent(const char *database, const char *key, pid_t *rpid) { int pipe_fds[2]; pid_t pid; diff --git a/src/systemd-nspawn/nspawn-stub-pid1.c b/src/systemd-nspawn/nspawn-stub-pid1.c index 47243ee082..86783b6136 100644 --- a/src/systemd-nspawn/nspawn-stub-pid1.c +++ b/src/systemd-nspawn/nspawn-stub-pid1.c @@ -21,13 +21,14 @@ #include <sys/unistd.h> #include <sys/wait.h> +#include "basic/def.h" #include "basic/fd-util.h" #include "basic/log.h" -#include "nspawn-stub-pid1.h" #include "basic/process-util.h" #include "basic/signal-util.h" #include "basic/time-util.h" -#include "basic/def.h" + +#include "nspawn-stub-pid1.h" int stub_pid1(void) { enum { diff --git a/src/systemd-nspawn/test-patch-uid.c b/src/systemd-nspawn/test-patch-uid.c index 8b990da220..e751e0ec95 100644 --- a/src/systemd-nspawn/test-patch-uid.c +++ b/src/systemd-nspawn/test-patch-uid.c @@ -20,10 +20,11 @@ #include <stdlib.h> #include "basic/log.h" -#include "nspawn-patch-uid.h" #include "basic/user-util.h" #include "basic/util.h" +#include "nspawn-patch-uid.h" + int main(int argc, char *argv[]) { uid_t shift, range; int r; diff --git a/src/systemd-remount-fs/remount-fs.c b/src/systemd-remount-fs/remount-fs.c index 7d0d9f565a..116c370ef7 100644 --- a/src/systemd-remount-fs/remount-fs.c +++ b/src/systemd-remount-fs/remount-fs.c @@ -27,7 +27,6 @@ #include "basic/exit-status.h" #include "basic/log.h" -#include "mount-setup.h" #include "basic/mount-util.h" #include "basic/path-util.h" #include "basic/process-util.h" @@ -35,6 +34,8 @@ #include "basic/strv.h" #include "basic/util.h" +#include "mount-setup.h" + /* Goes through /etc/fstab and remounts all API file systems, applying * options that are in /etc/fstab that systemd might not have * respected */ diff --git a/src/systemd-shutdown/shutdown.c b/src/systemd-shutdown/shutdown.c index 6281d99c1d..f42a910ad4 100644 --- a/src/systemd-shutdown/shutdown.c +++ b/src/systemd-shutdown/shutdown.c @@ -33,19 +33,20 @@ #include "basic/cgroup-util.h" #include "basic/def.h" #include "basic/fileio.h" -#include "killall.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 "basic/util.h" #include "basic/virt.h" +#include "shared/switch-root.h" #include "shared/watchdog.h" +#include "killall.h" +#include "umount.h" + #define FINALIZE_ATTEMPTS 50 static char* arg_verb; diff --git a/src/systemd-shutdown/umount.c b/src/systemd-shutdown/umount.c index 2e032fb9d6..3b1b018283 100644 --- a/src/systemd-shutdown/umount.c +++ b/src/systemd-shutdown/umount.c @@ -25,20 +25,21 @@ #include <sys/mount.h> #include <sys/swap.h> -#include "libudev.h" +#include <libudev.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 "basic/path-util.h" #include "basic/string-util.h" -#include "shared/udev-util.h" -#include "umount.h" #include "basic/util.h" #include "basic/virt.h" +#include "shared/fstab-util.h" +#include "shared/udev-util.h" + +#include "mount-setup.h" +#include "umount.h" typedef struct MountPoint { char *path; diff --git a/src/systemd-stdio-bridge/stdio-bridge.c b/src/systemd-stdio-bridge/stdio-bridge.c index 284af3dea9..33fe2f7e28 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 "sd-bus/bus-internal.h" -#include "shared/bus-util.h" #include "basic/build.h" #include "basic/log.h" #include "basic/util.h" +#include "sd-bus/bus-internal.h" +#include "shared/bus-util.h" #define DEFAULT_BUS_PATH "unix:path=/run/dbus/system_bus_socket" diff --git a/src/systemd-timesyncd/timesyncd-conf.c b/src/systemd-timesyncd/timesyncd-conf.c index 154b8e294b..f2c6efd8e2 100644 --- a/src/systemd-timesyncd/timesyncd-conf.c +++ b/src/systemd-timesyncd/timesyncd-conf.c @@ -21,6 +21,7 @@ #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 1c96bd066d..c24d54a1e3 100644 --- a/src/systemd-timesyncd/timesyncd-conf.h +++ b/src/systemd-timesyncd/timesyncd-conf.h @@ -20,6 +20,7 @@ ***/ #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-manager.c b/src/systemd-timesyncd/timesyncd-manager.c index 8464f38fab..9b10081961 100644 --- a/src/systemd-timesyncd/timesyncd-manager.c +++ b/src/systemd-timesyncd/timesyncd-manager.c @@ -37,16 +37,17 @@ #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 "basic/util.h" +#include "sd-network/network-util.h" + #include "timesyncd-conf.h" #include "timesyncd-manager.h" -#include "basic/util.h" #ifndef ADJ_SETOFFSET #define ADJ_SETOFFSET 0x0100 /* add 'time' to current time */ diff --git a/src/systemd-timesyncd/timesyncd-server.c b/src/systemd-timesyncd/timesyncd-server.c index ceeaf1b6e0..42e5c8e429 100644 --- a/src/systemd-timesyncd/timesyncd-server.c +++ b/src/systemd-timesyncd/timesyncd-server.c @@ -18,6 +18,7 @@ ***/ #include "basic/alloc-util.h" + #include "timesyncd-server.h" int server_address_new( 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 b77c884c28..0db27e27cd 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 @@ -31,8 +31,6 @@ #include <unistd.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" @@ -46,6 +44,8 @@ #include "basic/strv.h" #include "basic/terminal-util.h" #include "basic/util.h" +#include "shared/ask-password-api.h" +#include "shared/conf-parser.h" #include "shared/utmp-wtmp.h" static enum { diff --git a/src/test/test-acl-util.c b/src/test/test-acl-util.c index 8672f008b8..1417d596e4 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 "shared/acl-util.h" #include "basic/fd-util.h" #include "basic/fileio.h" #include "basic/string-util.h" #include "basic/user-util.h" +#include "shared/acl-util.h" static void test_add_acls_for_user(void) { char fn[] = "/tmp/test-empty.XXXXXX"; diff --git a/src/test/test-ask-password-api.c b/src/test/test-ask-password-api.c index b12f3c2e47..a93e821c7d 100644 --- a/src/test/test-ask-password-api.c +++ b/src/test/test-ask-password-api.c @@ -18,8 +18,8 @@ ***/ #include "basic/alloc-util.h" -#include "shared/ask-password-api.h" #include "basic/log.h" +#include "shared/ask-password-api.h" static void ask_password(void) { int r; diff --git a/src/test/test-boot-timestamps.c b/src/test/test-boot-timestamps.c index 5ac6cd16e3..022d101957 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 "basic/log.h" +#include "basic/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-cgroup-mask.c b/src/test/test-cgroup-mask.c index 30c3ec9ae6..6d889c98d2 100644 --- a/src/test/test-cgroup-mask.c +++ b/src/test/test-cgroup-mask.c @@ -20,12 +20,13 @@ #include <stdio.h> #include "basic/macro.h" -#include "manager.h" #include "basic/rm-rf.h" -#include "test-helper.h" +#include "manager.h" #include "shared/tests.h" #include "unit.h" +#include "test-helper.h" + static int test_cgroup_mask(void) { Manager *m = NULL; Unit *son, *daughter, *parent, *root, *grandchild, *parent_deep; diff --git a/src/test/test-cgroup-util.c b/src/test/test-cgroup-util.c index 0b37414bf8..394839bc83 100644 --- a/src/test/test-cgroup-util.c +++ b/src/test/test-cgroup-util.c @@ -25,10 +25,11 @@ #include "basic/parse-util.h" #include "basic/process-util.h" #include "basic/string-util.h" -#include "test-helper.h" #include "basic/user-util.h" #include "basic/util.h" +#include "test-helper.h" + static void check_p_d_u(const char *path, int code, const char *result) { _cleanup_free_ char *unit = NULL; int r; diff --git a/src/test/test-clock.c b/src/test/test-clock.c index 49dec49366..c6a8e7aa1c 100644 --- a/src/test/test-clock.c +++ b/src/test/test-clock.c @@ -17,8 +17,8 @@ along with systemd; If not, see <http://www.gnu.org/licenses/>. ***/ -#include <unistd.h> #include <fcntl.h> +#include <unistd.h> #include "basic/clock-util.h" #include "basic/fd-util.h" diff --git a/src/test/test-condition.c b/src/test/test-condition.c index 868e1dcf8d..00a86dedda 100644 --- a/src/test/test-condition.c +++ b/src/test/test-condition.c @@ -20,17 +20,17 @@ #include <systemd/sd-id128.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" +#include "shared/apparmor-util.h" +#include "shared/condition.h" +#include "shared/ima-util.h" static void test_condition_test_path(void) { Condition *condition; diff --git a/src/test/test-conf-parser.c b/src/test/test-conf-parser.c index 5b63e60b32..1536e7937d 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 "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" +#include "shared/conf-parser.h" static void test_config_parse_path_one(const char *rvalue, const char *expected) { char *path = NULL; diff --git a/src/test/test-dns-domain.c b/src/test/test-dns-domain.c index 6165948314..930bd5dd62 100644 --- a/src/test/test-dns-domain.c +++ b/src/test/test-dns-domain.c @@ -18,9 +18,9 @@ ***/ #include "basic/alloc-util.h" -#include "shared/dns-domain.h" #include "basic/macro.h" #include "basic/string-util.h" +#include "shared/dns-domain.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-engine.c b/src/test/test-engine.c index 86f8b0d335..9d21bb5723 100644 --- a/src/test/test-engine.c +++ b/src/test/test-engine.c @@ -21,12 +21,13 @@ #include <stdio.h> #include <string.h> -#include "shared/bus-util.h" -#include "manager.h" #include "basic/rm-rf.h" -#include "test-helper.h" +#include "manager.h" +#include "shared/bus-util.h" #include "shared/tests.h" +#include "test-helper.h" + int main(int argc, char *argv[]) { _cleanup_(rm_rf_physical_and_freep) char *runtime_dir = NULL; _cleanup_(sd_bus_error_free) sd_bus_error err = SD_BUS_ERROR_NULL; diff --git a/src/test/test-execute.c b/src/test/test-execute.c index de7b772a0d..7cd63168c8 100644 --- a/src/test/test-execute.c +++ b/src/test/test-execute.c @@ -26,13 +26,14 @@ #include "basic/fileio.h" #include "basic/fs-util.h" #include "basic/macro.h" -#include "manager.h" #include "basic/mkdir.h" #include "basic/path-util.h" #include "basic/rm-rf.h" -#include "test-helper.h" -#include "unit.h" #include "basic/util.h" +#include "manager.h" +#include "unit.h" + +#include "test-helper.h" typedef void (*test_function_t)(Manager *m); diff --git a/src/test/test-fileio.c b/src/test/test-fileio.c index 97f4622400..f5a99d668d 100644 --- a/src/test/test-fileio.c +++ b/src/test/test-fileio.c @@ -17,12 +17,12 @@ along with systemd; If not, see <http://www.gnu.org/licenses/>. ***/ +#include <ctype.h> #include <fcntl.h> #include <stdio.h> #include <unistd.h> #include "basic/alloc-util.h" -#include "ctype.h" #include "basic/def.h" #include "basic/env-util.h" #include "basic/fd-util.h" diff --git a/src/test/test-firewall-util.c b/src/test/test-firewall-util.c index 895c1bb7b0..28ab25dd78 100644 --- a/src/test/test-firewall-util.c +++ b/src/test/test-firewall-util.c @@ -17,8 +17,8 @@ along with systemd; If not, see <http://www.gnu.org/licenses/>. ***/ -#include "firewall-util.h" #include "basic/log.h" +#include "firewall-util.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 e3e6d19d92..7002eb841a 100644 --- a/src/test/test-fs-util.c +++ b/src/test/test-fs-util.c @@ -20,8 +20,8 @@ #include <unistd.h> #include "basic/alloc-util.h" -#include "basic/fileio.h" #include "basic/fd-util.h" +#include "basic/fileio.h" #include "basic/fs-util.h" #include "basic/macro.h" #include "basic/mkdir.h" diff --git a/src/test/test-fstab-util.c b/src/test/test-fstab-util.c index 42c7368801..181ff230e0 100644 --- a/src/test/test-fstab-util.c +++ b/src/test/test-fstab-util.c @@ -18,10 +18,10 @@ ***/ #include "basic/alloc-util.h" -#include "shared/fstab-util.h" #include "basic/log.h" #include "basic/string-util.h" #include "basic/util.h" +#include "shared/fstab-util.h" /* int fstab_filter_options(const char *opts, const char *names, diff --git a/src/test/test-hostname.c b/src/test/test-hostname.c index 28ae8b96fb..7408d51725 100644 --- a/src/test/test-hostname.c +++ b/src/test/test-hostname.c @@ -17,8 +17,8 @@ along with systemd; If not, see <http://www.gnu.org/licenses/>. ***/ -#include "hostname-setup.h" #include "basic/util.h" +#include "hostname-setup.h" int main(int argc, char* argv[]) { int r; diff --git a/src/test/test-install-root.c b/src/test/test-install-root.c index 69eb85593b..c0d696dcdc 100644 --- a/src/test/test-install-root.c +++ b/src/test/test-install-root.c @@ -19,10 +19,10 @@ #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" +#include "shared/install.h" static void test_basic_mask_and_enable(const char *root) { const char *p; diff --git a/src/test/test-ipcrm.c b/src/test/test-ipcrm.c index 8ca3952bf5..a37aa4a10d 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 "shared/clean-ipc.h" #include "basic/user-util.h" #include "basic/util.h" +#include "shared/clean-ipc.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 40205ecb8c..83c8b81690 100644 --- a/src/test/test-libudev.c +++ b/src/test/test-libudev.c @@ -22,14 +22,14 @@ #include <sys/epoll.h> #include <unistd.h> -#include "libudev.h" +#include <libudev.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" +#include "shared/udev-util.h" static void print_device(struct udev_device *device) { const char *str; diff --git a/src/test/test-namespace.c b/src/test/test-namespace.c index 23992ab431..d877c61756 100644 --- a/src/test/test-namespace.c +++ b/src/test/test-namespace.c @@ -21,10 +21,10 @@ #include "basic/alloc-util.h" #include "basic/fd-util.h" -#include "namespace.h" #include "basic/process-util.h" #include "basic/string-util.h" #include "basic/util.h" +#include "namespace.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 d7cb3b2c87..6efdd33660 100644 --- a/src/test/test-netlink-manual.c +++ b/src/test/test-netlink-manual.c @@ -19,9 +19,9 @@ #include <arpa/inet.h> #include <libkmod.h> +#include <linux/if_tunnel.h> #include <linux/ip.h> #include <net/if.h> -#include <linux/if_tunnel.h> #include "basic/macro.h" #include "basic/util.h" diff --git a/src/test/test-nss.c b/src/test/test-nss.c index df617bc680..876e978d22 100644 --- a/src/test/test-nss.c +++ b/src/test/test-nss.c @@ -18,22 +18,22 @@ ***/ #include <dlfcn.h> -#include <stdlib.h> #include <net/if.h> +#include <stdlib.h> +#include "basic/af-list.h" +#include "basic/alloc-util.h" +#include "basic/errno-list.h" +#include "basic/hexdecoct.h" +#include "basic/hostname-util.h" +#include "basic/in-addr-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/string-util.h" #include "basic/strv.h" -#include "basic/errno-list.h" -#include "basic/hostname-util.h" -#include "local-addresses.h" +#include "sd-netlink/local-addresses.h" static const char* nss_status_to_string(enum nss_status status, char *buf, size_t buf_len) { switch (status) { diff --git a/src/test/test-path-lookup.c b/src/test/test-path-lookup.c index 41eb48d787..6c6315bf2d 100644 --- a/src/test/test-path-lookup.c +++ b/src/test/test-path-lookup.c @@ -21,10 +21,10 @@ #include <sys/stat.h> #include "basic/log.h" -#include "shared/path-lookup.h" #include "basic/rm-rf.h" #include "basic/string-util.h" #include "basic/strv.h" +#include "shared/path-lookup.h" static void test_paths(UnitFileScope scope) { char template[] = "/tmp/test-path-lookup.XXXXXXX"; diff --git a/src/test/test-path.c b/src/test/test-path.c index ed87cfdb8f..1cd09c89d8 100644 --- a/src/test/test-path.c +++ b/src/test/test-path.c @@ -24,15 +24,16 @@ #include "basic/fd-util.h" #include "basic/fs-util.h" #include "basic/macro.h" -#include "manager.h" #include "basic/mkdir.h" #include "basic/rm-rf.h" #include "basic/string-util.h" #include "basic/strv.h" -#include "test-helper.h" +#include "basic/util.h" +#include "manager.h" #include "shared/tests.h" #include "unit.h" -#include "basic/util.h" + +#include "test-helper.h" typedef void (*test_function_t)(Manager *m); diff --git a/src/test/test-sched-prio.c b/src/test/test-sched-prio.c index 33249fe12c..a0f46ad1c9 100644 --- a/src/test/test-sched-prio.c +++ b/src/test/test-sched-prio.c @@ -20,11 +20,12 @@ #include <sched.h> #include "basic/macro.h" -#include "manager.h" #include "basic/rm-rf.h" -#include "test-helper.h" +#include "manager.h" #include "shared/tests.h" +#include "test-helper.h" + int main(int argc, char *argv[]) { _cleanup_(rm_rf_physical_and_freep) char *runtime_dir = NULL; Manager *m = NULL; diff --git a/src/test/test-sleep.c b/src/test/test-sleep.c index 9260428d04..b8ddc53ed0 100644 --- a/src/test/test-sleep.c +++ b/src/test/test-sleep.c @@ -20,9 +20,9 @@ #include <stdio.h> #include "basic/log.h" -#include "shared/sleep-config.h" #include "basic/strv.h" #include "basic/util.h" +#include "shared/sleep-config.h" static void test_sleep(void) { _cleanup_strv_free_ char diff --git a/src/test/test-strv.c b/src/test/test-strv.c index 90fcb20cdd..3ecca8cfee 100644 --- a/src/test/test-strv.c +++ b/src/test/test-strv.c @@ -21,10 +21,10 @@ #include <string.h> #include "basic/alloc-util.h" -#include "shared/specifier.h" #include "basic/string-util.h" #include "basic/strv.h" #include "basic/util.h" +#include "shared/specifier.h" static void test_specifier_printf(void) { static const Specifier table[] = { diff --git a/src/test/test-tables.c b/src/test/test-tables.c index 2643a05648..51ac9632f8 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 "basic/architecture.h" #include "automount.h" +#include "basic/architecture.h" +#include "basic/locale-util.h" +#include "basic/log.h" +#include "basic/rlimit-util.h" +#include "basic/socket-util.h" +#include "basic/unit-name.h" +#include "basic/util.h" #include "busname.h" #include "cgroup.h" -#include "compress.h" -#include "shared/condition.h" #include "device.h" #include "execute.h" -#include "shared/install.h" #include "job.h" #include "journald-server.h" #include "kill.h" #include "link-config.h" -#include "basic/locale-util.h" -#include "basic/log.h" -#include "shared/logs-show.h" #include "mount.h" #include "path.h" -#include "basic/rlimit-util.h" #include "scope.h" +#include "sd-journal/compress.h" #include "service.h" +#include "shared/condition.h" +#include "shared/install.h" +#include "shared/logs-show.h" +#include "shared/test-tables.h" #include "slice.h" -#include "basic/socket-util.h" #include "socket.h" #include "swap.h" #include "target.h" -#include "shared/test-tables.h" #include "timer.h" -#include "basic/unit-name.h" #include "unit.h" -#include "basic/util.h" int main(int argc, char **argv) { test_table(architecture, ARCHITECTURE); diff --git a/src/test/test-uid-range.c b/src/test/test-uid-range.c index 50da66bde1..bb79ae6c3e 100644 --- a/src/test/test-uid-range.c +++ b/src/test/test-uid-range.c @@ -20,9 +20,9 @@ #include <stddef.h> #include "basic/alloc-util.h" -#include "shared/uid-range.h" #include "basic/user-util.h" #include "basic/util.h" +#include "shared/uid-range.h" int main(int argc, char *argv[]) { _cleanup_free_ UidRange *p = NULL; diff --git a/src/test/test-unit-file.c b/src/test/test-unit-file.c index 09481364b9..ba21dbcc83 100644 --- a/src/test/test-unit-file.c +++ b/src/test/test-unit-file.c @@ -31,18 +31,19 @@ #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 "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 "shared/tests.h" #include "basic/user-util.h" #include "basic/util.h" +#include "load-fragment.h" +#include "shared/install-printf.h" +#include "shared/install.h" +#include "shared/specifier.h" +#include "shared/tests.h" + +#include "test-helper.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 b4c91cfa6c..e17355eac1 100644 --- a/src/test/test-unit-name.c +++ b/src/test/test-unit-name.c @@ -28,16 +28,17 @@ #include "basic/glob-util.h" #include "basic/hostname-util.h" #include "basic/macro.h" -#include "manager.h" #include "basic/path-util.h" -#include "shared/specifier.h" #include "basic/string-util.h" -#include "test-helper.h" #include "basic/unit-name.h" -#include "unit-printf.h" -#include "unit.h" #include "basic/user-util.h" #include "basic/util.h" +#include "manager.h" +#include "shared/specifier.h" +#include "unit-printf.h" +#include "unit.h" + +#include "test-helper.h" static void test_unit_name_is_valid(void) { assert_se(unit_name_is_valid("foo.service", UNIT_NAME_ANY)); |