clang-tidy: Fix all remaining misc-include-cleaner violations

- Remove unused includes
- Add common false positive headers to misc-include-cleaner.IgnoreHeaders
- Add IWYU pragma keep for uncommon false positive headers
This commit is contained in:
Daan De Meyer
2025-11-22 10:19:41 +01:00
parent d11ce97386
commit 87fbd33372
123 changed files with 138 additions and 147 deletions
+21
View File
@@ -6,6 +6,27 @@ Checks: '
readability-duplicate-include,
bugprone-argument-comment
'
CheckOptions:
misc-include-cleaner.MissingIncludes: 'false'
# These all lead to common false positives by clang-tidy where it tries to
# remove these includes even though they're required in some situations (many
# of them related to musl).
misc-include-cleaner.IgnoreHeaders: '
endian\.h;
getopt\.h;
sys/stat\.h;
sys/statvfs\.h;
sys/syscall\.h;
sys/timex\.h;
sys/uio\.h;
netinet/in\.h;
net/if\.h;
net/if_arp\.h;
runtime-scope\.h;
varlink-io\.systemd\..*;
varlink-idl-common\.h;
unistd\.h
'
WarningsAsErrors: '*'
HeaderFileExtensions:
- h
-1
View File
@@ -7,7 +7,6 @@
#include "constants.h"
#include "format-table.h"
#include "hexdecoct.h"
#include "string-util.h"
#include "strv.h"
#include "tpm2-util.h"
+1 -1
View File
@@ -4,7 +4,7 @@
#include <stdlib.h>
#include "basic-forward.h"
#include "memory-util.h"
#include "memory-util.h" /* IWYU pragma: keep */
#if HAS_FEATURE_MEMORY_SANITIZER
# include <sanitizer/msan_interface.h>
+1 -1
View File
@@ -1,7 +1,7 @@
/* SPDX-License-Identifier: LGPL-2.1-or-later */
#pragma once
#include <endian.h> /* IWYU pragma: keep */
#include <endian.h>
#include "basic-forward.h"
+2 -2
View File
@@ -9,9 +9,9 @@
#include "confidential-virt.h"
#include "confidential-virt-fundamental.h"
#include "errno-util.h"
#include "errno-util.h" /* IWYU pragma: keep */
#include "fd-util.h"
#include "fileio.h"
#include "fileio.h" /* IWYU pragma: keep */
#include "log.h"
#include "string-table.h"
#include "string-util.h"
+2 -2
View File
@@ -1,10 +1,10 @@
/* SPDX-License-Identifier: LGPL-2.1-or-later */
#pragma once
#include <dirent.h> /* IWYU pragma: export */
#include <dirent.h> /* IWYU pragma: export */
#include "basic-forward.h"
#include "path-util.h"
#include "path-util.h" /* IWYU pragma: keep */
bool dirent_is_file(const struct dirent *de) _pure_;
bool dirent_is_file_with_suffix(const struct dirent *de, const char *suffix) _pure_;
+2 -2
View File
@@ -1,9 +1,9 @@
/* SPDX-License-Identifier: LGPL-2.1-or-later */
#pragma once
#include "cgroup-util.h"
#include "basic-forward.h"
#include "stdio-util.h"
#include "cgroup-util.h"
#include "stdio-util.h" /* IWYU pragma: keep */
assert_cc(sizeof(pid_t) == sizeof(int32_t));
#define PID_PRI PRIi32
+2 -2
View File
@@ -4,9 +4,9 @@
Copyright © 2016 Michael Karcher
***/
#include <errno.h>
#include <errno.h> /* IWYU pragma: keep */
#include <sched.h>
#include <sys/syscall.h>
#include <sys/syscall.h> /* IWYU pragma: keep */
#include <unistd.h>
#include "process-util.h"
+2 -1
View File
@@ -1,7 +1,8 @@
/* SPDX-License-Identifier: LGPL-2.1-or-later */
#pragma once
#include <stdio.h>
#include "basic-forward.h"
const char* string_table_lookup_to_string(const char * const *table, size_t len, ssize_t i) _const_;
+1 -3
View File
@@ -1,7 +1,6 @@
/* SPDX-License-Identifier: LGPL-2.1-or-later */
#include <stdlib.h>
#include <sys/mman.h>
#include <sys/timerfd.h>
#include <threads.h>
#include <unistd.h>
@@ -10,15 +9,14 @@
#include "env-util.h"
#include "errno-util.h"
#include "extract-word.h"
#include "hexdecoct.h" /* IWYU pragma: keep */
#include "fd-util.h"
#include "fileio.h"
#include "fs-util.h"
#include "hexdecoct.h"
#include "io-util.h"
#include "log.h"
#include "parse-util.h"
#include "path-util.h"
#include "process-util.h"
#include "stat-util.h"
#include "stdio-util.h"
#include "string-table.h"
-2
View File
@@ -1,7 +1,5 @@
/* SPDX-License-Identifier: LGPL-2.1-or-later */
#include <stdio.h>
#include "alloc-util.h"
#include "bus-label.h"
#include "glyph-util.h"
+1 -1
View File
@@ -8,7 +8,7 @@
#include <unistd.h>
#include "alloc-util.h"
#include "dirent-util.h"
#include "dirent-util.h" /* IWYU pragma: keep */
#include "env-util.h"
#include "extract-word.h"
#include "fd-util.h"
+1 -1
View File
@@ -1,7 +1,7 @@
/* SPDX-License-Identifier: LGPL-2.1-or-later */
#include <getopt.h>
#include <sys/socket.h>
#include <sys/socket.h> /* IWYU pragma: keep */
#include "sd-messages.h"
+1 -1
View File
@@ -3,7 +3,7 @@
#include "efi.h"
#include "efi-string.h"
#include "proto/simple-text-io.h"
#include "proto/simple-text-io.h" /* IWYU pragma: keep */
#if defined __has_attribute
# if __has_attribute(no_stack_protector)
+4 -1
View File
@@ -1,9 +1,11 @@
/* SPDX-License-Identifier: LGPL-2.1-or-later */
#include "apparmor-setup.h"
#if HAVE_APPARMOR
#include <unistd.h>
#include "alloc-util.h"
#include "apparmor-setup.h"
#include "apparmor-util.h"
#include "errno-util.h"
#include "fd-util.h"
@@ -11,6 +13,7 @@
#include "log.h"
#include "string-util.h"
#include "strv.h"
#endif
int mac_apparmor_setup(void) {
#if HAVE_APPARMOR
+1 -1
View File
@@ -2,7 +2,7 @@
#include <fcntl.h>
#include <linux/auto_dev-ioctl.h>
#include <sys/mount.h>
#include <sys/mount.h> /* IWYU pragma: keep */
#include <sys/stat.h>
#include <unistd.h>
+2 -2
View File
@@ -7,11 +7,11 @@
* fine given that LGPL-2.1-or-later downgrades to GPL if needed.
*/
#include "bpf-dlopen.h"
#include "bpf-dlopen.h" /* IWYU pragma: keep */
/* libbpf is used via dlopen(), so rename symbols */
#define bpf_object__open_skeleton sym_bpf_object__open_skeleton
#define bpf_object__load_skeleton sym_bpf_object__load_skeleton
#define bpf_object__destroy_skeleton sym_bpf_object__destroy_skeleton
#include "bpf/restrict-fs/restrict-fs.skel.h"
#include "bpf/restrict-fs/restrict-fs.skel.h" /* IWYU pragma: export */
@@ -7,11 +7,11 @@
* fine given that LGPL-2.1-or-later downgrades to GPL if needed.
*/
#include "bpf-dlopen.h"
#include "bpf-dlopen.h" /* IWYU pragma: keep */
/* libbpf is used via dlopen(), so rename symbols */
#define bpf_object__open_skeleton sym_bpf_object__open_skeleton
#define bpf_object__load_skeleton sym_bpf_object__load_skeleton
#define bpf_object__destroy_skeleton sym_bpf_object__destroy_skeleton
#include "bpf/restrict-ifaces/restrict-ifaces.skel.h"
#include "bpf/restrict-ifaces/restrict-ifaces.skel.h" /* IWYU pragma: export */
+2 -2
View File
@@ -7,11 +7,11 @@
* fine given that LGPL-2.1-or-later downgrades to GPL if needed.
*/
#include "bpf-dlopen.h"
#include "bpf-dlopen.h" /* IWYU pragma: keep */
/* libbpf is used via dlopen(), so rename symbols */
#define bpf_object__open_skeleton sym_bpf_object__open_skeleton
#define bpf_object__load_skeleton sym_bpf_object__load_skeleton
#define bpf_object__destroy_skeleton sym_bpf_object__destroy_skeleton
#include "bpf/socket-bind/socket-bind.skel.h"
#include "bpf/socket-bind/socket-bind.skel.h" /* IWYU pragma: export */
-2
View File
@@ -51,10 +51,8 @@
#include "virt.h"
#if BPF_FRAMEWORK
#include "bpf-dlopen.h"
#include "bpf-link.h"
#include "bpf-restrict-fs.h"
#include "bpf/restrict-fs/restrict-fs-skel.h"
#endif
#define CGROUP_CPU_QUOTA_DEFAULT_PERIOD_USEC (100 * USEC_PER_MSEC)
+1 -1
View File
@@ -32,7 +32,7 @@
#include "special.h"
#include "string-util.h"
#include "strv.h"
#include "transaction.h"
#include "transaction.h" /* IWYU pragma: keep */
#include "unit-name.h"
#include "web-util.h"
+1 -1
View File
@@ -1,7 +1,7 @@
/* SPDX-License-Identifier: LGPL-2.1-or-later */
#pragma once
#include "sd-bus.h"
#include "sd-bus.h" /* IWYU pragma: keep */
#include "core-forward.h"
#include "string-util.h"
+1 -1
View File
@@ -22,12 +22,12 @@
#include "ordered-set.h"
#include "path-lookup.h"
#include "path-util.h"
#include "process-util.h"
#include "random-util.h"
#include "recurse-dir.h"
#include "rm-rf.h"
#include "siphash24.h"
#include "stat-util.h"
#include "string-util.h"
#include "strv.h"
#include "user-util.h"
+2 -2
View File
@@ -1,9 +1,9 @@
/* SPDX-License-Identifier: LGPL-2.1-or-later */
#include <grp.h>
#include <linux/sched.h>
#include <linux/securebits.h>
#include <poll.h>
#include <sched.h>
#include <sys/eventfd.h>
#include <sys/ioctl.h>
#include <sys/ioprio.h>
@@ -15,7 +15,7 @@
#include "sd-messages.h"
#include "apparmor-util.h"
#include "apparmor-util.h" /* IWYU pragma: keep */
#include "argv-util.h"
#include "ask-password-api.h"
#include "barrier.h"
-1
View File
@@ -6,7 +6,6 @@
#include "sd-id128.h"
#include "bus-unit-util.h"
#include "cgroup-util.h"
#include "core-forward.h"
#include "cpu-set-util.h"
#include "exec-util.h"
+1 -1
View File
@@ -1,6 +1,6 @@
/* SPDX-License-Identifier: LGPL-2.1-or-later */
#include <linux/audit.h>
#include <linux/audit.h> /* IWYU pragma: keep */
#include <math.h>
#include <sys/stat.h>
#include <unistd.h>
-1
View File
@@ -1,6 +1,5 @@
/* SPDX-License-Identifier: LGPL-2.1-or-later */
#include <arpa/inet.h>
#include <fcntl.h>
#include <linux/sctp.h>
#include <mqueue.h>
-1
View File
@@ -11,7 +11,6 @@
#include "all-units.h"
#include "alloc-util.h"
#include "ansi-color.h"
#include "bpf-firewall.h"
#include "bpf-restrict-fs.h"
#include "bus-common-errors.h"
#include "bus-internal.h"
-1
View File
@@ -12,7 +12,6 @@
#include "json-util.h"
#include "manager.h"
#include "pidref.h"
#include "process-util.h"
#include "selinux-access.h"
#include "set.h"
#include "strv.h"
-1
View File
@@ -17,7 +17,6 @@
#include "strv.h"
#include "unit.h"
#include "varlink-cgroup.h"
#include "varlink-common.h"
#include "varlink-execute.h"
#include "varlink-unit.h"
#include "varlink-util.h"
-2
View File
@@ -10,8 +10,6 @@
#include "format-util.h"
#include "journal-importer.h"
#include "log.h"
#include "string-util.h"
#include "user-util.h"
int coredump_backtrace(int argc, char *argv[]) {
_cleanup_(journal_importer_cleanup) JournalImporter importer = JOURNAL_IMPORTER_INIT(STDIN_FILENO);
-1
View File
@@ -3,7 +3,6 @@
#include "sd-login.h"
#include "sd-messages.h"
#include "coredump-config.h"
#include "coredump-context.h"
#include "coredump-util.h"
#include "dirent-util.h"
-1
View File
@@ -10,7 +10,6 @@
#include "coredump-util.h"
#include "fd-util.h"
#include "format-util.h"
#include "iovec-wrapper.h"
#include "log.h"
#include "signal-util.h"
-1
View File
@@ -8,7 +8,6 @@
#include "coredump-submit.h"
#include "iovec-util.h"
#include "iovec-wrapper.h"
#include "fd-util.h"
#include "log.h"
#include "socket-util.h"
-2
View File
@@ -28,7 +28,6 @@
#include "extract-word.h"
#include "fileio.h"
#include "fs-util.h"
#include "fstab-util.h"
#include "hexdecoct.h"
#include "json-util.h"
#include "libfido2-util.h"
@@ -36,7 +35,6 @@
#include "log.h"
#include "main-func.h"
#include "memory-util.h"
#include "mount-util.h"
#include "nulstr-util.h"
#include "parse-util.h"
#include "path-util.h"
-1
View File
@@ -29,7 +29,6 @@
#include "hostname-util.h"
#include "image-policy.h"
#include "kbd-util.h"
#include "label.h"
#include "label-util.h"
#include "libcrypt-util.h"
#include "locale-setup.h"
+1 -1
View File
@@ -5,7 +5,7 @@
#include <sys/uio.h>
#endif
#include "assert-fundamental.h"
#include "assert-fundamental.h" /* IWYU pragma: keep */
#include "macro-fundamental.h"
#if SD_BOOT
+1 -1
View File
@@ -77,7 +77,7 @@ modified for use with systemd
*/
#if SD_BOOT
# include "efi-string.h"
# include "efi-string.h" /* IWYU pragma: keep */
#else
# include <string.h>
#endif
+1 -1
View File
@@ -22,7 +22,7 @@
<https://www.gnu.org/licenses/>. */
#if SD_BOOT
# include "efi-string.h"
# include "efi-string.h" /* IWYU pragma: keep */
#else
# include <string.h>
#endif
+1 -1
View File
@@ -8,7 +8,7 @@
# include <string.h>
#endif
#include "assert-fundamental.h"
#include "assert-fundamental.h" /* IWYU pragma: keep */
#include "macro-fundamental.h"
/* What is interpreted as whitespace? */
-2
View File
@@ -1,7 +1,5 @@
/* SPDX-License-Identifier: LGPL-2.1-or-later */
#include <dirent.h>
#include "sd-daemon.h"
#include "sd-event.h"
+7
View File
@@ -0,0 +1,7 @@
/* SPDX-License-Identifier: LGPL-2.1-or-later */
#pragma once
/* The kernel header depends on <arpa/inet.h> being included. */
#include <arpa/inet.h>
#include_next <linux/sctp.h> /* IWYU pragma: export */
+2 -1
View File
@@ -4,7 +4,8 @@
/* sched.h includes linux/sched/types.h since glibc-2.41 (21571ca0d70302909cf72707b2a7736cf12190a0),
* to make struct sched_attr being defined.
* Note, this must be included before sched.h, otherwise the headers conflict with each other. */
#include <linux/sched/types.h>
#include <linux/sched.h> /* IWYU pragma: export */
#include <linux/sched/types.h> /* IWYU pragma: export */
#include_next <sched.h> /* IWYU pragma: export */
-2
View File
@@ -6,8 +6,6 @@
#include "errno-util.h"
#include "siphash24.h"
#include "socket-netlink.h"
#include "stdio-util.h"
#include "string-table.h"
#include "string-util.h"
#include "strv.h"
#include "unaligned.h"
-4
View File
@@ -1,7 +1,3 @@
/* SPDX-License-Identifier: LGPL-2.1-or-later */
#include <linux/audit.h>
#include "audit-type.h"
#include "audit_type-to-name.inc"
+1 -1
View File
@@ -1,7 +1,7 @@
/* SPDX-License-Identifier: LGPL-2.1-or-later */
#pragma once
#include <stdio.h>
#include <stdio.h> /* IWYU pragma: keep */
#include "sd-forward.h"
@@ -1,6 +1,9 @@
# SPDX-License-Identifier: LGPL-2.1-or-later
BEGIN{
print "#include <linux/audit.h>"
print ""
print "#include \"audit-type.h\""
print "const char *audit_type_to_string(int type) {"
print " switch (type) {"
}
+1 -1
View File
@@ -1,7 +1,7 @@
/* SPDX-License-Identifier: LGPL-2.1-or-later */
#pragma once
#include "syslog-util.h"
#include "syslog-util.h" /* IWYU pragma: keep */
int journal_fd_nonblock(bool nonblock);
void close_journal_fd(void);
@@ -10,7 +10,6 @@
#include "iovec-util.h"
#include "journal-file-util.h"
#include "journal-internal.h"
#include "log.h"
#include "parse-util.h"
#include "rm-rf.h"
#include "tests.h"
+1 -1
View File
@@ -7,7 +7,7 @@
#include "sd-forward.h"
#include "log.h"
#include "string-util.h"
#include "string-util.h" /* IWYU pragma: keep */
#define JSON_VARIANT_REPLACE(v, q) \
do { \
@@ -3,7 +3,7 @@
#include <linux/if.h>
#include <linux/netfilter/nf_tables.h>
#include <linux/netfilter/nfnetlink.h>
#include <linux/netlink.h>
#include <linux/netlink.h> /* IWYU pragma: keep */
#include "netlink-types-internal.h"
+1 -1
View File
@@ -2,13 +2,13 @@
#include "sd-json.h"
#include "alloc-util.h"
#include "dns-answer.h"
#include "dns-domain.h"
#include "dns-packet.h"
#include "dns-question.h"
#include "dns-rr.h"
#include "hashmap.h"
#include "json-util.h"
#include "local-addresses.h"
#include "log.h"
#include "machine.h"
-1
View File
@@ -19,7 +19,6 @@
#include "set.h"
#include "signal-util.h"
#include "socket-util.h"
#include "stdio-util.h"
#include "string-util.h"
#include "time-util.h"
#include "umask-util.h"
@@ -7,11 +7,11 @@
* fine given that LGPL-2.1-or-later downgrades to GPL if needed.
*/
#include "bpf-dlopen.h"
#include "bpf-dlopen.h" /* IWYU pragma: keep */
/* libbpf is used via dlopen(), so rename symbols */
#define bpf_object__destroy_skeleton sym_bpf_object__destroy_skeleton
#define bpf_object__load_skeleton sym_bpf_object__load_skeleton
#define bpf_object__open_skeleton sym_bpf_object__open_skeleton
#include "bpf/sysctl-monitor/sysctl-monitor.skel.h"
#include "bpf/sysctl-monitor/sysctl-monitor.skel.h" /* IWYU pragma: export */
-1
View File
@@ -11,7 +11,6 @@
#include "dns-packet.h"
#include "dns-question.h"
#include "dns-rr.h"
#include "env-util.h"
#include "errno-util.h"
#include "fd-util.h"
#include "networkd-link.h"
+1
View File
@@ -5,6 +5,7 @@
#include "sd-messages.h"
#include "af-list.h"
#include "bpf-dlopen.h"
#include "conf-parser.h"
#include "alloc-util.h"
#include "cgroup-util.h"
-1
View File
@@ -9,7 +9,6 @@
#include "network-internal.h"
#include "networkd-manager.h"
#include "networkd-route-util.h"
#include "string-util.h"
#include "strv.h"
#include "tests.h"
-1
View File
@@ -13,7 +13,6 @@
#include "cpu-set-util.h"
#include "device-util.h"
#include "devnum-util.h"
#include "env-util.h"
#include "hostname-util.h"
#include "json-util.h"
#include "nspawn-mount.h"
@@ -7,7 +7,7 @@
* fine given that LGPL-2.1-or-later downgrades to GPL if needed.
*/
#include "bpf-dlopen.h"
#include "bpf-dlopen.h" /* IWYU pragma: keep */
/* libbpf is used via dlopen(), so rename symbols */
#define bpf_object__attach_skeleton sym_bpf_object__attach_skeleton
@@ -15,4 +15,4 @@
#define bpf_object__load_skeleton sym_bpf_object__load_skeleton
#define bpf_object__open_skeleton sym_bpf_object__open_skeleton
#include "bpf/userns-restrict/userns-restrict.skel.h"
#include "bpf/userns-restrict/userns-restrict.skel.h" /* IWYU pragma: export */
+1 -1
View File
@@ -8,6 +8,7 @@
#include "bpf-dlopen.h"
#if HAVE_VMLINUX_H
#include "bpf-link.h"
#include "bpf/userns-restrict/userns-restrict-skel.h"
#endif
#include "build-path.h"
#include "common-signal.h"
@@ -26,7 +27,6 @@
#include "set.h"
#include "signal-util.h"
#include "socket-util.h"
#include "stdio-util.h"
#include "string-util.h"
#include "strv.h"
#include "time-util.h"
+4
View File
@@ -2,6 +2,10 @@
#include <sys/stat.h>
#if HAVE_VMLINUX_H
#include "bpf/userns-restrict/userns-restrict-skel.h"
#endif
#include "bpf-dlopen.h"
#include "bpf-link.h"
#include "fd-util.h"
-4
View File
@@ -3,11 +3,7 @@
#include "shared-forward.h"
#if HAVE_VMLINUX_H
#include "bpf/userns-restrict/userns-restrict-skel.h"
#else
struct userns_restrict_bpf;
#endif
int userns_restrict_install(bool pin, struct userns_restrict_bpf **ret);
struct userns_restrict_bpf *userns_restrict_bpf_free(struct userns_restrict_bpf *obj);
+1
View File
@@ -6,6 +6,7 @@
#include "alloc-util.h"
#include "cgroup-setup.h"
#include "cgroup-util.h"
#include "errno-util.h"
#include "fd-util.h"
#include "fileio.h"
#include "oomd-util.h"
-1
View File
@@ -14,7 +14,6 @@
#include "log.h"
#include "main-func.h"
#include "mount-setup.h"
#include "mount-util.h"
#include "path-util.h"
#include "process-util.h"
#include "signal-util.h"
+1 -1
View File
@@ -10,7 +10,7 @@
#include "resolved-dns-delegate.h"
#include "resolved-dns-delegate-bus.h"
#include "resolved-dns-search-domain.h"
#include "resolved-dns-server.h"
#include "resolved-dns-server.h" /* IWYU pragma: keep */
#include "resolved-manager.h"
#include "strv.h"
+1 -2
View File
@@ -1,13 +1,12 @@
/* SPDX-License-Identifier: LGPL-2.1-or-later */
#include <resolv.h>
#include <resolv.h> /* IWYU pragma: keep */
#include <sys/stat.h>
#include "alloc-util.h"
#include "fd-util.h"
#include "fileio.h"
#include "fs-util.h"
#include "label-util.h"
#include "log.h"
#include "ordered-set.h"
#include "path-util.h"
+1
View File
@@ -16,6 +16,7 @@
#include "dns-packet.h"
#include "dns-question.h"
#include "dns-rr.h"
#include "errno-util.h"
#include "fd-util.h"
#include "log.h"
#include "path-util.h"
+1 -1
View File
@@ -1,13 +1,13 @@
/* SPDX-License-Identifier: LGPL-2.1-or-later */
#include <sys/stat.h>
#include <sys/syslog.h>
#include "acl-util.h"
#include "alloc-util.h"
#include "errno-util.h"
#include "extract-word.h"
#include "fd-util.h"
#include "log.h"
#include "string-util.h"
#include "strv.h"
#include "user-util.h"
+2 -1
View File
@@ -1,5 +1,7 @@
/* SPDX-License-Identifier: LGPL-2.1-or-later */
#if HAVE_APPARMOR
#include <syslog.h>
#include "alloc-util.h"
@@ -8,7 +10,6 @@
#include "log.h"
#include "parse-util.h"
#if HAVE_APPARMOR
static void *libapparmor_dl = NULL;
DLSYM_PROTOTYPE(aa_change_onexec) = NULL;
+2 -1
View File
@@ -1,9 +1,10 @@
/* SPDX-License-Identifier: LGPL-2.1-or-later */
#include <sys/syslog.h>
#include "sd-id128.h"
#include "blkid-util.h"
#include "log.h"
#include "parse-util.h"
#include "string-util.h"
+1 -1
View File
@@ -1,7 +1,7 @@
/* SPDX-License-Identifier: LGPL-2.1-or-later */
#pragma once
#include "sd-bus.h"
#include "sd-bus.h" /* IWYU pragma: keep */
#include "shared-forward.h"
-2
View File
@@ -2,7 +2,6 @@
#include <stdio.h>
#include <stdlib.h>
#include <sys/mman.h>
#include <unistd.h>
#include "alloc-util.h"
@@ -11,7 +10,6 @@
#include "log.h"
#include "memstream-util.h"
#include "parse-util.h"
#include "process-util.h"
#include "sort-util.h"
#include "string-util.h"
#include "strv.h"
-1
View File
@@ -27,7 +27,6 @@
#include "path-util.h"
#include "rm-rf.h"
#include "selinux-util.h"
#include "set.h"
#include "signal-util.h"
#include "stat-util.h"
#include "stdio-util.h"
+1 -1
View File
@@ -13,7 +13,7 @@
#include "stdio-util.h"
#include "string-table.h"
#include "string-util.h"
#include "unaligned.h"
#include "unaligned.h" /* IWYU pragma: keep */
#include "virt.h"
int set_dumpable(SuidDumpMode mode) {
-3
View File
@@ -7,7 +7,6 @@
#include <sys/file.h>
#include <sys/ioctl.h>
#include <sys/stat.h>
#include <sys/sysmacros.h>
#include <unistd.h>
#include "sd-json.h"
@@ -32,11 +31,9 @@
#include "hashmap.h"
#include "hostname-setup.h"
#include "id128-util.h"
#include "initrd-util.h"
#include "lock-util.h"
#include "log.h"
#include "loop-util.h"
#include "mkdir.h"
#include "namespace-util.h"
#include "nsresource.h"
#include "nulstr-util.h"
+1 -1
View File
@@ -4,7 +4,7 @@
#include "alloc-util.h"
#include "bitmap.h"
#include "dns-answer.h"
#include "dns-answer.h" /* IWYU pragma: keep */
#include "dns-domain.h"
#include "dns-packet.h"
#include "dns-rr.h"
+1 -1
View File
@@ -15,7 +15,7 @@
#include "stat-util.h"
#include "stdio-util.h"
#include "string-util.h"
#include "tpm2-util.h"
#include "tpm2-util.h" /* IWYU pragma: keep */
#include "utf8.h"
#define EFI_TCG2_BOOT_HASH_ALG_SHA1 0x01
+1 -1
View File
@@ -9,7 +9,7 @@
#include "dlfcn-util.h"
#include "idn-util.h"
#include "log.h"
#include "log.h" /* IWYU pragma: keep */
#if HAVE_LIBIDN || HAVE_LIBIDN2
static void* idn_dl = NULL;
+1 -1
View File
@@ -3,7 +3,7 @@
#include <syslog.h>
#include "libarchive-util.h"
#include "user-util.h"
#include "user-util.h" /* IWYU pragma: keep */
#if HAVE_LIBARCHIVE
static void *libarchive_dl = NULL;
+1 -1
View File
@@ -7,7 +7,7 @@
#include "errno-util.h"
#include "libcrypt-util.h"
#include "log.h"
#include "random-util.h"
#include "random-util.h" /* IWYU pragma: keep */
#include "string-util.h"
#include "strv.h"
+1 -1
View File
@@ -2,7 +2,7 @@
#pragma once
#include "shared-forward.h"
#include "static-destruct.h"
#include "static-destruct.h" /* IWYU pragma: keep */
void main_prepare(int argc, char *argv[]);
+1 -1
View File
@@ -3,7 +3,7 @@
#include <sys/stat.h>
#include "errno-util.h"
#include "label-util.h"
#include "label-util.h" /* IWYU pragma: keep */
#include "mkdir-label.h"
#include "selinux-util.h"
#include "smack-util.h"
+6 -3
View File
@@ -1,15 +1,18 @@
/* SPDX-License-Identifier: LGPL-2.1-or-later */
#include "password-quality-util-passwdqc.h"
#if HAVE_PASSWDQC
#include <passwdqc.h>
#include "alloc-util.h"
#include "dlfcn-util.h"
#include "errno-util.h"
#include "log.h"
#include "memory-util.h"
#include "password-quality-util-passwdqc.h"
#include "strv.h"
#if HAVE_PASSWDQC
static void *passwdqc_dl = NULL;
DLSYM_PROTOTYPE(passwdqc_params_reset) = NULL;
@@ -4,8 +4,6 @@
#include "shared-forward.h"
#if HAVE_PASSWDQC
#include <passwdqc.h>
int suggest_passwords(void);
int check_password_quality(const char *password, const char *old, const char *username, char **ret_error);
#endif
+5 -3
View File
@@ -1,5 +1,10 @@
/* SPDX-License-Identifier: LGPL-2.1-or-later */
#include "password-quality-util-pwquality.h"
#if HAVE_PWQUALITY
#include <pwquality.h>
#include <stdio.h>
#include <unistd.h>
@@ -8,12 +13,9 @@
#include "errno-util.h"
#include "log.h"
#include "password-quality-util.h"
#include "password-quality-util-pwquality.h"
#include "string-util.h"
#include "strv.h"
#if HAVE_PWQUALITY
static void *pwquality_dl = NULL;
DLSYM_PROTOTYPE(pwquality_check) = NULL;
@@ -4,8 +4,6 @@
#include "shared-forward.h"
#if HAVE_PWQUALITY
#include <pwquality.h>
int suggest_passwords(void);
int check_password_quality(const char *password, const char *old, const char *username, char **ret_error);
#endif
-1
View File
@@ -14,7 +14,6 @@
#include "errno-util.h"
#include "fd-util.h"
#include "log.h"
#include "parse-util.h"
#include "reread-partition-table.h"
#include "set.h"
#include "string-util.h"
-2
View File
@@ -1,7 +1,5 @@
/* SPDX-License-Identifier: LGPL-2.1-or-later */
#include <stdio.h>
#include "alloc-util.h"
#include "extract-word.h"
#include "securebits-util.h"
-1
View File
@@ -1,6 +1,5 @@
/* SPDX-License-Identifier: LGPL-2.1-or-later */
#include <sched.h>
#include <stdlib.h>
#include <sys/mman.h>
#include <unistd.h>
+3 -4
View File
@@ -4,14 +4,13 @@
#include <unistd.h>
#include "errno-list.h"
#include "errno-util.h"
#include "shared-forward.h"
#include "log.h"
#include "log-assert-critical.h"
#include "static-destruct.h"
#include "signal-util.h"
#include "static-destruct.h" /* IWYU pragma: keep*/
#include "signal-util.h" /* IWYU pragma: keep*/
#include "stdio-util.h"
#include "string-util.h"
#include "string-util.h" /* IWYU pragma: keep */
static inline void log_set_assert_return_is_criticalp(bool *p) {
log_set_assert_return_is_critical(*p);
+1 -1
View File
@@ -2,7 +2,7 @@
#pragma once
#include "shared-forward.h"
#include "tpm2-util.h"
#include "tpm2-util.h" /* IWYU pragma: keep */
/* Definitions as per "TCG PC Client Specific Platform Firmware Profile Specification"
* (https://trustedcomputinggroup.org/resource/pc-client-specific-platform-firmware-profile-specification/),
-3
View File
@@ -6,7 +6,6 @@
#include "alloc-util.h"
#include "ansi-color.h"
#include "bitfield.h"
#include "bootspec.h"
#include "boot-entry.h"
#include "constants.h"
#include "creds-util.h"
@@ -14,7 +13,6 @@
#include "dirent-util.h"
#include "dlfcn-util.h"
#include "efi-api.h"
#include "errno-util.h"
#include "extract-word.h"
#include "fd-util.h"
#include "fileio.h"
@@ -42,7 +40,6 @@
#include "sync-util.h"
#include "time-util.h"
#include "tpm2-pcr.h"
#include "tmpfile-util.h"
#include "tpm2-util.h"
#include "virt.h"
-2
View File
@@ -1,8 +1,6 @@
/* SPDX-License-Identifier: LGPL-2.1-or-later */
#include "build.h"
#include "varlink-idl-common.h"
#include "varlink-io.systemd.Unit.h"
/* CGroupContext */
static SD_VARLINK_DEFINE_STRUCT_TYPE(
+1 -1
View File
@@ -3,7 +3,7 @@
Copyright © 2010 ProFUSION embedded systems
***/
#include <linux/major.h>
#include <linux/major.h> /* IWYU pragma: keep */
#include <linux/raid/md_u.h>
#include <sys/ioctl.h>
-2
View File
@@ -26,7 +26,6 @@
#include "detach-swap.h"
#include "errno-util.h"
#include "exec-util.h"
#include "extract-word.h"
#include "fd-util.h"
#include "fileio.h"
#include "format-util.h"
@@ -44,7 +43,6 @@
#include "signal-util.h"
#include "string-util.h"
#include "switch-root.h"
#include "sysctl-util.h"
#include "terminal-util.h"
#include "time-util.h"
#include "umount.h"
-1
View File
@@ -7,7 +7,6 @@
#include "alloc-util.h"
#include "ansi-color.h"
#include "build.h"
#include "errno-util.h"
#include "fd-util.h"
#include "fs-util.h"
#include "log.h"
-2
View File
@@ -10,8 +10,6 @@
#include "constants.h"
#include "creds-util.h"
#include "errno-util.h"
#include "fd-util.h"
#include "fileio.h"
#include "glob-util.h"
#include "hashmap.h"
#include "log.h"
+1 -1
View File
@@ -32,7 +32,7 @@
#include "hashmap.h"
#include "image-policy.h"
#include "initrd-util.h"
#include "label-util.h"
#include "label-util.h" /* IWYU pragma: keep */
#include "log.h"
#include "loop-util.h"
#include "main-func.h"
-1
View File
@@ -17,7 +17,6 @@
#include "errno-util.h"
#include "exec-util.h"
#include "exit-status.h"
#include "extract-word.h"
#include "format-util.h"
#include "hexdecoct.h"
#include "hostname-setup.h"
-1
View File
@@ -5,7 +5,6 @@
#include "alloc-util.h"
#include "capability-list.h"
#include "capability-util.h"
#include "parse-util.h"
#include "random-util.h"
#include "string-util.h"
#include "strv.h"

Some files were not shown because too many files have changed in this diff Show More