summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuke Shumaker <lukeshu@sbcglobal.net>2016-08-02 17:54:39 -0400
committerLuke Shumaker <lukeshu@sbcglobal.net>2016-08-02 17:54:39 -0400
commit01a67dbfc491832def1ba8a2c3e7cda228e6f7c2 (patch)
treee5a25487d4ec161ed7e83754710ba8f83ec355f1
parentd7efceae3181337f25c8ef992923ae172b28b277 (diff)
./fixup.sh
-rw-r--r--src/grp-initutils/systemd-rfkill/rfkill.c3
-rw-r--r--src/grp-initutils/systemd-tmpfiles/tmpfiles.c3
-rw-r--r--src/grp-initutils/systemd-vconsole-setup/vconsole-setup.c7
-rw-r--r--src/grp-journal/journalctl/journalctl.c3
-rw-r--r--src/grp-journal/libjournal-core/journald-server.h7
-rw-r--r--src/grp-journal/libjournal-core/journald-stream.h4
-rw-r--r--src/grp-journal/libjournal-core/test-audit-type.c3
-rw-r--r--src/grp-login/liblogind-core/logind-button.c3
-rw-r--r--src/grp-login/liblogind-core/logind-button.h4
-rw-r--r--src/grp-login/liblogind-core/logind-core.c3
-rw-r--r--src/grp-login/liblogind-core/logind-device.h4
-rw-r--r--src/grp-login/liblogind-core/logind-seat.h4
-rw-r--r--src/grp-login/liblogind-core/logind-session-device.c3
-rw-r--r--src/grp-login/liblogind-core/logind-session-device.h4
-rw-r--r--src/grp-login/liblogind-core/logind-session.c5
-rw-r--r--src/grp-login/liblogind-core/logind-user.h4
-rw-r--r--src/grp-login/systemd-logind/logind.h5
-rw-r--r--src/grp-machine/grp-import/systemd-pull/pull-raw.c3
-rw-r--r--src/grp-network/libnetworkd-core/networkd-address-pool.h3
-rw-r--r--src/grp-network/libnetworkd-core/networkd-dhcp4.c1
-rw-r--r--src/grp-network/libnetworkd-core/networkd-dhcp6.c1
-rw-r--r--src/grp-network/libnetworkd-core/networkd-ipv4ll.c1
-rw-r--r--src/grp-network/libnetworkd-core/networkd-link.c3
-rw-r--r--src/grp-network/libnetworkd-core/networkd-manager.c1
-rw-r--r--src/grp-network/libnetworkd-core/networkd-ndisc.c1
-rw-r--r--src/grp-network/libnetworkd-core/networkd-netdev-bond.c3
-rw-r--r--src/grp-network/libnetworkd-core/networkd-netdev-tunnel.c3
-rw-r--r--src/grp-network/libnetworkd-core/networkd-netdev-tuntap.c3
-rw-r--r--src/grp-network/libnetworkd-core/networkd-netdev-veth.c3
-rw-r--r--src/grp-network/libnetworkd-core/networkd-netdev-vxlan.h4
-rw-r--r--src/grp-network/systemd-networkd-wait-online/networkd-wait-online-manager.c3
-rw-r--r--src/grp-resolve/systemd-resolved/resolved-dns-answer.h4
-rw-r--r--src/grp-resolve/systemd-resolved/resolved-dns-packet.h2
-rw-r--r--src/grp-resolve/systemd-resolved/resolved-dns-query.h4
-rw-r--r--src/grp-resolve/systemd-resolved/resolved-dns-question.h4
-rw-r--r--src/grp-resolve/systemd-resolved/resolved-dns-trust-anchor.h4
-rw-r--r--src/grp-system/libcore/automount.c5
-rw-r--r--src/grp-system/libcore/execute.h12
-rw-r--r--src/grp-system/libcore/failure-action.c3
-rw-r--r--src/grp-system/libcore/kill.h4
-rw-r--r--src/grp-system/libcore/load-fragment.c1
-rw-r--r--src/grp-system/libcore/manager.c3
-rw-r--r--src/grp-system/libcore/namespace.c1
-rw-r--r--src/grp-system/libcore/service.h6
-rw-r--r--src/grp-system/libcore/socket.c3
-rw-r--r--src/grp-system/libcore/socket.h4
-rw-r--r--src/grp-system/libcore/timer.h4
-rw-r--r--src/grp-system/libcore/transaction.h4
-rw-r--r--src/grp-system/libcore/unit.h6
-rw-r--r--src/grp-system/systemctl/systemctl.c3
-rw-r--r--src/grp-udev/ata_id/ata_id.c5
-rw-r--r--src/grp-udev/cdrom_id/cdrom_id.c3
-rw-r--r--src/grp-udev/libudev-core/net/ethtool-util.c5
-rw-r--r--src/grp-udev/libudev-core/udev-builtin-input_id.c5
-rw-r--r--src/grp-udev/libudev-core/udev-builtin-keyboard.c3
-rw-r--r--src/grp-udev/libudev-core/udev-builtin-net_id.c3
-rw-r--r--src/grp-udev/scsi_id/scsi_serial.c5
-rw-r--r--src/grp-udev/v4l_id/v4l_id.c3
-rw-r--r--src/libbasic/include/basic/af-list.h2
-rw-r--r--src/libbasic/include/basic/alloc-util.h2
-rw-r--r--src/libbasic/include/basic/architecture.h4
-rw-r--r--src/libbasic/include/basic/barrier.h2
-rw-r--r--src/libbasic/include/basic/bitmap.h4
-rw-r--r--src/libbasic/include/basic/blkid-util.h2
-rw-r--r--src/libbasic/include/basic/btrfs-ctree.h4
-rw-r--r--src/libbasic/include/basic/btrfs-util.h2
-rw-r--r--src/libbasic/include/basic/calendarspec.h4
-rw-r--r--src/libbasic/include/basic/capability-util.h4
-rw-r--r--src/libbasic/include/basic/cgroup-util.h8
-rw-r--r--src/libbasic/include/basic/cpu-set-util.h2
-rw-r--r--src/libbasic/include/basic/def.h2
-rw-r--r--src/libbasic/include/basic/dirent-util.h4
-rw-r--r--src/libbasic/include/basic/env-util.h2
-rw-r--r--src/libbasic/include/basic/escape.h4
-rw-r--r--src/libbasic/include/basic/exit-status.h6
-rw-r--r--src/libbasic/include/basic/extract-word.h2
-rw-r--r--src/libbasic/include/basic/fd-util.h2
-rw-r--r--src/libbasic/include/basic/fdset.h6
-rw-r--r--src/libbasic/include/basic/fileio-label.h2
-rw-r--r--src/libbasic/include/basic/fileio.h4
-rw-r--r--src/libbasic/include/basic/fs-util.h2
-rw-r--r--src/libbasic/include/basic/glob-util.h4
-rw-r--r--src/libbasic/include/basic/hash-funcs.h4
-rw-r--r--src/libbasic/include/basic/hashmap.h6
-rw-r--r--src/libbasic/include/basic/hexdecoct.h2
-rw-r--r--src/libbasic/include/basic/hostname-util.h2
-rw-r--r--src/libbasic/include/basic/in-addr-util.h4
-rw-r--r--src/libbasic/include/basic/io-util.h4
-rw-r--r--src/libbasic/include/basic/locale-util.h2
-rw-r--r--src/libbasic/include/basic/lockfile-util.h4
-rw-r--r--src/libbasic/include/basic/log.h2
-rw-r--r--src/libbasic/include/basic/macro.h2
-rw-r--r--src/libbasic/include/basic/missing.h17
-rw-r--r--src/libbasic/include/basic/mount-util.h4
-rw-r--r--src/libbasic/include/basic/ordered-set.h2
-rw-r--r--src/libbasic/include/basic/parse-util.h2
-rw-r--r--src/libbasic/include/basic/path-util.h4
-rw-r--r--src/libbasic/include/basic/prioq.h4
-rw-r--r--src/libbasic/include/basic/process-util.h4
-rw-r--r--src/libbasic/include/basic/ratelimit.h4
-rw-r--r--src/libbasic/include/basic/rlimit-util.h2
-rw-r--r--src/libbasic/include/basic/selinux-util.h2
-rw-r--r--src/libbasic/include/basic/set.h4
-rw-r--r--src/libbasic/include/basic/signal-util.h2
-rw-r--r--src/libbasic/include/basic/smack-util.h2
-rw-r--r--src/libbasic/include/basic/socket-util.h9
-rw-r--r--src/libbasic/include/basic/stat-util.h2
-rw-r--r--src/libbasic/include/basic/stdio-util.h2
-rw-r--r--src/libbasic/include/basic/string-table.h6
-rw-r--r--src/libbasic/include/basic/string-util.h2
-rw-r--r--src/libbasic/include/basic/strv.h8
-rw-r--r--src/libbasic/include/basic/strxcpyx.h2
-rw-r--r--src/libbasic/include/basic/terminal-util.h4
-rw-r--r--src/libbasic/include/basic/time-util.h2
-rw-r--r--src/libbasic/include/basic/umask-util.h2
-rw-r--r--src/libbasic/include/basic/unit-name.h2
-rw-r--r--src/libbasic/include/basic/utf8.h4
-rw-r--r--src/libbasic/include/basic/util.h8
-rw-r--r--src/libbasic/include/basic/virt.h2
-rw-r--r--src/libbasic/include/basic/web-util.h2
-rw-r--r--src/libbasic/include/basic/xattr-util.h2
-rw-r--r--src/libbasic/src/audit-util.c3
-rw-r--r--src/libbasic/src/btrfs-util.c3
-rw-r--r--src/libbasic/src/chattr-util.c3
-rw-r--r--src/libbasic/src/clock-util.c3
-rw-r--r--src/libbasic/src/process-util.c3
-rw-r--r--src/libbasic/src/random-util.c3
-rw-r--r--src/libbasic/src/stat-util.c3
-rw-r--r--src/libbasic/src/terminal-util.c7
-rw-r--r--src/libshared/include/shared/bus-unit-util.h4
-rw-r--r--src/libshared/include/shared/cgroup-show.h4
-rw-r--r--src/libshared/include/shared/install-printf.h2
-rw-r--r--src/libshared/include/shared/install.h11
-rw-r--r--src/libshared/include/shared/logs-show.h3
-rw-r--r--src/libshared/include/shared/path-lookup.h5
-rw-r--r--src/libshared/src/gcrypt-util.c2
-rw-r--r--src/libshared/src/machine-image.c3
-rw-r--r--src/libshared/src/machine-pool.c3
-rw-r--r--src/libshared/src/watchdog.c3
-rw-r--r--src/libsystemd-network/include/systemd-network/dhcp-internal.h8
-rw-r--r--src/libsystemd-network/include/systemd-network/dhcp-lease-internal.h8
-rw-r--r--src/libsystemd-network/include/systemd-network/dhcp-server-internal.h5
-rw-r--r--src/libsystemd-network/include/systemd-network/dhcp6-lease-internal.h4
-rw-r--r--src/libsystemd-network/include/systemd-network/lldp-internal.h3
-rw-r--r--src/libsystemd-network/include/systemd-network/lldp-neighbor.h5
-rw-r--r--src/libsystemd-network/include/systemd-network/network-internal.h3
-rw-r--r--src/libsystemd-network/include/systemd-network/sd-dhcp-client.h3
-rw-r--r--src/libsystemd-network/include/systemd-network/sd-dhcp6-client.h3
-rw-r--r--src/libsystemd-network/src/arp-util.c1
-rw-r--r--src/libsystemd-network/src/dhcp-network.c7
-rw-r--r--src/libsystemd-network/src/dhcp6-network.c3
-rw-r--r--src/libsystemd-network/src/icmp6-util.c3
-rw-r--r--src/libsystemd-network/src/lldp-network.c3
-rw-r--r--src/libsystemd-network/src/network-internal.c3
-rw-r--r--src/libsystemd-network/src/sd-dhcp-client.c3
-rw-r--r--src/libsystemd-network/src/sd-dhcp6-client.c3
-rw-r--r--src/libsystemd-network/test/test-acd.c3
-rw-r--r--src/libsystemd-network/test/test-ipv4ll-manual.c3
-rw-r--r--src/libsystemd/include/systemd/sd-bus-vtable.h2
-rw-r--r--src/libsystemd/include/systemd/sd-bus.h9
-rw-r--r--src/libsystemd/include/systemd/sd-journal.h3
-rw-r--r--src/libsystemd/include/systemd/sd-messages.h3
-rw-r--r--src/libsystemd/src/sd-bus/bus-creds.c3
-rw-r--r--src/libsystemd/src/sd-journal/audit-type.c3
-rw-r--r--src/libsystemd/src/sd-journal/journal-file.c3
-rw-r--r--src/libsystemd/src/sd-journal/sd-journal.c3
-rw-r--r--src/libsystemd/src/sd-netlink/netlink-types.c1
-rw-r--r--src/libsystemd/src/sd-netlink/sd-netlink.h5
-rw-r--r--src/libudev/src/libudev-device.c3
-rw-r--r--src/libudev/src/libudev-monitor.c5
-rw-r--r--src/systemd-nspawn/nspawn-mount.c3
-rw-r--r--src/systemd-nspawn/nspawn-network.c3
-rw-r--r--src/systemd-nspawn/nspawn-patch-uid.c1
-rw-r--r--src/systemd-shutdown/shutdown.c3
-rw-r--r--src/systemd-shutdown/umount.c5
-rw-r--r--src/test/test-netlink-manual.c3
176 files changed, 358 insertions, 280 deletions
diff --git a/src/grp-initutils/systemd-rfkill/rfkill.c b/src/grp-initutils/systemd-rfkill/rfkill.c
index cbb27d8478..86779e9ac8 100644
--- a/src/grp-initutils/systemd-rfkill/rfkill.c
+++ b/src/grp-initutils/systemd-rfkill/rfkill.c
@@ -17,9 +17,10 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
-#include <linux/rfkill.h>
#include <poll.h>
+#include <linux/rfkill.h>
+
#include <libudev.h>
#include <systemd/sd-daemon.h>
diff --git a/src/grp-initutils/systemd-tmpfiles/tmpfiles.c b/src/grp-initutils/systemd-tmpfiles/tmpfiles.c
index c7dde85dae..c674bf1226 100644
--- a/src/grp-initutils/systemd-tmpfiles/tmpfiles.c
+++ b/src/grp-initutils/systemd-tmpfiles/tmpfiles.c
@@ -25,7 +25,6 @@
#include <getopt.h>
#include <glob.h>
#include <limits.h>
-#include <linux/fs.h>
#include <stdbool.h>
#include <stddef.h>
#include <stdio.h>
@@ -36,6 +35,8 @@
#include <time.h>
#include <unistd.h>
+#include <linux/fs.h>
+
#include "basic/alloc-util.h"
#include "basic/btrfs-util.h"
#include "basic/capability-util.h"
diff --git a/src/grp-initutils/systemd-vconsole-setup/vconsole-setup.c b/src/grp-initutils/systemd-vconsole-setup/vconsole-setup.c
index dd05231982..87c0c2f066 100644
--- a/src/grp-initutils/systemd-vconsole-setup/vconsole-setup.c
+++ b/src/grp-initutils/systemd-vconsole-setup/vconsole-setup.c
@@ -20,15 +20,16 @@
#include <errno.h>
#include <fcntl.h>
#include <limits.h>
-#include <linux/kd.h>
-#include <linux/tiocl.h>
-#include <linux/vt.h>
#include <stdbool.h>
#include <stdio.h>
#include <stdlib.h>
#include <sys/ioctl.h>
#include <unistd.h>
+#include <linux/kd.h>
+#include <linux/tiocl.h>
+#include <linux/vt.h>
+
#include "basic/alloc-util.h"
#include "basic/fd-util.h"
#include "basic/fileio.h"
diff --git a/src/grp-journal/journalctl/journalctl.c b/src/grp-journal/journalctl/journalctl.c
index 85a934e978..8901b46ae5 100644
--- a/src/grp-journal/journalctl/journalctl.c
+++ b/src/grp-journal/journalctl/journalctl.c
@@ -21,7 +21,6 @@
#include <fcntl.h>
#include <fnmatch.h>
#include <getopt.h>
-#include <linux/fs.h>
#include <locale.h>
#include <poll.h>
#include <signal.h>
@@ -33,6 +32,8 @@
#include <sys/stat.h>
#include <unistd.h>
+#include <linux/fs.h>
+
#include <systemd/sd-bus.h>
#include <systemd/sd-journal.h>
diff --git a/src/grp-journal/libjournal-core/journald-server.h b/src/grp-journal/libjournal-core/journald-server.h
index 897ee09ca2..5f1af1e50b 100644
--- a/src/grp-journal/libjournal-core/journald-server.h
+++ b/src/grp-journal/libjournal-core/journald-server.h
@@ -24,13 +24,14 @@
#include <systemd/sd-event.h>
-typedef struct Server Server;
-
#include "basic/hashmap.h"
+#include "basic/list.h"
#include "sd-journal/journal-file.h"
+
+typedef struct Server Server;
+
#include "journald-rate-limit.h"
#include "journald-stream.h"
-#include "basic/list.h"
typedef enum Storage {
STORAGE_AUTO,
diff --git a/src/grp-journal/libjournal-core/journald-stream.h b/src/grp-journal/libjournal-core/journald-stream.h
index 29f43b459f..c971d0a00d 100644
--- a/src/grp-journal/libjournal-core/journald-stream.h
+++ b/src/grp-journal/libjournal-core/journald-stream.h
@@ -19,10 +19,10 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
-typedef struct StdoutStream StdoutStream;
-
#include "basic/fdset.h"
+typedef struct StdoutStream StdoutStream;
+
#include "journald-server.h"
int server_open_stdout_socket(Server *s);
diff --git a/src/grp-journal/libjournal-core/test-audit-type.c b/src/grp-journal/libjournal-core/test-audit-type.c
index 38917b30a5..812a3953ea 100644
--- a/src/grp-journal/libjournal-core/test-audit-type.c
+++ b/src/grp-journal/libjournal-core/test-audit-type.c
@@ -17,9 +17,10 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
-#include <linux/audit.h>
#include <stdio.h>
+#include <linux/audit.h>
+
#include "sd-journal/audit-type.h"
static void print_audit_label(int i) {
diff --git a/src/grp-login/liblogind-core/logind-button.c b/src/grp-login/liblogind-core/logind-button.c
index 428e6e91a0..81c82117fc 100644
--- a/src/grp-login/liblogind-core/logind-button.c
+++ b/src/grp-login/liblogind-core/logind-button.c
@@ -19,11 +19,12 @@
#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"
diff --git a/src/grp-login/liblogind-core/logind-button.h b/src/grp-login/liblogind-core/logind-button.h
index f30cba2959..876e4d3cdf 100644
--- a/src/grp-login/liblogind-core/logind-button.h
+++ b/src/grp-login/liblogind-core/logind-button.h
@@ -19,10 +19,10 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
-typedef struct Button Button;
-
#include "logind.h"
+typedef struct Button Button;
+
struct Button {
Manager *manager;
diff --git a/src/grp-login/liblogind-core/logind-core.c b/src/grp-login/liblogind-core/logind-core.c
index 0a9e45bb22..1d6475f8d7 100644
--- a/src/grp-login/liblogind-core/logind-core.c
+++ b/src/grp-login/liblogind-core/logind-core.c
@@ -18,11 +18,12 @@
***/
#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 "basic/cgroup-util.h"
#include "basic/fd-util.h"
diff --git a/src/grp-login/liblogind-core/logind-device.h b/src/grp-login/liblogind-core/logind-device.h
index 23dfcd1964..9e2678d801 100644
--- a/src/grp-login/liblogind-core/logind-device.h
+++ b/src/grp-login/liblogind-core/logind-device.h
@@ -19,10 +19,10 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
-typedef struct Device Device;
-
#include "basic/list.h"
+typedef struct Device Device;
+
#include "logind-seat.h"
#include "logind-session-device.h"
diff --git a/src/grp-login/liblogind-core/logind-seat.h b/src/grp-login/liblogind-core/logind-seat.h
index a2aeb58687..7fbeb5a727 100644
--- a/src/grp-login/liblogind-core/logind-seat.h
+++ b/src/grp-login/liblogind-core/logind-seat.h
@@ -19,10 +19,10 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
-typedef struct Seat Seat;
-
#include "basic/list.h"
+typedef struct Seat Seat;
+
#include "logind-session.h"
struct Seat {
diff --git a/src/grp-login/liblogind-core/logind-session-device.c b/src/grp-login/liblogind-core/logind-session-device.c
index 1bdb188f05..99528488c0 100644
--- a/src/grp-login/liblogind-core/logind-session-device.c
+++ b/src/grp-login/liblogind-core/logind-session-device.c
@@ -18,11 +18,12 @@
***/
#include <fcntl.h>
-#include <linux/input.h>
#include <string.h>
#include <sys/ioctl.h>
#include <sys/types.h>
+#include <linux/input.h>
+
#include <libudev.h>
#include "basic/alloc-util.h"
diff --git a/src/grp-login/liblogind-core/logind-session-device.h b/src/grp-login/liblogind-core/logind-session-device.h
index 152bf75d7a..c20962f21c 100644
--- a/src/grp-login/liblogind-core/logind-session-device.h
+++ b/src/grp-login/liblogind-core/logind-session-device.h
@@ -20,11 +20,11 @@
***/
typedef enum DeviceType DeviceType;
-typedef struct SessionDevice SessionDevice;
-
#include "basic/list.h"
#include "logind.h"
+typedef struct SessionDevice SessionDevice;
+
enum DeviceType {
DEVICE_TYPE_UNKNOWN,
DEVICE_TYPE_DRM,
diff --git a/src/grp-login/liblogind-core/logind-session.c b/src/grp-login/liblogind-core/logind-session.c
index ef451d900a..928f4a6314 100644
--- a/src/grp-login/liblogind-core/logind-session.c
+++ b/src/grp-login/liblogind-core/logind-session.c
@@ -19,13 +19,14 @@
#include <errno.h>
#include <fcntl.h>
-#include <linux/kd.h>
-#include <linux/vt.h>
#include <signal.h>
#include <string.h>
#include <sys/ioctl.h>
#include <unistd.h>
+#include <linux/kd.h>
+#include <linux/vt.h>
+
#include <systemd/sd-messages.h>
#include "basic/alloc-util.h"
diff --git a/src/grp-login/liblogind-core/logind-user.h b/src/grp-login/liblogind-core/logind-user.h
index 227976f036..8663be3994 100644
--- a/src/grp-login/liblogind-core/logind-user.h
+++ b/src/grp-login/liblogind-core/logind-user.h
@@ -19,11 +19,11 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
-typedef struct User User;
-
#include "basic/list.h"
#include "logind.h"
+typedef struct User User;
+
typedef enum UserState {
USER_OFFLINE, /* Not logged in at all */
USER_OPENING, /* Is logging in */
diff --git a/src/grp-login/systemd-logind/logind.h b/src/grp-login/systemd-logind/logind.h
index effc498118..378e86a31f 100644
--- a/src/grp-login/systemd-logind/logind.h
+++ b/src/grp-login/systemd-logind/logind.h
@@ -28,14 +28,13 @@
#include "basic/hashmap.h"
#include "basic/list.h"
#include "basic/set.h"
-
-typedef struct Manager Manager;
-
#include "logind-action.h"
#include "logind-button.h"
#include "logind-device.h"
#include "logind-inhibit.h"
+typedef struct Manager Manager;
+
struct Manager {
sd_event *event;
sd_bus *bus;
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 acf26567d3..59257d6a0c 100644
--- a/src/grp-machine/grp-import/systemd-pull/pull-raw.c
+++ b/src/grp-machine/grp-import/systemd-pull/pull-raw.c
@@ -18,9 +18,10 @@
***/
#include <curl/curl.h>
-#include <linux/fs.h>
#include <sys/xattr.h>
+#include <linux/fs.h>
+
#include <systemd/sd-daemon.h>
#include "basic/alloc-util.h"
diff --git a/src/grp-network/libnetworkd-core/networkd-address-pool.h b/src/grp-network/libnetworkd-core/networkd-address-pool.h
index d5659a9eeb..5d7020739d 100644
--- a/src/grp-network/libnetworkd-core/networkd-address-pool.h
+++ b/src/grp-network/libnetworkd-core/networkd-address-pool.h
@@ -19,11 +19,10 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
-typedef struct AddressPool AddressPool;
-
#include "basic/in-addr-util.h"
#include "basic/list.h"
+typedef struct AddressPool AddressPool;
typedef struct Manager Manager;
struct AddressPool {
diff --git a/src/grp-network/libnetworkd-core/networkd-dhcp4.c b/src/grp-network/libnetworkd-core/networkd-dhcp4.c
index 371613043e..fe565ad075 100644
--- a/src/grp-network/libnetworkd-core/networkd-dhcp4.c
+++ b/src/grp-network/libnetworkd-core/networkd-dhcp4.c
@@ -18,6 +18,7 @@
***/
#include <netinet/ether.h>
+
#include <linux/if.h>
#include "basic/alloc-util.h"
diff --git a/src/grp-network/libnetworkd-core/networkd-dhcp6.c b/src/grp-network/libnetworkd-core/networkd-dhcp6.c
index 9ebb162d6c..6399849ff6 100644
--- a/src/grp-network/libnetworkd-core/networkd-dhcp6.c
+++ b/src/grp-network/libnetworkd-core/networkd-dhcp6.c
@@ -18,6 +18,7 @@
***/
#include <netinet/ether.h>
+
#include <linux/if.h>
#include "systemd-network/network-internal.h"
diff --git a/src/grp-network/libnetworkd-core/networkd-ipv4ll.c b/src/grp-network/libnetworkd-core/networkd-ipv4ll.c
index d196aa909f..735cbc624d 100644
--- a/src/grp-network/libnetworkd-core/networkd-ipv4ll.c
+++ b/src/grp-network/libnetworkd-core/networkd-ipv4ll.c
@@ -18,6 +18,7 @@
***/
#include <netinet/ether.h>
+
#include <linux/if.h>
#include "systemd-network/network-internal.h"
diff --git a/src/grp-network/libnetworkd-core/networkd-link.c b/src/grp-network/libnetworkd-core/networkd-link.c
index f4cef69fbb..72f6b5057e 100644
--- a/src/grp-network/libnetworkd-core/networkd-link.c
+++ b/src/grp-network/libnetworkd-core/networkd-link.c
@@ -18,9 +18,10 @@
***/
#include <netinet/ether.h>
-#include <linux/if.h>
#include <unistd.h>
+#include <linux/if.h>
+
#include "basic/alloc-util.h"
#include "basic/fd-util.h"
#include "basic/fileio.h"
diff --git a/src/grp-network/libnetworkd-core/networkd-manager.c b/src/grp-network/libnetworkd-core/networkd-manager.c
index 0f54debf07..1bf22edcb7 100644
--- a/src/grp-network/libnetworkd-core/networkd-manager.c
+++ b/src/grp-network/libnetworkd-core/networkd-manager.c
@@ -18,6 +18,7 @@
***/
#include <sys/socket.h>
+
#include <linux/if.h>
#include <systemd/sd-daemon.h>
diff --git a/src/grp-network/libnetworkd-core/networkd-ndisc.c b/src/grp-network/libnetworkd-core/networkd-ndisc.c
index 1033ccc342..c454be7ba3 100644
--- a/src/grp-network/libnetworkd-core/networkd-ndisc.c
+++ b/src/grp-network/libnetworkd-core/networkd-ndisc.c
@@ -20,6 +20,7 @@
#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 12e5e58159..7e7b8f8804 100644
--- a/src/grp-network/libnetworkd-core/networkd-netdev-bond.c
+++ b/src/grp-network/libnetworkd-core/networkd-netdev-bond.c
@@ -18,9 +18,10 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
-#include <linux/if_bonding.h>
#include <netinet/ether.h>
+#include <linux/if_bonding.h>
+
#include "basic/alloc-util.h"
#include "basic/extract-word.h"
#include "basic/missing.h"
diff --git a/src/grp-network/libnetworkd-core/networkd-netdev-tunnel.c b/src/grp-network/libnetworkd-core/networkd-netdev-tunnel.c
index eaee167506..49f18a8cd9 100644
--- a/src/grp-network/libnetworkd-core/networkd-netdev-tunnel.c
+++ b/src/grp-network/libnetworkd-core/networkd-netdev-tunnel.c
@@ -18,10 +18,11 @@
***/
#include <arpa/inet.h>
+#include <net/if.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 5232f77ba8..ab5b90fcc9 100644
--- a/src/grp-network/libnetworkd-core/networkd-netdev-tuntap.c
+++ b/src/grp-network/libnetworkd-core/networkd-netdev-tuntap.c
@@ -18,13 +18,14 @@
***/
#include <fcntl.h>
-#include <linux/if_tun.h>
#include <net/if.h>
#include <netinet/if_ether.h>
#include <sys/ioctl.h>
#include <sys/stat.h>
#include <sys/types.h>
+#include <linux/if_tun.h>
+
#include "basic/alloc-util.h"
#include "basic/fd-util.h"
#include "basic/user-util.h"
diff --git a/src/grp-network/libnetworkd-core/networkd-netdev-veth.c b/src/grp-network/libnetworkd-core/networkd-netdev-veth.c
index b25d468aa4..fb068c75bf 100644
--- a/src/grp-network/libnetworkd-core/networkd-netdev-veth.c
+++ b/src/grp-network/libnetworkd-core/networkd-netdev-veth.c
@@ -17,9 +17,10 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
-#include <linux/veth.h>
#include <net/if.h>
+#include <linux/veth.h>
+
#include "sd-netlink/sd-netlink.h"
#include "networkd-netdev-veth.h"
diff --git a/src/grp-network/libnetworkd-core/networkd-netdev-vxlan.h b/src/grp-network/libnetworkd-core/networkd-netdev-vxlan.h
index 6e8393145e..7950c867e3 100644
--- a/src/grp-network/libnetworkd-core/networkd-netdev-vxlan.h
+++ b/src/grp-network/libnetworkd-core/networkd-netdev-vxlan.h
@@ -19,10 +19,10 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
-typedef struct VxLan VxLan;
-
#include "basic/in-addr-util.h"
+typedef struct VxLan VxLan;
+
#include "networkd-netdev.h"
#define VXLAN_VID_MAX (1u << 24) - 1
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 02bf652c0b..9ec0550d44 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,9 +17,10 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
+#include <fnmatch.h>
#include <netinet/ether.h>
+
#include <linux/if.h>
-#include <fnmatch.h>
#include "basic/alloc-util.h"
#include "basic/time-util.h"
diff --git a/src/grp-resolve/systemd-resolved/resolved-dns-answer.h b/src/grp-resolve/systemd-resolved/resolved-dns-answer.h
index 920a3136d8..92557a410a 100644
--- a/src/grp-resolve/systemd-resolved/resolved-dns-answer.h
+++ b/src/grp-resolve/systemd-resolved/resolved-dns-answer.h
@@ -19,11 +19,11 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
+#include "basic/macro.h"
+
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-packet.h b/src/grp-resolve/systemd-resolved/resolved-dns-packet.h
index 4b9916d8ba..2e0eba83b6 100644
--- a/src/grp-resolve/systemd-resolved/resolved-dns-packet.h
+++ b/src/grp-resolve/systemd-resolved/resolved-dns-packet.h
@@ -27,8 +27,8 @@
#include "basic/macro.h"
#include "basic/sparse-endian.h"
-typedef struct DnsPacketHeader DnsPacketHeader;
typedef struct DnsPacket DnsPacket;
+typedef struct DnsPacketHeader DnsPacketHeader;
#include "resolved-def.h"
#include "resolved-dns-answer.h"
diff --git a/src/grp-resolve/systemd-resolved/resolved-dns-query.h b/src/grp-resolve/systemd-resolved/resolved-dns-query.h
index 788d303165..86d861ce76 100644
--- a/src/grp-resolve/systemd-resolved/resolved-dns-query.h
+++ b/src/grp-resolve/systemd-resolved/resolved-dns-query.h
@@ -24,13 +24,13 @@
#include "basic/set.h"
-typedef struct DnsQueryCandidate DnsQueryCandidate;
typedef struct DnsQuery DnsQuery;
+typedef struct DnsQueryCandidate DnsQueryCandidate;
#include "resolved-dns-answer.h"
#include "resolved-dns-question.h"
-#include "resolved-dns-stream.h"
#include "resolved-dns-search-domain.h"
+#include "resolved-dns-stream.h"
struct DnsQueryCandidate {
DnsQuery *query;
diff --git a/src/grp-resolve/systemd-resolved/resolved-dns-question.h b/src/grp-resolve/systemd-resolved/resolved-dns-question.h
index 3f9aa8fbe0..320bf53488 100644
--- a/src/grp-resolve/systemd-resolved/resolved-dns-question.h
+++ b/src/grp-resolve/systemd-resolved/resolved-dns-question.h
@@ -19,10 +19,10 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
-typedef struct DnsQuestion DnsQuestion;
-
#include "basic/macro.h"
+typedef struct DnsQuestion DnsQuestion;
+
#include "resolved-dns-rr.h"
/* A simple array of resource keys */
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 5f4e3e236c..193e4a6923 100644
--- a/src/grp-resolve/systemd-resolved/resolved-dns-trust-anchor.h
+++ b/src/grp-resolve/systemd-resolved/resolved-dns-trust-anchor.h
@@ -19,10 +19,10 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
-typedef struct DnsTrustAnchor DnsTrustAnchor;
-
#include "basic/hashmap.h"
+typedef struct DnsTrustAnchor DnsTrustAnchor;
+
#include "resolved-dns-answer.h"
#include "resolved-dns-rr.h"
diff --git a/src/grp-system/libcore/automount.c b/src/grp-system/libcore/automount.c
index ca5deece11..f0d544b4d6 100644
--- a/src/grp-system/libcore/automount.c
+++ b/src/grp-system/libcore/automount.c
@@ -20,12 +20,14 @@
#include <errno.h>
#include <fcntl.h>
#include <limits.h>
-#include <linux/auto_fs4.h>
#include <sys/epoll.h>
#include <sys/mount.h>
#include <sys/stat.h>
#include <unistd.h>
+#include <linux/auto_fs4.h>
+#include <linux/auto_dev-ioctl.h>
+
#include "basic/alloc-util.h"
#include "basic/async.h"
#include "basic/fd-util.h"
@@ -47,7 +49,6 @@
#include "automount.h"
#include "dbus-automount.h"
-#include "linux/auto_dev-ioctl.h"
#include "mount.h"
#include "unit.h"
diff --git a/src/grp-system/libcore/execute.h b/src/grp-system/libcore/execute.h
index 38f21125cb..73292dd086 100644
--- a/src/grp-system/libcore/execute.h
+++ b/src/grp-system/libcore/execute.h
@@ -19,12 +19,6 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
-typedef struct ExecStatus ExecStatus;
-typedef struct ExecCommand ExecCommand;
-typedef struct ExecContext ExecContext;
-typedef struct ExecRuntime ExecRuntime;
-typedef struct ExecParameters ExecParameters;
-
#include <sched.h>
#include <stdbool.h>
#include <stdio.h>
@@ -34,6 +28,12 @@ typedef struct ExecParameters ExecParameters;
#include "basic/list.h"
#include "basic/missing.h"
+typedef struct ExecCommand ExecCommand;
+typedef struct ExecContext ExecContext;
+typedef struct ExecParameters ExecParameters;
+typedef struct ExecRuntime ExecRuntime;
+typedef struct ExecStatus ExecStatus;
+
#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 ee6025e7e2..e22c71dac6 100644
--- a/src/grp-system/libcore/failure-action.c
+++ b/src/grp-system/libcore/failure-action.c
@@ -18,9 +18,10 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
-#include <linux/reboot.h>
#include <sys/reboot.h>
+#include <linux/reboot.h>
+
#include "basic/special.h"
#include "basic/string-table.h"
#include "basic/terminal-util.h"
diff --git a/src/grp-system/libcore/kill.h b/src/grp-system/libcore/kill.h
index 529e4c5377..481ffdf2ff 100644
--- a/src/grp-system/libcore/kill.h
+++ b/src/grp-system/libcore/kill.h
@@ -19,13 +19,13 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
-typedef struct KillContext KillContext;
-
#include <stdbool.h>
#include <stdio.h>
#include "basic/macro.h"
+typedef struct KillContext KillContext;
+
typedef enum KillMode {
/* The kill mode is a property of a unit. */
KILL_CONTROL_GROUP = 0,
diff --git a/src/grp-system/libcore/load-fragment.c b/src/grp-system/libcore/load-fragment.c
index 6d9100b189..0f17dc85c2 100644
--- a/src/grp-system/libcore/load-fragment.c
+++ b/src/grp-system/libcore/load-fragment.c
@@ -20,6 +20,7 @@
#include <errno.h>
#include <fcntl.h>
+
#include <linux/fs.h>
#include <linux/oom.h>
#ifdef HAVE_SECCOMP
diff --git a/src/grp-system/libcore/manager.c b/src/grp-system/libcore/manager.c
index 9019967300..2637296c9b 100644
--- a/src/grp-system/libcore/manager.c
+++ b/src/grp-system/libcore/manager.c
@@ -20,7 +20,6 @@
#include <dirent.h>
#include <errno.h>
#include <fcntl.h>
-#include <linux/kd.h>
#include <signal.h>
#include <string.h>
#include <sys/epoll.h>
@@ -31,6 +30,8 @@
#include <sys/wait.h>
#include <unistd.h>
+#include <linux/kd.h>
+
#ifdef HAVE_AUDIT
#include <libaudit.h>
#endif
diff --git a/src/grp-system/libcore/namespace.c b/src/grp-system/libcore/namespace.c
index 5af026ff99..db60336a60 100644
--- a/src/grp-system/libcore/namespace.c
+++ b/src/grp-system/libcore/namespace.c
@@ -24,6 +24,7 @@
#include <sys/mount.h>
#include <sys/stat.h>
#include <unistd.h>
+
#include <linux/fs.h>
#include "basic/alloc-util.h"
diff --git a/src/grp-system/libcore/service.h b/src/grp-system/libcore/service.h
index e67e242ab1..ba9086d8cd 100644
--- a/src/grp-system/libcore/service.h
+++ b/src/grp-system/libcore/service.h
@@ -19,12 +19,12 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
-typedef struct Service Service;
-typedef struct ServiceFDStore ServiceFDStore;
-
#include "basic/exit-status.h"
#include "basic/ratelimit.h"
+typedef struct Service Service;
+typedef struct ServiceFDStore ServiceFDStore;
+
#include "kill.h"
#include "path.h"
diff --git a/src/grp-system/libcore/socket.c b/src/grp-system/libcore/socket.c
index cb2cb884d0..051cbdab8b 100644
--- a/src/grp-system/libcore/socket.c
+++ b/src/grp-system/libcore/socket.c
@@ -20,7 +20,6 @@
#include <arpa/inet.h>
#include <errno.h>
#include <fcntl.h>
-#include <linux/sctp.h>
#include <mqueue.h>
#include <netinet/tcp.h>
#include <signal.h>
@@ -28,6 +27,8 @@
#include <sys/stat.h>
#include <unistd.h>
+#include <linux/sctp.h>
+
#include "basic/alloc-util.h"
#include "basic/copy.h"
#include "basic/def.h"
diff --git a/src/grp-system/libcore/socket.h b/src/grp-system/libcore/socket.h
index 6e485f51c3..3b214946e0 100644
--- a/src/grp-system/libcore/socket.h
+++ b/src/grp-system/libcore/socket.h
@@ -19,10 +19,10 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
-typedef struct Socket Socket;
-
#include "basic/socket-util.h"
+typedef struct Socket Socket;
+
#include "mount.h"
#include "service.h"
diff --git a/src/grp-system/libcore/timer.h b/src/grp-system/libcore/timer.h
index 3773ec47e1..99b47c3880 100644
--- a/src/grp-system/libcore/timer.h
+++ b/src/grp-system/libcore/timer.h
@@ -19,10 +19,10 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
-typedef struct Timer Timer;
-
#include "basic/calendarspec.h"
+typedef struct Timer Timer;
+
typedef enum TimerBase {
TIMER_ACTIVE,
TIMER_BOOT,
diff --git a/src/grp-system/libcore/transaction.h b/src/grp-system/libcore/transaction.h
index e89dad99bf..19d8d3d434 100644
--- a/src/grp-system/libcore/transaction.h
+++ b/src/grp-system/libcore/transaction.h
@@ -19,10 +19,10 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
-typedef struct Transaction Transaction;
-
#include "basic/hashmap.h"
+typedef struct Transaction Transaction;
+
#include "job.h"
#include "manager.h"
#include "unit.h"
diff --git a/src/grp-system/libcore/unit.h b/src/grp-system/libcore/unit.h
index 79de5a8a89..9321537fe6 100644
--- a/src/grp-system/libcore/unit.h
+++ b/src/grp-system/libcore/unit.h
@@ -23,15 +23,15 @@
#include <stdlib.h>
#include <unistd.h>
-#include "shared/condition.h"
-#include "shared/install.h"
#include "basic/list.h"
#include "basic/unit-name.h"
+#include "shared/condition.h"
+#include "shared/install.h"
typedef struct Unit Unit;
-typedef struct UnitVTable UnitVTable;
typedef struct UnitRef UnitRef;
typedef struct UnitStatusMessageFormats UnitStatusMessageFormats;
+typedef struct UnitVTable UnitVTable;
#include "failure-action.h"
diff --git a/src/grp-system/systemctl/systemctl.c b/src/grp-system/systemctl/systemctl.c
index 0808ecafe3..63818d07b8 100644
--- a/src/grp-system/systemctl/systemctl.c
+++ b/src/grp-system/systemctl/systemctl.c
@@ -21,7 +21,6 @@
#include <errno.h>
#include <fcntl.h>
#include <getopt.h>
-#include <linux/reboot.h>
#include <locale.h>
#include <stdbool.h>
#include <stddef.h>
@@ -31,6 +30,8 @@
#include <sys/socket.h>
#include <unistd.h>
+#include <linux/reboot.h>
+
#include <systemd/sd-bus.h>
#include <systemd/sd-daemon.h>
#include <systemd/sd-login.h>
diff --git a/src/grp-udev/ata_id/ata_id.c b/src/grp-udev/ata_id/ata_id.c
index 22231225b6..4728d72a57 100644
--- a/src/grp-udev/ata_id/ata_id.c
+++ b/src/grp-udev/ata_id/ata_id.c
@@ -23,8 +23,6 @@
#include <errno.h>
#include <fcntl.h>
#include <getopt.h>
-#include <linux/bsg.h>
-#include <linux/hdreg.h>
#include <scsi/scsi.h>
#include <scsi/scsi_ioctl.h>
#include <scsi/sg.h>
@@ -37,6 +35,9 @@
#include <sys/types.h>
#include <unistd.h>
+#include <linux/bsg.h>
+#include <linux/hdreg.h>
+
#include <libudev.h>
#include "basic/fd-util.h"
diff --git a/src/grp-udev/cdrom_id/cdrom_id.c b/src/grp-udev/cdrom_id/cdrom_id.c
index 90df241b45..9a5af6d614 100644
--- a/src/grp-udev/cdrom_id/cdrom_id.c
+++ b/src/grp-udev/cdrom_id/cdrom_id.c
@@ -21,7 +21,6 @@
#include <fcntl.h>
#include <getopt.h>
#include <limits.h>
-#include <linux/cdrom.h>
#include <scsi/sg.h>
#include <stddef.h>
#include <stdio.h>
@@ -34,6 +33,8 @@
#include <time.h>
#include <unistd.h>
+#include <linux/cdrom.h>
+
#include <libudev.h>
#include "basic/random-util.h"
diff --git a/src/grp-udev/libudev-core/net/ethtool-util.c b/src/grp-udev/libudev-core/net/ethtool-util.c
index 759ecde5e4..b381284a6b 100644
--- a/src/grp-udev/libudev-core/net/ethtool-util.c
+++ b/src/grp-udev/libudev-core/net/ethtool-util.c
@@ -17,11 +17,12 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
-#include <linux/ethtool.h>
-#include <linux/sockios.h>
#include <net/if.h>
#include <sys/ioctl.h>
+#include <linux/ethtool.h>
+#include <linux/sockios.h>
+
#include "basic/log.h"
#include "basic/string-table.h"
#include "basic/strxcpyx.h"
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 f5d700e299..386ef5b5dc 100644
--- a/src/grp-udev/libudev-core/udev-builtin-input_id.c
+++ b/src/grp-udev/libudev-core/udev-builtin-input_id.c
@@ -22,14 +22,15 @@
*/
#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/input.h>
+#include <linux/limits.h>
+
#include "basic/fd-util.h"
#include "basic/stdio-util.h"
#include "basic/string-util.h"
diff --git a/src/grp-udev/libudev-core/udev-builtin-keyboard.c b/src/grp-udev/libudev-core/udev-builtin-keyboard.c
index 5067e2247a..d07eff08d6 100644
--- a/src/grp-udev/libudev-core/udev-builtin-keyboard.c
+++ b/src/grp-udev/libudev-core/udev-builtin-keyboard.c
@@ -17,12 +17,13 @@
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"
#include "basic/stdio-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 f120f816e8..51f734d2c1 100644
--- a/src/grp-udev/libudev-core/udev-builtin-net_id.c
+++ b/src/grp-udev/libudev-core/udev-builtin-net_id.c
@@ -89,7 +89,6 @@
#include <errno.h>
#include <fcntl.h>
-#include <linux/pci_regs.h>
#include <net/if.h>
#include <net/if_arp.h>
#include <stdarg.h>
@@ -98,6 +97,8 @@
#include <string.h>
#include <unistd.h>
+#include <linux/pci_regs.h>
+
#include "basic/fd-util.h"
#include "basic/fileio.h"
#include "basic/stdio-util.h"
diff --git a/src/grp-udev/scsi_id/scsi_serial.c b/src/grp-udev/scsi_id/scsi_serial.c
index f926e17dad..544fcde108 100644
--- a/src/grp-udev/scsi_id/scsi_serial.c
+++ b/src/grp-udev/scsi_id/scsi_serial.c
@@ -20,8 +20,6 @@
#include <errno.h>
#include <fcntl.h>
#include <inttypes.h>
-#include <linux/bsg.h>
-#include <linux/types.h>
#include <scsi/scsi.h>
#include <scsi/sg.h>
#include <stdio.h>
@@ -33,6 +31,9 @@
#include <time.h>
#include <unistd.h>
+#include <linux/bsg.h>
+#include <linux/types.h>
+
#include <libudev.h>
#include "basic/random-util.h"
diff --git a/src/grp-udev/v4l_id/v4l_id.c b/src/grp-udev/v4l_id/v4l_id.c
index 3271121a3b..d1aad403b9 100644
--- a/src/grp-udev/v4l_id/v4l_id.c
+++ b/src/grp-udev/v4l_id/v4l_id.c
@@ -17,7 +17,6 @@
#include <errno.h>
#include <fcntl.h>
#include <getopt.h>
-#include <linux/videodev2.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
@@ -26,6 +25,8 @@
#include <sys/types.h>
#include <unistd.h>
+#include <linux/videodev2.h>
+
#include "basic/fd-util.h"
#include "basic/util.h"
diff --git a/src/libbasic/include/basic/af-list.h b/src/libbasic/include/basic/af-list.h
index da9d373872..6a4cc03839 100644
--- a/src/libbasic/include/basic/af-list.h
+++ b/src/libbasic/include/basic/af-list.h
@@ -19,7 +19,7 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
-#include "basic/string-util.h"
+#include "string-util.h"
const char *af_to_name(int id);
int af_from_name(const char *name);
diff --git a/src/libbasic/include/basic/alloc-util.h b/src/libbasic/include/basic/alloc-util.h
index e17c027634..ceeee519b7 100644
--- a/src/libbasic/include/basic/alloc-util.h
+++ b/src/libbasic/include/basic/alloc-util.h
@@ -24,7 +24,7 @@
#include <stdlib.h>
#include <string.h>
-#include "basic/macro.h"
+#include "macro.h"
#define new(t, n) ((t*) malloc_multiply(sizeof(t), (n)))
diff --git a/src/libbasic/include/basic/architecture.h b/src/libbasic/include/basic/architecture.h
index 2d4f710f71..b3e4d85906 100644
--- a/src/libbasic/include/basic/architecture.h
+++ b/src/libbasic/include/basic/architecture.h
@@ -21,8 +21,8 @@
#include <endian.h>
-#include "basic/macro.h"
-#include "basic/util.h"
+#include "macro.h"
+#include "util.h"
/* A cleaned up architecture definition. We don't want to get lost in
* processor features, models, generations or even ABIs. Hence we
diff --git a/src/libbasic/include/basic/barrier.h b/src/libbasic/include/basic/barrier.h
index a27a8fc7d6..6347fddc4d 100644
--- a/src/libbasic/include/basic/barrier.h
+++ b/src/libbasic/include/basic/barrier.h
@@ -23,7 +23,7 @@
#include <stdint.h>
#include <sys/types.h>
-#include "basic/macro.h"
+#include "macro.h"
/* See source file for an API description. */
diff --git a/src/libbasic/include/basic/bitmap.h b/src/libbasic/include/basic/bitmap.h
index ee0e13de9e..f5f8f2f018 100644
--- a/src/libbasic/include/basic/bitmap.h
+++ b/src/libbasic/include/basic/bitmap.h
@@ -21,8 +21,8 @@
#include <stdbool.h>
-#include "basic/hashmap.h"
-#include "basic/macro.h"
+#include "hashmap.h"
+#include "macro.h"
typedef struct Bitmap Bitmap;
diff --git a/src/libbasic/include/basic/blkid-util.h b/src/libbasic/include/basic/blkid-util.h
index 69a941ede2..7aa75eb091 100644
--- a/src/libbasic/include/basic/blkid-util.h
+++ b/src/libbasic/include/basic/blkid-util.h
@@ -23,7 +23,7 @@
#include <blkid/blkid.h>
#endif
-#include "basic/util.h"
+#include "util.h"
#ifdef HAVE_BLKID
DEFINE_TRIVIAL_CLEANUP_FUNC(blkid_probe, blkid_free_probe);
diff --git a/src/libbasic/include/basic/btrfs-ctree.h b/src/libbasic/include/basic/btrfs-ctree.h
index f35bfbc7f4..66bdf9736e 100644
--- a/src/libbasic/include/basic/btrfs-ctree.h
+++ b/src/libbasic/include/basic/btrfs-ctree.h
@@ -1,7 +1,7 @@
#pragma once
-#include "basic/macro.h"
-#include "basic/sparse-endian.h"
+#include "macro.h"
+#include "sparse-endian.h"
/* Stolen from btrfs' ctree.h */
diff --git a/src/libbasic/include/basic/btrfs-util.h b/src/libbasic/include/basic/btrfs-util.h
index 6221089f3a..db431f5b74 100644
--- a/src/libbasic/include/basic/btrfs-util.h
+++ b/src/libbasic/include/basic/btrfs-util.h
@@ -25,7 +25,7 @@
#include <systemd/sd-id128.h>
-#include "basic/time-util.h"
+#include "time-util.h"
typedef struct BtrfsSubvolInfo {
uint64_t subvol_id;
diff --git a/src/libbasic/include/basic/calendarspec.h b/src/libbasic/include/basic/calendarspec.h
index 8456afe499..f6472c1244 100644
--- a/src/libbasic/include/basic/calendarspec.h
+++ b/src/libbasic/include/basic/calendarspec.h
@@ -24,8 +24,8 @@
#include <stdbool.h>
-#include "basic/time-util.h"
-#include "basic/util.h"
+#include "time-util.h"
+#include "util.h"
typedef struct CalendarComponent {
int value;
diff --git a/src/libbasic/include/basic/capability-util.h b/src/libbasic/include/basic/capability-util.h
index 2486cd8eb4..35a896e229 100644
--- a/src/libbasic/include/basic/capability-util.h
+++ b/src/libbasic/include/basic/capability-util.h
@@ -24,8 +24,8 @@
#include <sys/capability.h>
#include <sys/types.h>
-#include "basic/macro.h"
-#include "basic/util.h"
+#include "macro.h"
+#include "util.h"
#define CAP_ALL (uint64_t) -1
diff --git a/src/libbasic/include/basic/cgroup-util.h b/src/libbasic/include/basic/cgroup-util.h
index f957b181a5..4bb5291296 100644
--- a/src/libbasic/include/basic/cgroup-util.h
+++ b/src/libbasic/include/basic/cgroup-util.h
@@ -25,10 +25,10 @@
#include <stdio.h>
#include <sys/types.h>
-#include "basic/def.h"
-#include "basic/hashmap.h"
-#include "basic/macro.h"
-#include "basic/set.h"
+#include "def.h"
+#include "hashmap.h"
+#include "macro.h"
+#include "set.h"
/* An enum of well known cgroup controllers */
typedef enum CGroupController {
diff --git a/src/libbasic/include/basic/cpu-set-util.h b/src/libbasic/include/basic/cpu-set-util.h
index 17cafff2ae..6f49d9afb0 100644
--- a/src/libbasic/include/basic/cpu-set-util.h
+++ b/src/libbasic/include/basic/cpu-set-util.h
@@ -22,7 +22,7 @@
#include <sched.h>
-#include "basic/macro.h"
+#include "macro.h"
DEFINE_TRIVIAL_CLEANUP_FUNC(cpu_set_t*, CPU_FREE);
#define _cleanup_cpu_free_ _cleanup_(CPU_FREEp)
diff --git a/src/libbasic/include/basic/def.h b/src/libbasic/include/basic/def.h
index c9151e6023..1a7a0f4928 100644
--- a/src/libbasic/include/basic/def.h
+++ b/src/libbasic/include/basic/def.h
@@ -19,7 +19,7 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
-#include "basic/util.h"
+#include "util.h"
#define DEFAULT_TIMEOUT_USEC (90*USEC_PER_SEC)
#define DEFAULT_RESTART_USEC (100*USEC_PER_MSEC)
diff --git a/src/libbasic/include/basic/dirent-util.h b/src/libbasic/include/basic/dirent-util.h
index 4352db66c5..b91d04908f 100644
--- a/src/libbasic/include/basic/dirent-util.h
+++ b/src/libbasic/include/basic/dirent-util.h
@@ -23,8 +23,8 @@
#include <errno.h>
#include <stdbool.h>
-#include "basic/macro.h"
-#include "basic/path-util.h"
+#include "macro.h"
+#include "path-util.h"
int dirent_ensure_type(DIR *d, struct dirent *de);
diff --git a/src/libbasic/include/basic/env-util.h b/src/libbasic/include/basic/env-util.h
index f22958257d..b1fef704c2 100644
--- a/src/libbasic/include/basic/env-util.h
+++ b/src/libbasic/include/basic/env-util.h
@@ -22,7 +22,7 @@
#include <stdbool.h>
#include <stddef.h>
-#include "basic/macro.h"
+#include "macro.h"
bool env_name_is_valid(const char *e);
bool env_value_is_valid(const char *e);
diff --git a/src/libbasic/include/basic/escape.h b/src/libbasic/include/basic/escape.h
index 97fa90caf0..6e58f61e19 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/missing.h"
-#include "basic/string-util.h"
+#include "missing.h"
+#include "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/exit-status.h b/src/libbasic/include/basic/exit-status.h
index 3e9dcb1e53..1208c8feed 100644
--- a/src/libbasic/include/basic/exit-status.h
+++ b/src/libbasic/include/basic/exit-status.h
@@ -21,9 +21,9 @@
#include <stdbool.h>
-#include "basic/hashmap.h"
-#include "basic/macro.h"
-#include "basic/set.h"
+#include "hashmap.h"
+#include "macro.h"
+#include "set.h"
typedef enum ExitStatus {
/* EXIT_SUCCESS defined by libc */
diff --git a/src/libbasic/include/basic/extract-word.h b/src/libbasic/include/basic/extract-word.h
index 6211a7d15b..21db5ef33f 100644
--- a/src/libbasic/include/basic/extract-word.h
+++ b/src/libbasic/include/basic/extract-word.h
@@ -19,7 +19,7 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
-#include "basic/macro.h"
+#include "macro.h"
typedef enum ExtractFlags {
EXTRACT_RELAX = 1,
diff --git a/src/libbasic/include/basic/fd-util.h b/src/libbasic/include/basic/fd-util.h
index 706c49324c..b86e41698a 100644
--- a/src/libbasic/include/basic/fd-util.h
+++ b/src/libbasic/include/basic/fd-util.h
@@ -24,7 +24,7 @@
#include <stdio.h>
#include <sys/socket.h>
-#include "basic/macro.h"
+#include "macro.h"
/* Make sure we can distinguish fd 0 and NULL */
#define FD_TO_PTR(fd) INT_TO_PTR((fd)+1)
diff --git a/src/libbasic/include/basic/fdset.h b/src/libbasic/include/basic/fdset.h
index 3ff5d519af..16efe5bdf2 100644
--- a/src/libbasic/include/basic/fdset.h
+++ b/src/libbasic/include/basic/fdset.h
@@ -21,9 +21,9 @@
#include <stdbool.h>
-#include "basic/hashmap.h"
-#include "basic/macro.h"
-#include "basic/set.h"
+#include "hashmap.h"
+#include "macro.h"
+#include "set.h"
typedef struct FDSet FDSet;
diff --git a/src/libbasic/include/basic/fileio-label.h b/src/libbasic/include/basic/fileio-label.h
index e8e8375de6..fe7543013d 100644
--- a/src/libbasic/include/basic/fileio-label.h
+++ b/src/libbasic/include/basic/fileio-label.h
@@ -22,7 +22,7 @@
#include <stdio.h>
-#include "basic/fileio.h"
+#include "fileio.h"
int write_string_file_atomic_label(const char *fn, const char *line);
int write_env_file_label(const char *fname, char **l);
diff --git a/src/libbasic/include/basic/fileio.h b/src/libbasic/include/basic/fileio.h
index 31f75d0f97..58dbc80c24 100644
--- a/src/libbasic/include/basic/fileio.h
+++ b/src/libbasic/include/basic/fileio.h
@@ -25,8 +25,8 @@
#include <stdio.h>
#include <sys/types.h>
-#include "basic/macro.h"
-#include "basic/time-util.h"
+#include "macro.h"
+#include "time-util.h"
typedef enum {
WRITE_STRING_FILE_CREATE = 1,
diff --git a/src/libbasic/include/basic/fs-util.h b/src/libbasic/include/basic/fs-util.h
index 69292a3b22..517b599d6f 100644
--- a/src/libbasic/include/basic/fs-util.h
+++ b/src/libbasic/include/basic/fs-util.h
@@ -27,7 +27,7 @@
#include <sys/types.h>
#include <unistd.h>
-#include "basic/time-util.h"
+#include "time-util.h"
int unlink_noerrno(const char *path);
diff --git a/src/libbasic/include/basic/glob-util.h b/src/libbasic/include/basic/glob-util.h
index 63daf4d67f..5d8fb47a26 100644
--- a/src/libbasic/include/basic/glob-util.h
+++ b/src/libbasic/include/basic/glob-util.h
@@ -22,8 +22,8 @@
#include <stdbool.h>
#include <string.h>
-#include "basic/macro.h"
-#include "basic/string-util.h"
+#include "macro.h"
+#include "string-util.h"
int glob_exists(const char *path);
int glob_extend(char ***strv, const char *path);
diff --git a/src/libbasic/include/basic/hash-funcs.h b/src/libbasic/include/basic/hash-funcs.h
index 95c565a3ce..299189d143 100644
--- a/src/libbasic/include/basic/hash-funcs.h
+++ b/src/libbasic/include/basic/hash-funcs.h
@@ -20,8 +20,8 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
-#include "basic/macro.h"
-#include "basic/siphash24.h"
+#include "macro.h"
+#include "siphash24.h"
typedef void (*hash_func_t)(const void *p, struct siphash *state);
typedef int (*compare_func_t)(const void *a, const void *b);
diff --git a/src/libbasic/include/basic/hashmap.h b/src/libbasic/include/basic/hashmap.h
index 2be0e99d42..6d1ae48b21 100644
--- a/src/libbasic/include/basic/hashmap.h
+++ b/src/libbasic/include/basic/hashmap.h
@@ -24,9 +24,9 @@
#include <stdbool.h>
#include <stddef.h>
-#include "basic/hash-funcs.h"
-#include "basic/macro.h"
-#include "basic/util.h"
+#include "hash-funcs.h"
+#include "macro.h"
+#include "util.h"
/*
* A hash table implementation. As a minor optimization a NULL hashmap object
diff --git a/src/libbasic/include/basic/hexdecoct.h b/src/libbasic/include/basic/hexdecoct.h
index 3c1225cf8b..1ba2f69ebd 100644
--- a/src/libbasic/include/basic/hexdecoct.h
+++ b/src/libbasic/include/basic/hexdecoct.h
@@ -24,7 +24,7 @@
#include <stdio.h>
#include <sys/types.h>
-#include "basic/macro.h"
+#include "macro.h"
char octchar(int x) _const_;
int unoctchar(char c) _const_;
diff --git a/src/libbasic/include/basic/hostname-util.h b/src/libbasic/include/basic/hostname-util.h
index e23412e116..7af4e6c7ec 100644
--- a/src/libbasic/include/basic/hostname-util.h
+++ b/src/libbasic/include/basic/hostname-util.h
@@ -21,7 +21,7 @@
#include <stdbool.h>
-#include "basic/macro.h"
+#include "macro.h"
bool hostname_is_set(void);
diff --git a/src/libbasic/include/basic/in-addr-util.h b/src/libbasic/include/basic/in-addr-util.h
index c28a84a0d9..17798ce816 100644
--- a/src/libbasic/include/basic/in-addr-util.h
+++ b/src/libbasic/include/basic/in-addr-util.h
@@ -23,8 +23,8 @@
#include <stddef.h>
#include <sys/socket.h>
-#include "basic/macro.h"
-#include "basic/util.h"
+#include "macro.h"
+#include "util.h"
union in_addr_union {
struct in_addr in;
diff --git a/src/libbasic/include/basic/io-util.h b/src/libbasic/include/basic/io-util.h
index 100f15c283..4684ed3bfc 100644
--- a/src/libbasic/include/basic/io-util.h
+++ b/src/libbasic/include/basic/io-util.h
@@ -25,8 +25,8 @@
#include <sys/types.h>
#include <sys/uio.h>
-#include "basic/macro.h"
-#include "basic/time-util.h"
+#include "macro.h"
+#include "time-util.h"
int flush_fd(int fd);
diff --git a/src/libbasic/include/basic/locale-util.h b/src/libbasic/include/basic/locale-util.h
index e5db878b12..0630a034ab 100644
--- a/src/libbasic/include/basic/locale-util.h
+++ b/src/libbasic/include/basic/locale-util.h
@@ -22,7 +22,7 @@
#include <libintl.h>
#include <stdbool.h>
-#include "basic/macro.h"
+#include "macro.h"
typedef enum LocaleVariable {
/* We don't list LC_ALL here on purpose. People should be
diff --git a/src/libbasic/include/basic/lockfile-util.h b/src/libbasic/include/basic/lockfile-util.h
index e344e1f8f1..22491ee8e1 100644
--- a/src/libbasic/include/basic/lockfile-util.h
+++ b/src/libbasic/include/basic/lockfile-util.h
@@ -21,8 +21,8 @@
#include <stddef.h>
-#include "basic/macro.h"
-#include "basic/missing.h"
+#include "macro.h"
+#include "missing.h"
typedef struct LockFile {
char *path;
diff --git a/src/libbasic/include/basic/log.h b/src/libbasic/include/basic/log.h
index 6ddbac1436..d2a22b5829 100644
--- a/src/libbasic/include/basic/log.h
+++ b/src/libbasic/include/basic/log.h
@@ -29,7 +29,7 @@
#include <systemd/sd-id128.h>
-#include "basic/macro.h"
+#include "macro.h"
typedef enum LogTarget{
LOG_TARGET_CONSOLE,
diff --git a/src/libbasic/include/basic/macro.h b/src/libbasic/include/basic/macro.h
index e83d2f77d2..e41aa4260f 100644
--- a/src/libbasic/include/basic/macro.h
+++ b/src/libbasic/include/basic/macro.h
@@ -403,4 +403,4 @@ static inline unsigned long ALIGN_POWER2(unsigned long u) {
} \
struct __useless_struct_to_allow_trailing_semicolon__
-#include "basic/log.h"
+#include "log.h"
diff --git a/src/libbasic/include/basic/missing.h b/src/libbasic/include/basic/missing.h
index 13c9b89080..168d8cdb0a 100644
--- a/src/libbasic/include/basic/missing.h
+++ b/src/libbasic/include/basic/missing.h
@@ -23,6 +23,13 @@
#include <errno.h>
#include <fcntl.h>
+#include <net/ethernet.h>
+#include <stdlib.h>
+#include <sys/resource.h>
+#include <sys/syscall.h>
+#include <uchar.h>
+#include <unistd.h>
+
#include <linux/audit.h>
#include <linux/capability.h>
#include <linux/if_link.h>
@@ -31,12 +38,6 @@
#include <linux/neighbour.h>
#include <linux/oom.h>
#include <linux/rtnetlink.h>
-#include <net/ethernet.h>
-#include <stdlib.h>
-#include <sys/resource.h>
-#include <sys/syscall.h>
-#include <uchar.h>
-#include <unistd.h>
#ifdef HAVE_AUDIT
#include <libaudit.h>
@@ -50,7 +51,7 @@
#include <linux/btrfs.h>
#endif
-#include "basic/macro.h"
+#include "macro.h"
#ifndef RLIMIT_RTTIME
#define RLIMIT_RTTIME 15
@@ -1013,4 +1014,4 @@ typedef int32_t key_serial_t;
#endif
-#include "basic/missing_syscall.h"
+#include "missing_syscall.h"
diff --git a/src/libbasic/include/basic/mount-util.h b/src/libbasic/include/basic/mount-util.h
index bb5b37d9a1..bdb525d6b0 100644
--- a/src/libbasic/include/basic/mount-util.h
+++ b/src/libbasic/include/basic/mount-util.h
@@ -26,8 +26,8 @@
#include <sys/stat.h>
#include <sys/types.h>
-#include "basic/macro.h"
-#include "basic/missing.h"
+#include "macro.h"
+#include "missing.h"
int fd_is_mount_point(int fd, const char *filename, int flags);
int path_is_mount_point(const char *path, int flags);
diff --git a/src/libbasic/include/basic/ordered-set.h b/src/libbasic/include/basic/ordered-set.h
index 2823c17dda..e1dfc86380 100644
--- a/src/libbasic/include/basic/ordered-set.h
+++ b/src/libbasic/include/basic/ordered-set.h
@@ -19,7 +19,7 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
-#include "basic/hashmap.h"
+#include "hashmap.h"
typedef struct OrderedSet OrderedSet;
diff --git a/src/libbasic/include/basic/parse-util.h b/src/libbasic/include/basic/parse-util.h
index 7132c958ef..7dc579a159 100644
--- a/src/libbasic/include/basic/parse-util.h
+++ b/src/libbasic/include/basic/parse-util.h
@@ -25,7 +25,7 @@
#include <stdint.h>
#include <sys/types.h>
-#include "basic/macro.h"
+#include "macro.h"
#define MODE_INVALID ((mode_t) -1)
diff --git a/src/libbasic/include/basic/path-util.h b/src/libbasic/include/basic/path-util.h
index cd787fae59..a27c13fcc3 100644
--- a/src/libbasic/include/basic/path-util.h
+++ b/src/libbasic/include/basic/path-util.h
@@ -23,8 +23,8 @@
#include <stdbool.h>
#include <stddef.h>
-#include "basic/macro.h"
-#include "basic/time-util.h"
+#include "macro.h"
+#include "time-util.h"
#define DEFAULT_PATH_NORMAL "/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin"
#define DEFAULT_PATH_SPLIT_USR DEFAULT_PATH_NORMAL ":/sbin:/bin"
diff --git a/src/libbasic/include/basic/prioq.h b/src/libbasic/include/basic/prioq.h
index 25dc1a253d..113c73d040 100644
--- a/src/libbasic/include/basic/prioq.h
+++ b/src/libbasic/include/basic/prioq.h
@@ -21,8 +21,8 @@
#include <stdbool.h>
-#include "basic/hashmap.h"
-#include "basic/macro.h"
+#include "hashmap.h"
+#include "macro.h"
typedef struct Prioq Prioq;
diff --git a/src/libbasic/include/basic/process-util.h b/src/libbasic/include/basic/process-util.h
index 4fa45a97e3..9f75088796 100644
--- a/src/libbasic/include/basic/process-util.h
+++ b/src/libbasic/include/basic/process-util.h
@@ -27,8 +27,8 @@
#include <string.h>
#include <sys/types.h>
-#include "basic/formats-util.h"
-#include "basic/macro.h"
+#include "formats-util.h"
+#include "macro.h"
#define procfs_file_alloca(pid, field) \
({ \
diff --git a/src/libbasic/include/basic/ratelimit.h b/src/libbasic/include/basic/ratelimit.h
index f54209c534..9c8dddf5ad 100644
--- a/src/libbasic/include/basic/ratelimit.h
+++ b/src/libbasic/include/basic/ratelimit.h
@@ -21,8 +21,8 @@
#include <stdbool.h>
-#include "basic/time-util.h"
-#include "basic/util.h"
+#include "time-util.h"
+#include "util.h"
typedef struct RateLimit {
usec_t interval;
diff --git a/src/libbasic/include/basic/rlimit-util.h b/src/libbasic/include/basic/rlimit-util.h
index d9a6a4e902..d4594eccd6 100644
--- a/src/libbasic/include/basic/rlimit-util.h
+++ b/src/libbasic/include/basic/rlimit-util.h
@@ -21,7 +21,7 @@
#include <sys/resource.h>
-#include "basic/macro.h"
+#include "macro.h"
const char *rlimit_to_string(int i) _const_;
int rlimit_from_string(const char *s) _pure_;
diff --git a/src/libbasic/include/basic/selinux-util.h b/src/libbasic/include/basic/selinux-util.h
index a619d0322a..ce6bc8e44c 100644
--- a/src/libbasic/include/basic/selinux-util.h
+++ b/src/libbasic/include/basic/selinux-util.h
@@ -23,7 +23,7 @@
#include <sys/socket.h>
#include <sys/types.h>
-#include "basic/macro.h"
+#include "macro.h"
bool mac_selinux_use(void);
bool mac_selinux_have(void);
diff --git a/src/libbasic/include/basic/set.h b/src/libbasic/include/basic/set.h
index 4e74e9108b..e0d9dd001c 100644
--- a/src/libbasic/include/basic/set.h
+++ b/src/libbasic/include/basic/set.h
@@ -19,8 +19,8 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
-#include "basic/hashmap.h"
-#include "basic/macro.h"
+#include "hashmap.h"
+#include "macro.h"
Set *internal_set_new(const struct hash_ops *hash_ops HASHMAP_DEBUG_PARAMS);
#define set_new(ops) internal_set_new(ops HASHMAP_DEBUG_SRC_ARGS)
diff --git a/src/libbasic/include/basic/signal-util.h b/src/libbasic/include/basic/signal-util.h
index bfc1be809a..dfd6eb564d 100644
--- a/src/libbasic/include/basic/signal-util.h
+++ b/src/libbasic/include/basic/signal-util.h
@@ -21,7 +21,7 @@
#include <signal.h>
-#include "basic/macro.h"
+#include "macro.h"
int reset_all_signal_handlers(void);
int reset_signal_mask(void);
diff --git a/src/libbasic/include/basic/smack-util.h b/src/libbasic/include/basic/smack-util.h
index 9ff19b30b3..f90ba0a027 100644
--- a/src/libbasic/include/basic/smack-util.h
+++ b/src/libbasic/include/basic/smack-util.h
@@ -24,7 +24,7 @@
#include <stdbool.h>
#include <sys/types.h>
-#include "basic/macro.h"
+#include "macro.h"
#define SMACK_FLOOR_LABEL "_"
#define SMACK_STAR_LABEL "*"
diff --git a/src/libbasic/include/basic/socket-util.h b/src/libbasic/include/basic/socket-util.h
index 199e026198..2b717a91d4 100644
--- a/src/libbasic/include/basic/socket-util.h
+++ b/src/libbasic/include/basic/socket-util.h
@@ -19,8 +19,6 @@
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>
@@ -29,8 +27,11 @@
#include <sys/types.h>
#include <sys/un.h>
-#include "basic/macro.h"
-#include "basic/util.h"
+#include <linux/if_packet.h>
+#include <linux/netlink.h>
+
+#include "macro.h"
+#include "util.h"
union sockaddr_union {
struct sockaddr sa;
diff --git a/src/libbasic/include/basic/stat-util.h b/src/libbasic/include/basic/stat-util.h
index 8c0cd0c97c..56d28f791e 100644
--- a/src/libbasic/include/basic/stat-util.h
+++ b/src/libbasic/include/basic/stat-util.h
@@ -26,7 +26,7 @@
#include <sys/types.h>
#include <sys/vfs.h>
-#include "basic/macro.h"
+#include "macro.h"
int is_symlink(const char *path);
int is_dir(const char *path, bool follow);
diff --git a/src/libbasic/include/basic/stdio-util.h b/src/libbasic/include/basic/stdio-util.h
index 414a278d0f..bd1144b4c9 100644
--- a/src/libbasic/include/basic/stdio-util.h
+++ b/src/libbasic/include/basic/stdio-util.h
@@ -24,7 +24,7 @@
#include <stdio.h>
#include <sys/types.h>
-#include "basic/macro.h"
+#include "macro.h"
#define xsprintf(buf, fmt, ...) \
assert_message_se((size_t) snprintf(buf, ELEMENTSOF(buf), fmt, __VA_ARGS__) < ELEMENTSOF(buf), "xsprintf: " #buf "[] must be big enough")
diff --git a/src/libbasic/include/basic/string-table.h b/src/libbasic/include/basic/string-table.h
index cf9345c80a..d88625fca7 100644
--- a/src/libbasic/include/basic/string-table.h
+++ b/src/libbasic/include/basic/string-table.h
@@ -26,9 +26,9 @@
#include <string.h>
#include <sys/types.h>
-#include "basic/macro.h"
-#include "basic/parse-util.h"
-#include "basic/string-util.h"
+#include "macro.h"
+#include "parse-util.h"
+#include "string-util.h"
ssize_t string_table_lookup(const char * const *table, size_t len, const char *key);
diff --git a/src/libbasic/include/basic/string-util.h b/src/libbasic/include/basic/string-util.h
index e0ff88b7fb..139cc8c91b 100644
--- a/src/libbasic/include/basic/string-util.h
+++ b/src/libbasic/include/basic/string-util.h
@@ -24,7 +24,7 @@
#include <stddef.h>
#include <string.h>
-#include "basic/macro.h"
+#include "macro.h"
/* What is interpreted as whitespace? */
#define WHITESPACE " \t\n\r"
diff --git a/src/libbasic/include/basic/strv.h b/src/libbasic/include/basic/strv.h
index 20773223ad..f61bbb5386 100644
--- a/src/libbasic/include/basic/strv.h
+++ b/src/libbasic/include/basic/strv.h
@@ -24,10 +24,10 @@
#include <stdbool.h>
#include <stddef.h>
-#include "basic/alloc-util.h"
-#include "basic/extract-word.h"
-#include "basic/macro.h"
-#include "basic/util.h"
+#include "alloc-util.h"
+#include "extract-word.h"
+#include "macro.h"
+#include "util.h"
char *strv_find(char **l, const char *name) _pure_;
char *strv_find_prefix(char **l, const char *name) _pure_;
diff --git a/src/libbasic/include/basic/strxcpyx.h b/src/libbasic/include/basic/strxcpyx.h
index 7e9a5399d4..80ff58726b 100644
--- a/src/libbasic/include/basic/strxcpyx.h
+++ b/src/libbasic/include/basic/strxcpyx.h
@@ -22,7 +22,7 @@
#include <stddef.h>
-#include "basic/macro.h"
+#include "macro.h"
size_t strpcpy(char **dest, size_t size, const char *src);
size_t strpcpyf(char **dest, size_t size, const char *src, ...) _printf_(3, 4);
diff --git a/src/libbasic/include/basic/terminal-util.h b/src/libbasic/include/basic/terminal-util.h
index 51f6fd16bc..a7c96a77cb 100644
--- a/src/libbasic/include/basic/terminal-util.h
+++ b/src/libbasic/include/basic/terminal-util.h
@@ -24,8 +24,8 @@
#include <stdio.h>
#include <sys/types.h>
-#include "basic/macro.h"
-#include "basic/time-util.h"
+#include "macro.h"
+#include "time-util.h"
#define ANSI_RED "\x1B[0;31m"
#define ANSI_GREEN "\x1B[0;32m"
diff --git a/src/libbasic/include/basic/time-util.h b/src/libbasic/include/basic/time-util.h
index 325266ec7e..a5e3f567ec 100644
--- a/src/libbasic/include/basic/time-util.h
+++ b/src/libbasic/include/basic/time-util.h
@@ -32,7 +32,7 @@ typedef uint64_t nsec_t;
#define NSEC_FMT "%" PRIu64
#define USEC_FMT "%" PRIu64
-#include "basic/macro.h"
+#include "macro.h"
typedef struct dual_timestamp {
usec_t realtime;
diff --git a/src/libbasic/include/basic/umask-util.h b/src/libbasic/include/basic/umask-util.h
index d6a9835021..359d87d27c 100644
--- a/src/libbasic/include/basic/umask-util.h
+++ b/src/libbasic/include/basic/umask-util.h
@@ -23,7 +23,7 @@
#include <sys/stat.h>
#include <sys/types.h>
-#include "basic/macro.h"
+#include "macro.h"
static inline void umaskp(mode_t *u) {
umask(*u);
diff --git a/src/libbasic/include/basic/unit-name.h b/src/libbasic/include/basic/unit-name.h
index c31e474cb7..f209a84634 100644
--- a/src/libbasic/include/basic/unit-name.h
+++ b/src/libbasic/include/basic/unit-name.h
@@ -21,7 +21,7 @@
#include <stdbool.h>
-#include "basic/macro.h"
+#include "macro.h"
#define UNIT_NAME_MAX 256
diff --git a/src/libbasic/include/basic/utf8.h b/src/libbasic/include/basic/utf8.h
index f6fdb6eff7..f9b9c9468b 100644
--- a/src/libbasic/include/basic/utf8.h
+++ b/src/libbasic/include/basic/utf8.h
@@ -24,8 +24,8 @@
#include <stdint.h>
#include <uchar.h>
-#include "basic/macro.h"
-#include "basic/missing.h"
+#include "macro.h"
+#include "missing.h"
#define UTF8_REPLACEMENT_CHARACTER "\xef\xbf\xbd"
#define UTF8_BYTE_ORDER_MARK "\xef\xbb\xbf"
diff --git a/src/libbasic/include/basic/util.h b/src/libbasic/include/basic/util.h
index 18d7eb2250..1c032c15c9 100644
--- a/src/libbasic/include/basic/util.h
+++ b/src/libbasic/include/basic/util.h
@@ -41,10 +41,10 @@
#include <time.h>
#include <unistd.h>
-#include "basic/formats-util.h"
-#include "basic/macro.h"
-#include "basic/missing.h"
-#include "basic/time-util.h"
+#include "formats-util.h"
+#include "macro.h"
+#include "missing.h"
+#include "time-util.h"
size_t page_size(void) _pure_;
#define PAGE_ALIGN(l) ALIGN_TO((l), page_size())
diff --git a/src/libbasic/include/basic/virt.h b/src/libbasic/include/basic/virt.h
index b0e30e26f8..a538f07f6b 100644
--- a/src/libbasic/include/basic/virt.h
+++ b/src/libbasic/include/basic/virt.h
@@ -21,7 +21,7 @@
#include <stdbool.h>
-#include "basic/macro.h"
+#include "macro.h"
enum {
VIRTUALIZATION_NONE = 0,
diff --git a/src/libbasic/include/basic/web-util.h b/src/libbasic/include/basic/web-util.h
index 941940e0bc..e6bb6b53f5 100644
--- a/src/libbasic/include/basic/web-util.h
+++ b/src/libbasic/include/basic/web-util.h
@@ -21,7 +21,7 @@
#include <stdbool.h>
-#include "basic/macro.h"
+#include "macro.h"
bool http_url_is_valid(const char *url) _pure_;
diff --git a/src/libbasic/include/basic/xattr-util.h b/src/libbasic/include/basic/xattr-util.h
index 9990b05af8..6fa097bf7e 100644
--- a/src/libbasic/include/basic/xattr-util.h
+++ b/src/libbasic/include/basic/xattr-util.h
@@ -23,7 +23,7 @@
#include <stddef.h>
#include <sys/types.h>
-#include "basic/time-util.h"
+#include "time-util.h"
int getxattr_malloc(const char *path, const char *name, char **value, bool allow_symlink);
int fgetxattr_malloc(int fd, const char *name, char **value);
diff --git a/src/libbasic/src/audit-util.c b/src/libbasic/src/audit-util.c
index b27eff74c0..0cd8543374 100644
--- a/src/libbasic/src/audit-util.c
+++ b/src/libbasic/src/audit-util.c
@@ -18,10 +18,11 @@
***/
#include <errno.h>
-#include <linux/netlink.h>
#include <stdio.h>
#include <sys/socket.h>
+#include <linux/netlink.h>
+
#include "basic/alloc-util.h"
#include "basic/audit-util.h"
#include "basic/fd-util.h"
diff --git a/src/libbasic/src/btrfs-util.c b/src/libbasic/src/btrfs-util.c
index 1bcac6d314..acbcb5f6b9 100644
--- a/src/libbasic/src/btrfs-util.c
+++ b/src/libbasic/src/btrfs-util.c
@@ -20,7 +20,6 @@
#include <errno.h>
#include <fcntl.h>
#include <inttypes.h>
-#include <linux/loop.h>
#include <stddef.h>
#include <stdio.h>
#include <stdlib.h>
@@ -31,6 +30,8 @@
#include <sys/sysmacros.h>
#include <unistd.h>
+#include <linux/loop.h>
+
#ifdef HAVE_LINUX_BTRFS_H
#include <linux/btrfs.h>
#endif
diff --git a/src/libbasic/src/chattr-util.c b/src/libbasic/src/chattr-util.c
index ab6d8706de..4d349431c8 100644
--- a/src/libbasic/src/chattr-util.c
+++ b/src/libbasic/src/chattr-util.c
@@ -19,10 +19,11 @@
#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"
#include "basic/macro.h"
diff --git a/src/libbasic/src/clock-util.c b/src/libbasic/src/clock-util.c
index 50c3738414..b1d0d2e432 100644
--- a/src/libbasic/src/clock-util.c
+++ b/src/libbasic/src/clock-util.c
@@ -20,13 +20,14 @@
#include <errno.h>
#include <fcntl.h>
#include <limits.h>
-#include <linux/rtc.h>
#include <stdbool.h>
#include <stdio.h>
#include <sys/ioctl.h>
#include <sys/time.h>
#include <time.h>
+#include <linux/rtc.h>
+
#include "basic/clock-util.h"
#include "basic/fd-util.h"
#include "basic/macro.h"
diff --git a/src/libbasic/src/process-util.c b/src/libbasic/src/process-util.c
index 44ac8794dc..fcda02b7a9 100644
--- a/src/libbasic/src/process-util.c
+++ b/src/libbasic/src/process-util.c
@@ -20,7 +20,6 @@
#include <ctype.h>
#include <errno.h>
#include <limits.h>
-#include <linux/oom.h>
#include <sched.h>
#include <signal.h>
#include <stdbool.h>
@@ -33,6 +32,8 @@
#include <sys/wait.h>
#include <syslog.h>
#include <unistd.h>
+
+#include <linux/oom.h>
#ifdef HAVE_VALGRIND_VALGRIND_H
#include <valgrind/valgrind.h>
#endif
diff --git a/src/libbasic/src/random-util.c b/src/libbasic/src/random-util.c
index 6f1b1adead..f5b7e54a68 100644
--- a/src/libbasic/src/random-util.c
+++ b/src/libbasic/src/random-util.c
@@ -20,12 +20,13 @@
#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>
+
#ifdef HAVE_SYS_AUXV_H
#include <sys/auxv.h>
#endif
diff --git a/src/libbasic/src/stat-util.c b/src/libbasic/src/stat-util.c
index 83edbd3ecc..9ddede98c9 100644
--- a/src/libbasic/src/stat-util.c
+++ b/src/libbasic/src/stat-util.c
@@ -20,12 +20,13 @@
#include <dirent.h>
#include <errno.h>
#include <fcntl.h>
-#include <linux/magic.h>
#include <sys/stat.h>
#include <sys/statvfs.h>
#include <sys/types.h>
#include <unistd.h>
+#include <linux/magic.h>
+
#include "basic/dirent-util.h"
#include "basic/fd-util.h"
#include "basic/macro.h"
diff --git a/src/libbasic/src/terminal-util.c b/src/libbasic/src/terminal-util.c
index ce750abb08..45b7864a2f 100644
--- a/src/libbasic/src/terminal-util.c
+++ b/src/libbasic/src/terminal-util.c
@@ -20,9 +20,6 @@
#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>
@@ -38,6 +35,10 @@
#include <termios.h>
#include <unistd.h>
+#include <linux/kd.h>
+#include <linux/tiocl.h>
+#include <linux/vt.h>
+
#include "basic/alloc-util.h"
#include "basic/fd-util.h"
#include "basic/fileio.h"
diff --git a/src/libshared/include/shared/bus-unit-util.h b/src/libshared/include/shared/bus-unit-util.h
index 5e5b33ded1..b4b68cc5d2 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/install.h"
-#include "shared/output-mode.h"
+#include "install.h"
+#include "output-mode.h"
typedef struct UnitInfo {
const char *machine;
diff --git a/src/libshared/include/shared/cgroup-show.h b/src/libshared/include/shared/cgroup-show.h
index 7deb42fff7..5c1d6e6d98 100644
--- a/src/libshared/include/shared/cgroup-show.h
+++ b/src/libshared/include/shared/cgroup-show.h
@@ -22,8 +22,8 @@
#include <stdbool.h>
#include <sys/types.h>
-#include "shared/logs-show.h"
-#include "shared/output-mode.h"
+#include "logs-show.h"
+#include "output-mode.h"
int show_cgroup_by_path(const char *path, const char *prefix, unsigned columns, OutputFlags flags);
int show_cgroup(const char *controller, const char *path, const char *prefix, unsigned columns, OutputFlags flags);
diff --git a/src/libshared/include/shared/install-printf.h b/src/libshared/include/shared/install-printf.h
index 56099f464d..8a570fc265 100644
--- a/src/libshared/include/shared/install-printf.h
+++ b/src/libshared/include/shared/install-printf.h
@@ -19,6 +19,6 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
-#include "shared/install.h"
+#include "install.h"
int install_full_printf(UnitFileInstallInfo *i, const char *format, char **ret);
diff --git a/src/libshared/include/shared/install.h b/src/libshared/include/shared/install.h
index bf1f6f25c8..d73dfef4ec 100644
--- a/src/libshared/include/shared/install.h
+++ b/src/libshared/include/shared/install.h
@@ -24,17 +24,18 @@ typedef enum UnitFileState UnitFileState;
typedef enum UnitFilePresetMode UnitFilePresetMode;
typedef enum UnitFileChangeType UnitFileChangeType;
typedef enum UnitFileType UnitFileType;
-typedef struct UnitFileChange UnitFileChange;
-typedef struct UnitFileList UnitFileList;
-typedef struct UnitFileInstallInfo UnitFileInstallInfo;
-
#include <stdbool.h>
#include "basic/hashmap.h"
#include "basic/macro.h"
#include "basic/strv.h"
#include "basic/unit-name.h"
-#include "shared/path-lookup.h"
+
+typedef struct UnitFileChange UnitFileChange;
+typedef struct UnitFileInstallInfo UnitFileInstallInfo;
+typedef struct UnitFileList UnitFileList;
+
+#include "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 14f955dfb4..f16cb64838 100644
--- a/src/libshared/include/shared/logs-show.h
+++ b/src/libshared/include/shared/logs-show.h
@@ -29,7 +29,8 @@
#include "basic/macro.h"
#include "basic/time-util.h"
#include "basic/util.h"
-#include "shared/output-mode.h"
+
+#include "output-mode.h"
int output_journal(
FILE *f,
diff --git a/src/libshared/include/shared/path-lookup.h b/src/libshared/include/shared/path-lookup.h
index c3e0a10552..ab14bdc267 100644
--- a/src/libshared/include/shared/path-lookup.h
+++ b/src/libshared/include/shared/path-lookup.h
@@ -21,10 +21,11 @@
#include <stdbool.h>
+#include "basic/macro.h"
+
typedef struct LookupPaths LookupPaths;
-#include "shared/install.h"
-#include "basic/macro.h"
+#include "install.h"
typedef enum LookupPathsFlags {
LOOKUP_PATHS_EXCLUDE_GENERATED = 1,
diff --git a/src/libshared/src/gcrypt-util.c b/src/libshared/src/gcrypt-util.c
index 35e380d3d0..069134a4be 100644
--- a/src/libshared/src/gcrypt-util.c
+++ b/src/libshared/src/gcrypt-util.c
@@ -23,7 +23,7 @@
#include <gcrypt.h>
#include "basic/hexdecoct.h"
-#include "gcrypt-util.h"
+#include "shared/gcrypt-util.h"
void initialize_libgcrypt(bool secmem) {
const char *p;
diff --git a/src/libshared/src/machine-image.c b/src/libshared/src/machine-image.c
index c7b0a33ce5..28b096f538 100644
--- a/src/libshared/src/machine-image.c
+++ b/src/libshared/src/machine-image.c
@@ -20,7 +20,6 @@
#include <dirent.h>
#include <errno.h>
#include <fcntl.h>
-#include <linux/fs.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
@@ -28,6 +27,8 @@
#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"
diff --git a/src/libshared/src/machine-pool.c b/src/libshared/src/machine-pool.c
index ee8c0a9ba1..176bc24890 100644
--- a/src/libshared/src/machine-pool.c
+++ b/src/libshared/src/machine-pool.c
@@ -19,7 +19,6 @@
#include <errno.h>
#include <fcntl.h>
-#include <linux/loop.h>
#include <signal.h>
#include <stdbool.h>
#include <stdio.h>
@@ -33,6 +32,8 @@
#include <sys/statvfs.h>
#include <unistd.h>
+#include <linux/loop.h>
+
#include <systemd/sd-bus-protocol.h>
#include <systemd/sd-bus.h>
diff --git a/src/libshared/src/watchdog.c b/src/libshared/src/watchdog.c
index 49577669f4..c4e58c9577 100644
--- a/src/libshared/src/watchdog.c
+++ b/src/libshared/src/watchdog.c
@@ -19,11 +19,12 @@
#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"
#include "basic/time-util.h"
diff --git a/src/libsystemd-network/include/systemd-network/dhcp-internal.h b/src/libsystemd-network/include/systemd-network/dhcp-internal.h
index 0fb012e240..63c85b853c 100644
--- a/src/libsystemd-network/include/systemd-network/dhcp-internal.h
+++ b/src/libsystemd-network/include/systemd-network/dhcp-internal.h
@@ -20,14 +20,16 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
-#include <linux/if_packet.h>
#include <net/ethernet.h>
#include <net/if_arp.h>
#include <stdint.h>
+#include <linux/if_packet.h>
+
#include "basic/socket-util.h"
-#include "systemd-network/dhcp-protocol.h"
-#include "systemd-network/sd-dhcp-client.h"
+
+#include "dhcp-protocol.h"
+#include "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 d4108c1095..af66781ac7 100644
--- a/src/libsystemd-network/include/systemd-network/dhcp-lease-internal.h
+++ b/src/libsystemd-network/include/systemd-network/dhcp-lease-internal.h
@@ -20,13 +20,15 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
-#include <linux/if_packet.h>
#include <stdint.h>
+#include <linux/if_packet.h>
+
#include "basic/list.h"
#include "basic/util.h"
-#include "systemd-network/dhcp-protocol.h"
-#include "systemd-network/sd-dhcp-client.h"
+
+#include "dhcp-protocol.h"
+#include "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 53b46a8514..45f5946e59 100644
--- a/src/libsystemd-network/include/systemd-network/dhcp-server-internal.h
+++ b/src/libsystemd-network/include/systemd-network/dhcp-server-internal.h
@@ -25,8 +25,9 @@
#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"
+
+#include "dhcp-internal.h"
+#include "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 3f51830c94..9da270e9a9 100644
--- a/src/libsystemd-network/include/systemd-network/dhcp6-lease-internal.h
+++ b/src/libsystemd-network/include/systemd-network/dhcp6-lease-internal.h
@@ -22,8 +22,8 @@
#include <stdint.h>
-#include "systemd-network/dhcp6-internal.h"
-#include "systemd-network/sd-dhcp6-lease.h"
+#include "dhcp6-internal.h"
+#include "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 a79031b40d..f657a1d0af 100644
--- a/src/libsystemd-network/include/systemd-network/lldp-internal.h
+++ b/src/libsystemd-network/include/systemd-network/lldp-internal.h
@@ -25,7 +25,8 @@
#include "basic/hashmap.h"
#include "basic/log.h"
#include "basic/prioq.h"
-#include "systemd-network/sd-lldp.h"
+
+#include "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 cbd9470be0..b5944164fc 100644
--- a/src/libsystemd-network/include/systemd-network/lldp-neighbor.h
+++ b/src/libsystemd-network/include/systemd-network/lldp-neighbor.h
@@ -25,8 +25,9 @@
#include "basic/hash-funcs.h"
#include "basic/time-util.h"
-#include "systemd-network/lldp-internal.h"
-#include "systemd-network/sd-lldp.h"
+
+#include "lldp-internal.h"
+#include "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 4f98e84c80..a5cf8e4f1c 100644
--- a/src/libsystemd-network/include/systemd-network/network-internal.h
+++ b/src/libsystemd-network/include/systemd-network/network-internal.h
@@ -22,9 +22,10 @@
#include <stdbool.h>
#include "shared/condition.h"
-#include "systemd-network/sd-dhcp-lease.h"
#include "udev.h"
+#include "sd-dhcp-lease.h"
+
bool net_match_config(const struct ether_addr *match_mac,
char * const *match_path,
char * const *match_driver,
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 375acd5ea7..4704c6b440 100644
--- a/src/libsystemd-network/include/systemd-network/sd-dhcp-client.h
+++ b/src/libsystemd-network/include/systemd-network/sd-dhcp-client.h
@@ -27,9 +27,8 @@
#include <systemd/sd-event.h>
-#include "systemd-network/sd-dhcp-lease.h"
-
#include "_sd-common.h"
+#include "sd-dhcp-lease.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 7111ca1274..16947079bb 100644
--- a/src/libsystemd-network/include/systemd-network/sd-dhcp6-client.h
+++ b/src/libsystemd-network/include/systemd-network/sd-dhcp6-client.h
@@ -26,9 +26,8 @@
#include <systemd/sd-event.h>
-#include "systemd-network/sd-dhcp6-lease.h"
-
#include "_sd-common.h"
+#include "sd-dhcp6-lease.h"
_SD_BEGIN_DECLARATIONS;
diff --git a/src/libsystemd-network/src/arp-util.c b/src/libsystemd-network/src/arp-util.c
index 15867c24a3..1299269672 100644
--- a/src/libsystemd-network/src/arp-util.c
+++ b/src/libsystemd-network/src/arp-util.c
@@ -19,6 +19,7 @@
***/
#include <arpa/inet.h>
+
#include <linux/filter.h>
#include "basic/fd-util.h"
diff --git a/src/libsystemd-network/src/dhcp-network.c b/src/libsystemd-network/src/dhcp-network.c
index d5fa3ebf2d..242d61a05c 100644
--- a/src/libsystemd-network/src/dhcp-network.c
+++ b/src/libsystemd-network/src/dhcp-network.c
@@ -18,15 +18,16 @@
***/
#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 "basic/fd-util.h"
#include "basic/socket-util.h"
#include "systemd-network/dhcp-internal.h"
diff --git a/src/libsystemd-network/src/dhcp6-network.c b/src/libsystemd-network/src/dhcp6-network.c
index 0222b03a75..0f7c281ad3 100644
--- a/src/libsystemd-network/src/dhcp6-network.c
+++ b/src/libsystemd-network/src/dhcp6-network.c
@@ -18,7 +18,6 @@
***/
#include <errno.h>
-#include <linux/if_packet.h>
#include <netinet/in.h>
#include <netinet/ip6.h>
#include <stdio.h>
@@ -27,6 +26,8 @@
#include <sys/types.h>
#include <unistd.h>
+#include <linux/if_packet.h>
+
#include "basic/fd-util.h"
#include "basic/socket-util.h"
#include "systemd-network/dhcp6-internal.h"
diff --git a/src/libsystemd-network/src/icmp6-util.c b/src/libsystemd-network/src/icmp6-util.c
index cdca20efa5..0e78e58444 100644
--- a/src/libsystemd-network/src/icmp6-util.c
+++ b/src/libsystemd-network/src/icmp6-util.c
@@ -18,7 +18,6 @@
***/
#include <errno.h>
-#include <linux/if_packet.h>
#include <netinet/icmp6.h>
#include <netinet/in.h>
#include <netinet/ip6.h>
@@ -28,6 +27,8 @@
#include <sys/types.h>
#include <unistd.h>
+#include <linux/if_packet.h>
+
#include "basic/fd-util.h"
#include "basic/socket-util.h"
#include "systemd-network/icmp6-util.h"
diff --git a/src/libsystemd-network/src/lldp-network.c b/src/libsystemd-network/src/lldp-network.c
index 7e7281d53b..6a525e7089 100644
--- a/src/libsystemd-network/src/lldp-network.c
+++ b/src/libsystemd-network/src/lldp-network.c
@@ -18,9 +18,10 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
-#include <linux/filter.h>
#include <netinet/if_ether.h>
+#include <linux/filter.h>
+
#include "basic/fd-util.h"
#include "basic/socket-util.h"
#include "systemd-network/lldp-network.h"
diff --git a/src/libsystemd-network/src/network-internal.c b/src/libsystemd-network/src/network-internal.c
index 87feb094c6..53a2202068 100644
--- a/src/libsystemd-network/src/network-internal.c
+++ b/src/libsystemd-network/src/network-internal.c
@@ -18,9 +18,10 @@
***/
#include <arpa/inet.h>
-#include <linux/if.h>
#include <netinet/ether.h>
+#include <linux/if.h>
+
#include "basic/alloc-util.h"
#include "basic/ether-addr-util.h"
#include "basic/hexdecoct.h"
diff --git a/src/libsystemd-network/src/sd-dhcp-client.c b/src/libsystemd-network/src/sd-dhcp-client.c
index b3ef17961d..5bf04ed028 100644
--- a/src/libsystemd-network/src/sd-dhcp-client.c
+++ b/src/libsystemd-network/src/sd-dhcp-client.c
@@ -18,7 +18,6 @@
***/
#include <errno.h>
-#include <linux/if_infiniband.h>
#include <net/ethernet.h>
#include <net/if_arp.h>
#include <stdio.h>
@@ -26,6 +25,8 @@
#include <string.h>
#include <sys/ioctl.h>
+#include <linux/if_infiniband.h>
+
#include "basic/alloc-util.h"
#include "basic/async.h"
#include "basic/hostname-util.h"
diff --git a/src/libsystemd-network/src/sd-dhcp6-client.c b/src/libsystemd-network/src/sd-dhcp6-client.c
index 1f46946b14..ec652d4625 100644
--- a/src/libsystemd-network/src/sd-dhcp6-client.c
+++ b/src/libsystemd-network/src/sd-dhcp6-client.c
@@ -18,10 +18,11 @@
***/
#include <errno.h>
-#include <linux/if_infiniband.h>
#include <string.h>
#include <sys/ioctl.h>
+#include <linux/if_infiniband.h>
+
#include "basic/alloc-util.h"
#include "basic/fd-util.h"
#include "basic/in-addr-util.h"
diff --git a/src/libsystemd-network/test/test-acd.c b/src/libsystemd-network/test/test-acd.c
index 73f9e04e6f..850c2cb2a4 100644
--- a/src/libsystemd-network/test/test-acd.c
+++ b/src/libsystemd-network/test/test-acd.c
@@ -18,11 +18,12 @@
***/
#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>
#include "basic/in-addr-util.h"
diff --git a/src/libsystemd-network/test/test-ipv4ll-manual.c b/src/libsystemd-network/test/test-ipv4ll-manual.c
index 00b909f021..83c2b46124 100644
--- a/src/libsystemd-network/test/test-ipv4ll-manual.c
+++ b/src/libsystemd-network/test/test-ipv4ll-manual.c
@@ -18,11 +18,12 @@
***/
#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>
#include "basic/alloc-util.h"
diff --git a/src/libsystemd/include/systemd/sd-bus-vtable.h b/src/libsystemd/include/systemd/sd-bus-vtable.h
index 2b684b5678..ca85dec145 100644
--- a/src/libsystemd/include/systemd/sd-bus-vtable.h
+++ b/src/libsystemd/include/systemd/sd-bus-vtable.h
@@ -26,7 +26,7 @@ _SD_BEGIN_DECLARATIONS;
typedef struct sd_bus_vtable sd_bus_vtable;
-#include <systemd/sd-bus.h>
+#include <sd-bus.h>
enum {
_SD_BUS_VTABLE_START = '<',
diff --git a/src/libsystemd/include/systemd/sd-bus.h b/src/libsystemd/include/systemd/sd-bus.h
index 3c1b4b97a4..d97ecc7b9a 100644
--- a/src/libsystemd/include/systemd/sd-bus.h
+++ b/src/libsystemd/include/systemd/sd-bus.h
@@ -25,10 +25,9 @@
#include <sys/types.h>
#include <sys/uio.h>
-#include <systemd/sd-event.h>
-#include <systemd/sd-id128.h>
-
#include "_sd-common.h"
+#include "sd-event.h"
+#include "sd-id128.h"
_SD_BEGIN_DECLARATIONS;
@@ -107,8 +106,8 @@ typedef int (*sd_bus_object_find_t) (sd_bus *bus, const char *path, const char *
typedef int (*sd_bus_node_enumerator_t) (sd_bus *bus, const char *prefix, void *userdata, char ***ret_nodes, sd_bus_error *ret_error);
typedef int (*sd_bus_track_handler_t) (sd_bus_track *track, void *userdata);
-#include <systemd/sd-bus-protocol.h>
-#include <systemd/sd-bus-vtable.h>
+#include <sd-bus-protocol.h>
+#include <sd-bus-vtable.h>
/* Connections */
diff --git a/src/libsystemd/include/systemd/sd-journal.h b/src/libsystemd/include/systemd/sd-journal.h
index 3e61feb81f..b684cf073c 100644
--- a/src/libsystemd/include/systemd/sd-journal.h
+++ b/src/libsystemd/include/systemd/sd-journal.h
@@ -26,9 +26,8 @@
#include <sys/uio.h>
#include <syslog.h>
-#include <systemd/sd-id128.h>
-
#include "_sd-common.h"
+#include "sd-id128.h"
/* Journal APIs. See sd-journal(3) for more information. */
diff --git a/src/libsystemd/include/systemd/sd-messages.h b/src/libsystemd/include/systemd/sd-messages.h
index 1865e0492f..c8599c596d 100644
--- a/src/libsystemd/include/systemd/sd-messages.h
+++ b/src/libsystemd/include/systemd/sd-messages.h
@@ -20,9 +20,8 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
-#include <systemd/sd-id128.h>
-
#include "_sd-common.h"
+#include "sd-id128.h"
_SD_BEGIN_DECLARATIONS;
diff --git a/src/libsystemd/src/sd-bus/bus-creds.c b/src/libsystemd/src/sd-bus/bus-creds.c
index 3a93c59a7b..bc5a82fac4 100644
--- a/src/libsystemd/src/sd-bus/bus-creds.c
+++ b/src/libsystemd/src/sd-bus/bus-creds.c
@@ -17,9 +17,10 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
-#include <linux/capability.h>
#include <stdlib.h>
+#include <linux/capability.h>
+
#include "basic/alloc-util.h"
#include "basic/audit-util.h"
#include "basic/bus-label.h"
diff --git a/src/libsystemd/src/sd-journal/audit-type.c b/src/libsystemd/src/sd-journal/audit-type.c
index d335e0495d..1a10a378b2 100644
--- a/src/libsystemd/src/sd-journal/audit-type.c
+++ b/src/libsystemd/src/sd-journal/audit-type.c
@@ -17,8 +17,9 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
-#include <linux/audit.h>
#include <stdio.h>
+
+#include <linux/audit.h>
#ifdef HAVE_AUDIT
# include <libaudit.h>
#endif
diff --git a/src/libsystemd/src/sd-journal/journal-file.c b/src/libsystemd/src/sd-journal/journal-file.c
index af8a4e436f..d8f4671617 100644
--- a/src/libsystemd/src/sd-journal/journal-file.c
+++ b/src/libsystemd/src/sd-journal/journal-file.c
@@ -19,7 +19,6 @@
#include <errno.h>
#include <fcntl.h>
-#include <linux/fs.h>
#include <pthread.h>
#include <stddef.h>
#include <sys/mman.h>
@@ -27,6 +26,8 @@
#include <sys/uio.h>
#include <unistd.h>
+#include <linux/fs.h>
+
#include <systemd/sd-event.h>
#include "basic/alloc-util.h"
diff --git a/src/libsystemd/src/sd-journal/sd-journal.c b/src/libsystemd/src/sd-journal/sd-journal.c
index ce03f24d4d..18ca37d58f 100644
--- a/src/libsystemd/src/sd-journal/sd-journal.c
+++ b/src/libsystemd/src/sd-journal/sd-journal.c
@@ -20,13 +20,14 @@
#include <errno.h>
#include <fcntl.h>
#include <inttypes.h>
-#include <linux/magic.h>
#include <poll.h>
#include <stddef.h>
#include <sys/inotify.h>
#include <sys/vfs.h>
#include <unistd.h>
+#include <linux/magic.h>
+
#include <systemd/sd-journal.h>
#include "basic/alloc-util.h"
diff --git a/src/libsystemd/src/sd-netlink/netlink-types.c b/src/libsystemd/src/sd-netlink/netlink-types.c
index b4dcee26b7..3bd7777b88 100644
--- a/src/libsystemd/src/sd-netlink/netlink-types.c
+++ b/src/libsystemd/src/sd-netlink/netlink-types.c
@@ -19,6 +19,7 @@
#include <stdint.h>
#include <sys/socket.h>
+
#include <linux/netlink.h>
#include <linux/rtnetlink.h>
#include <linux/in6.h>
diff --git a/src/libsystemd/src/sd-netlink/sd-netlink.h b/src/libsystemd/src/sd-netlink/sd-netlink.h
index 5d30127f8f..1df902d30e 100644
--- a/src/libsystemd/src/sd-netlink/sd-netlink.h
+++ b/src/libsystemd/src/sd-netlink/sd-netlink.h
@@ -21,11 +21,12 @@
***/
#include <inttypes.h>
-#include <linux/neighbour.h>
-#include <linux/rtnetlink.h>
#include <netinet/ether.h>
#include <netinet/in.h>
+#include <linux/neighbour.h>
+#include <linux/rtnetlink.h>
+
#include <systemd/_sd-common.h>
#include <systemd/sd-event.h>
diff --git a/src/libudev/src/libudev-device.c b/src/libudev/src/libudev-device.c
index dc4b0deb83..2cb20aa557 100644
--- a/src/libudev/src/libudev-device.c
+++ b/src/libudev/src/libudev-device.c
@@ -22,7 +22,6 @@
#include <dirent.h>
#include <errno.h>
#include <fcntl.h>
-#include <linux/sockios.h>
#include <net/if.h>
#include <stdbool.h>
#include <stddef.h>
@@ -34,6 +33,8 @@
#include <sys/stat.h>
#include <unistd.h>
+#include <linux/sockios.h>
+
#include <libudev.h>
#include "basic/alloc-util.h"
diff --git a/src/libudev/src/libudev-monitor.c b/src/libudev/src/libudev-monitor.c
index 64a647f945..be8e280336 100644
--- a/src/libudev/src/libudev-monitor.c
+++ b/src/libudev/src/libudev-monitor.c
@@ -18,8 +18,6 @@
***/
#include <errno.h>
-#include <linux/filter.h>
-#include <linux/netlink.h>
#include <poll.h>
#include <stddef.h>
#include <stdio.h>
@@ -28,6 +26,9 @@
#include <sys/socket.h>
#include <unistd.h>
+#include <linux/filter.h>
+#include <linux/netlink.h>
+
#include <libudev.h>
#include "basic/alloc-util.h"
diff --git a/src/systemd-nspawn/nspawn-mount.c b/src/systemd-nspawn/nspawn-mount.c
index bb2906e8d7..d8ca696f21 100644
--- a/src/systemd-nspawn/nspawn-mount.c
+++ b/src/systemd-nspawn/nspawn-mount.c
@@ -17,9 +17,10 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
-#include <linux/magic.h>
#include <sys/mount.h>
+#include <linux/magic.h>
+
#include "basic/alloc-util.h"
#include "basic/cgroup-util.h"
#include "basic/escape.h"
diff --git a/src/systemd-nspawn/nspawn-network.c b/src/systemd-nspawn/nspawn-network.c
index 45caddb75b..1ae0a52f03 100644
--- a/src/systemd-nspawn/nspawn-network.c
+++ b/src/systemd-nspawn/nspawn-network.c
@@ -17,9 +17,10 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
-#include <linux/veth.h>
#include <net/if.h>
+#include <linux/veth.h>
+
#include <libudev.h>
#include <systemd/sd-id128.h>
diff --git a/src/systemd-nspawn/nspawn-patch-uid.c b/src/systemd-nspawn/nspawn-patch-uid.c
index 737ffd246e..2cdb541ebb 100644
--- a/src/systemd-nspawn/nspawn-patch-uid.c
+++ b/src/systemd-nspawn/nspawn-patch-uid.c
@@ -18,6 +18,7 @@
***/
#include <fcntl.h>
+
#include <linux/magic.h>
#ifdef HAVE_ACL
#include <sys/acl.h>
diff --git a/src/systemd-shutdown/shutdown.c b/src/systemd-shutdown/shutdown.c
index f42a910ad4..bf74b5ec99 100644
--- a/src/systemd-shutdown/shutdown.c
+++ b/src/systemd-shutdown/shutdown.c
@@ -19,7 +19,6 @@
#include <errno.h>
#include <getopt.h>
-#include <linux/reboot.h>
#include <signal.h>
#include <stdbool.h>
#include <stdlib.h>
@@ -29,6 +28,8 @@
#include <sys/stat.h>
#include <unistd.h>
+#include <linux/reboot.h>
+
#include "basic/alloc-util.h"
#include "basic/cgroup-util.h"
#include "basic/def.h"
diff --git a/src/systemd-shutdown/umount.c b/src/systemd-shutdown/umount.c
index 3b1b018283..0079f8ec78 100644
--- a/src/systemd-shutdown/umount.c
+++ b/src/systemd-shutdown/umount.c
@@ -19,12 +19,13 @@
#include <errno.h>
#include <fcntl.h>
-#include <linux/dm-ioctl.h>
-#include <linux/loop.h>
#include <string.h>
#include <sys/mount.h>
#include <sys/swap.h>
+#include <linux/dm-ioctl.h>
+#include <linux/loop.h>
+
#include <libudev.h>
#include "basic/alloc-util.h"
diff --git a/src/test/test-netlink-manual.c b/src/test/test-netlink-manual.c
index 6efdd33660..50c960882c 100644
--- a/src/test/test-netlink-manual.c
+++ b/src/test/test-netlink-manual.c
@@ -19,9 +19,10 @@
#include <arpa/inet.h>
#include <libkmod.h>
+#include <net/if.h>
+
#include <linux/if_tunnel.h>
#include <linux/ip.h>
-#include <net/if.h>
#include "basic/macro.h"
#include "basic/util.h"