diff --git a/.clangd b/.clangd index 7ce59c6002..b0deab559c 100644 --- a/.clangd +++ b/.clangd @@ -11,6 +11,6 @@ CompileFlags: Diagnostics: UnusedIncludes: Strict # __no_reorder__ is a GCC-only attribute (see _no_reorder_ in - # src/fundamental/macro-fundamental.h). Meson detects it during configure + # src/fundamental/macro.h). Meson detects it during configure # with GCC and enables it unconditionally, so clangd flags every use. Suppress: [unknown-attributes] diff --git a/LICENSES/README.md b/LICENSES/README.md index 9bd26baa0d..90550d85c7 100644 --- a/LICENSES/README.md +++ b/LICENSES/README.md @@ -67,8 +67,8 @@ The following exceptions apply: * the tools/chromiumos/gen_autosuspend_rules.py script is licensed under the **BSD-3-Clause** license. * the following sources are under **Public Domain** (LicenseRef-alg-sha1-public-domain): - - src/fundamental/sha1-fundamental.c - - src/fundamental/sha1-fundamental.h + - src/fundamental/sha1.c + - src/fundamental/sha1.h * the following files are licensed under **BSD-3-Clause** license: - src/boot/chid.c - src/boot/chid.h diff --git a/coccinelle/parsing_hacks.h b/coccinelle/parsing_hacks.h index bc84235557..536a2d2670 100644 --- a/coccinelle/parsing_hacks.h +++ b/coccinelle/parsing_hacks.h @@ -101,7 +101,7 @@ /* sizeof() does not evaluate its argument, so *ptr inside sizeof() is not a real dereference. * The SIZEOF() macro is an alias for sizeof() that hides the argument from coccinelle to avoid - * false positives from check-pointer-deref.cocci. See assert-fundamental.h for the definition. */ + * false positives from check-pointer-deref.cocci. See assert-util.h for the definition. */ #define SIZEOF(x) 8 /* Work around a bug in zlib.h parsing on Fedora (and possibly others) diff --git a/docs/CODING_STYLE.md b/docs/CODING_STYLE.md index 085c97df5c..d6580bbbec 100644 --- a/docs/CODING_STYLE.md +++ b/docs/CODING_STYLE.md @@ -366,10 +366,10 @@ SPDX-License-Identifier: LGPL-2.1-or-later - `src/shared`: `shared-forward.h` Header files that extend other header files can include the original header - file. For example, `iovec-util.h` includes `iovec-fundamental.h` and - `sys/uio.h`. To identify headers that are exported from other headers, add a - `IWYU pragma: export` comment to the includes so that these exports are - recognized by clang static analysis tooling. + file. For example, `iovec-util.h` includes `sys/uio.h`. To identify headers + that are exported from other headers, add a `IWYU pragma: export` comment + to the includes so that these exports are recognized by clang static analysis + tooling. Bad: diff --git a/meson.build b/meson.build index 1d2d59e4fa..c5af3b107c 100644 --- a/meson.build +++ b/meson.build @@ -1715,7 +1715,7 @@ basic_includes = [ version_include, ] -libsystemd_includes = [basic_includes, include_directories( +libsystemd_includes = [include_directories( 'src/libsystemd/sd-bus', 'src/libsystemd/sd-common', 'src/libsystemd/sd-device', @@ -1728,14 +1728,14 @@ libsystemd_includes = [basic_includes, include_directories( 'src/libsystemd/sd-network', 'src/libsystemd/sd-path', 'src/libsystemd/sd-resolve', - 'src/libsystemd/sd-varlink')] + 'src/libsystemd/sd-varlink'), basic_includes] includes = [ - libsystemd_includes, include_directories( 'src/shared', 'src/bpf', ), + libsystemd_includes, ] subdir('po') diff --git a/src/analyze/analyze-chid.c b/src/analyze/analyze-chid.c index 9fe68b2de4..896c6e54b3 100644 --- a/src/analyze/analyze-chid.c +++ b/src/analyze/analyze-chid.c @@ -6,9 +6,9 @@ #include "analyze.h" #include "analyze-chid.h" #include "ansi-color.h" -#include "chid-fundamental.h" +#include "chid.h" #include "device-util.h" -#include "edid-fundamental.h" +#include "edid.h" #include "efi-api.h" #include "errno-util.h" #include "escape.h" diff --git a/src/basic/assert-util.h b/src/basic/assert-util.h index 899a436560..8451b7b299 100644 --- a/src/basic/assert-util.h +++ b/src/basic/assert-util.h @@ -1,7 +1,7 @@ /* SPDX-License-Identifier: LGPL-2.1-or-later */ #pragma once -#include "assert-fundamental.h" /* IWYU pragma: export */ +#include "../fundamental/assert-util.h" /* IWYU pragma: export */ /* Logging for various assertions */ diff --git a/src/basic/basic-forward.h b/src/basic/basic-forward.h index 5edd494f78..0a245a1863 100644 --- a/src/basic/basic-forward.h +++ b/src/basic/basic-forward.h @@ -17,7 +17,8 @@ #include "assert-util.h" /* IWYU pragma: export */ #include "cleanup-util.h" /* IWYU pragma: export */ #include "macro.h" /* IWYU pragma: export */ -#include "string-table-fundamental.h" /* IWYU pragma: export */ + +#include "../fundamental/string-table.h" /* IWYU pragma: export */ /* Generic types */ diff --git a/src/basic/btrfs.c b/src/basic/btrfs-util.c similarity index 99% rename from src/basic/btrfs.c rename to src/basic/btrfs-util.c index 81c9839450..941d66c93c 100644 --- a/src/basic/btrfs.c +++ b/src/basic/btrfs-util.c @@ -5,7 +5,7 @@ #include #include "alloc-util.h" -#include "btrfs.h" +#include "btrfs-util.h" #include "errno-util.h" #include "fd-util.h" #include "fs-util.h" diff --git a/src/basic/btrfs.h b/src/basic/btrfs-util.h similarity index 100% rename from src/basic/btrfs.h rename to src/basic/btrfs-util.h diff --git a/src/basic/cleanup-util.h b/src/basic/cleanup-util.h index e3a2ade4ed..93f6a0de96 100644 --- a/src/basic/cleanup-util.h +++ b/src/basic/cleanup-util.h @@ -1,8 +1,8 @@ /* SPDX-License-Identifier: LGPL-2.1-or-later */ #pragma once -#include "assert-fundamental.h" -#include "cleanup-fundamental.h" /* IWYU pragma: export */ +#include "../fundamental/assert-util.h" +#include "../fundamental/cleanup-util.h" /* IWYU pragma: export */ typedef void (*free_func_t)(void *p); typedef void* (*mfree_func_t)(void *p); diff --git a/src/basic/confidential-virt.c b/src/basic/confidential-virt.c index a5996b244b..29d598a598 100644 --- a/src/basic/confidential-virt.c +++ b/src/basic/confidential-virt.c @@ -8,7 +8,6 @@ #include #include "confidential-virt.h" -#include "confidential-virt-fundamental.h" #include "errno-util.h" /* IWYU pragma: keep */ #include "fd-util.h" #include "fileio.h" /* IWYU pragma: keep */ diff --git a/src/basic/confidential-virt.h b/src/basic/confidential-virt.h index 446080de35..5505f997e6 100644 --- a/src/basic/confidential-virt.h +++ b/src/basic/confidential-virt.h @@ -3,6 +3,8 @@ #include "basic-forward.h" +#include "../fundamental/confidential-virt.h" /* IWYU pragma: export */ + typedef enum ConfidentialVirtualization { CONFIDENTIAL_VIRTUALIZATION_NONE = 0, diff --git a/src/basic/efivars.h b/src/basic/efivars.h index 22e0eab9a0..368fe12a49 100644 --- a/src/basic/efivars.h +++ b/src/basic/efivars.h @@ -5,7 +5,7 @@ #include "sd-id128.h" -#include "efivars-fundamental.h" /* IWYU pragma: export */ +#include "../fundamental/efivars.h" /* IWYU pragma: export */ #define EFI_VENDOR_LOADER SD_ID128_MAKE(4a,67,b0,82,0a,4c,41,cf,b6,c7,44,0b,29,bb,8c,4f) #define EFI_VENDOR_LOADER_STR SD_ID128_MAKE_UUID_STR(4a,67,b0,82,0a,4c,41,cf,b6,c7,44,0b,29,bb,8c,4f) diff --git a/src/basic/env-file.c b/src/basic/env-file.c index 587618614e..7689c653a2 100644 --- a/src/basic/env-file.c +++ b/src/basic/env-file.c @@ -10,7 +10,7 @@ #include "fd-util.h" #include "fileio.h" #include "fs-util.h" -#include "label.h" +#include "label-util.h" #include "log.h" #include "string-util.h" #include "strv.h" diff --git a/src/basic/fileio.c b/src/basic/fileio.c index 8149bb8b0d..de2ac6af72 100644 --- a/src/basic/fileio.c +++ b/src/basic/fileio.c @@ -16,7 +16,7 @@ #include "hexdecoct.h" #include "io-util.h" #include "iovec-util.h" -#include "label.h" +#include "label-util.h" #include "log.h" #include "mkdir.h" #include "nulstr-util.h" diff --git a/src/basic/fs-util.c b/src/basic/fs-util.c index 84b76072d7..b51d630898 100644 --- a/src/basic/fs-util.c +++ b/src/basic/fs-util.c @@ -7,14 +7,14 @@ #include #include "alloc-util.h" -#include "btrfs.h" +#include "btrfs-util.h" #include "chattr-util.h" #include "dirent-util.h" #include "errno-util.h" #include "fd-util.h" #include "fs-util.h" #include "hostname-util.h" -#include "label.h" +#include "label-util.h" #include "lock-util.h" #include "log.h" #include "mkdir.h" diff --git a/src/basic/iovec-util.h b/src/basic/iovec-util.h index a0a059550b..35cdce6a76 100644 --- a/src/basic/iovec-util.h +++ b/src/basic/iovec-util.h @@ -4,7 +4,8 @@ #include /* IWYU pragma: export */ #include "basic-forward.h" -#include "iovec-util-fundamental.h" /* IWYU pragma: export */ + +#include "../fundamental/iovec-util.h" /* IWYU pragma: export */ extern const struct iovec iovec_nul_byte; /* Points to a single NUL byte */ extern const struct iovec iovec_empty; /* Points to an empty, but valid (i.e. non-NULL) pointer */ diff --git a/src/basic/label.c b/src/basic/label-util.c similarity index 96% rename from src/basic/label.c rename to src/basic/label-util.c index cce3e75c7c..a6d616210a 100644 --- a/src/basic/label.c +++ b/src/basic/label-util.c @@ -1,6 +1,6 @@ /* SPDX-License-Identifier: LGPL-2.1-or-later */ -#include "label.h" +#include "label-util.h" static const LabelOps *label_ops = NULL; diff --git a/src/basic/label.h b/src/basic/label-util.h similarity index 100% rename from src/basic/label.h rename to src/basic/label-util.h diff --git a/src/basic/macro.h b/src/basic/macro.h index 390a9fab38..cb0719f15f 100644 --- a/src/basic/macro.h +++ b/src/basic/macro.h @@ -1,7 +1,7 @@ /* SPDX-License-Identifier: LGPL-2.1-or-later */ #pragma once -#include "macro-fundamental.h" /* IWYU pragma: export */ +#include "../fundamental/macro.h" /* IWYU pragma: export */ #if !defined(HAS_FEATURE_MEMORY_SANITIZER) # if defined(__has_feature) diff --git a/src/basic/memory-util.h b/src/basic/memory-util.h index f16118fbb0..4caf58585a 100644 --- a/src/basic/memory-util.h +++ b/src/basic/memory-util.h @@ -4,7 +4,8 @@ #include #include "basic-forward.h" -#include "memory-util-fundamental.h" /* IWYU pragma: export */ + +#include "../fundamental/memory-util.h" /* IWYU pragma: export */ size_t page_size(void) _pure_; #define PAGE_ALIGN(l) ALIGN_TO(l, page_size()) diff --git a/src/basic/meson.build b/src/basic/meson.build index 7cc62c7b8b..6987c3cabb 100644 --- a/src/basic/meson.build +++ b/src/basic/meson.build @@ -10,7 +10,7 @@ basic_sources = files( 'arphrd-util.c', 'assert-util.c', 'audit-util.c', - 'btrfs.c', + 'btrfs-util.c', 'build.c', 'build-path.c', 'bus-label.c', @@ -57,7 +57,7 @@ basic_sources = files( 'iovec-util.c', 'iovec-wrapper.c', 'keyring-util.c', - 'label.c', + 'label-util.c', 'limits-util.c', 'locale-util.c', 'lock-util.c', diff --git a/src/basic/mkdir.c b/src/basic/mkdir.c index 7b353542e3..fc79763bb9 100644 --- a/src/basic/mkdir.c +++ b/src/basic/mkdir.c @@ -3,7 +3,7 @@ #include #include "alloc-util.h" -#include "btrfs.h" +#include "btrfs-util.h" #include "chase.h" #include "errno-util.h" #include "fd-util.h" diff --git a/src/basic/sha256.h b/src/basic/sha256.h index 5016cb42b0..74314a0cab 100644 --- a/src/basic/sha256.h +++ b/src/basic/sha256.h @@ -3,7 +3,8 @@ #pragma once #include "basic-forward.h" -#include "sha256-fundamental.h" /* IWYU pragma: export */ + +#include "../fundamental/sha256.h" /* IWYU pragma: export */ int sha256_fd(int fd, uint64_t max_size, uint8_t ret[static SHA256_DIGEST_SIZE]); diff --git a/src/basic/string-util.h b/src/basic/string-util.h index 8cddc051d5..447f4f807e 100644 --- a/src/basic/string-util.h +++ b/src/basic/string-util.h @@ -5,7 +5,8 @@ #include "alloc-util.h" #include "basic-forward.h" -#include "string-util-fundamental.h" /* IWYU pragma: export */ + +#include "../fundamental/string-util.h" /* IWYU pragma: export */ static inline char* strstr_ptr_internal(const char *haystack, const char *needle) { if (!haystack || !needle) diff --git a/src/basic/strv.h b/src/basic/strv.h index d7c4b2bcf0..cf6fa158b6 100644 --- a/src/basic/strv.h +++ b/src/basic/strv.h @@ -2,7 +2,8 @@ #pragma once #include "basic-forward.h" -#include "strv-fundamental.h" /* IWYU pragma: export */ + +#include "../fundamental/strv.h" /* IWYU pragma: export */ char* strv_find(char * const *l, const char *name) _pure_; char* strv_find_case(char * const *l, const char *name) _pure_; diff --git a/src/basic/unaligned.h b/src/basic/unaligned.h index b45fb3c358..f54d7d8edd 100644 --- a/src/basic/unaligned.h +++ b/src/basic/unaligned.h @@ -4,7 +4,8 @@ #include #include "basic-forward.h" -#include "unaligned-fundamental.h" /* IWYU pragma: export */ + +#include "../fundamental/unaligned.h" /* IWYU pragma: export */ /* BE */ diff --git a/src/boot/boot-secret.c b/src/boot/boot-secret.c index 54078b51c2..7be0880d3b 100644 --- a/src/boot/boot-secret.c +++ b/src/boot/boot-secret.c @@ -4,7 +4,7 @@ #include "efi-efivars.h" #include "efi-log.h" #include "random-seed.h" -#include "sha256-fundamental.h" +#include "sha256.h" #include "util.h" #define BOOT_SECRET_MIXIN_PATH u"\\loader\\boot-secret-mixin" diff --git a/src/boot/boot.c b/src/boot/boot.c index 8660814aae..9f833f02b1 100644 --- a/src/boot/boot.c +++ b/src/boot/boot.c @@ -1,7 +1,7 @@ /* SPDX-License-Identifier: LGPL-2.1-or-later */ #include "bcd.h" -#include "bootspec-fundamental.h" +#include "bootspec.h" #include "console.h" #include "cpio.h" #include "device-path-util.h" @@ -10,14 +10,14 @@ #include "efi-efivars.h" #include "efi-log.h" #include "efi-string-table.h" -#include "efivars-fundamental.h" +#include "efivars.h" #include "export-vars.h" #include "graphics.h" #include "initrd.h" -#include "iovec-util-fundamental.h" +#include "iovec-util.h" #include "line-edit.h" #include "measure.h" -#include "memory-util-fundamental.h" +#include "memory-util.h" #include "part-discovery.h" #include "pe.h" #include "proto/block-io.h" @@ -29,7 +29,7 @@ #include "secure-boot.h" #include "shim.h" #include "smbios.h" -#include "strv-fundamental.h" +#include "strv.h" #include "sysfail.h" #include "ticks.h" #include "tpm2-pcr.h" diff --git a/src/boot/chid.c b/src/boot/chid.c index 8abd9de47c..6cb11e8b1c 100644 --- a/src/boot/chid.c +++ b/src/boot/chid.c @@ -15,7 +15,6 @@ */ #include "chid.h" -#include "chid-fundamental.h" #include "edid.h" #if SD_BOOT #include "efi-log.h" diff --git a/src/boot/chid.h b/src/boot/chid.h index f8299fde88..8bf4b555a4 100644 --- a/src/boot/chid.h +++ b/src/boot/chid.h @@ -1,9 +1,10 @@ /* SPDX-License-Identifier: BSD-3-Clause */ #pragma once -#include "chid-fundamental.h" /* IWYU pragma: export */ #include "efi.h" +#include "../fundamental/chid.h" /* IWYU pragma: export */ + /* A .hwids PE section consists of a series of 'Device' structures. A 'Device' structure binds a CHID to some * resource, for now only Devicetree blobs. Designed to be extensible to other types of resources, should the * need arise. The series of 'Device' structures is followed by some space for strings that can be referenced diff --git a/src/boot/console.c b/src/boot/console.c index 8dcd986aa4..1115eeaae0 100644 --- a/src/boot/console.c +++ b/src/boot/console.c @@ -6,7 +6,7 @@ #include "efi-string.h" #include "proto/graphics-output.h" #include "proto/pci-io.h" -#include "string-util-fundamental.h" +#include "string-util.h" #include "util.h" #define SYSTEM_FONT_WIDTH 8 diff --git a/src/boot/cpio.c b/src/boot/cpio.c index 36c536681c..6c1b3caedd 100644 --- a/src/boot/cpio.c +++ b/src/boot/cpio.c @@ -2,9 +2,9 @@ #include "cpio.h" #include "efi-log.h" -#include "iovec-util-fundamental.h" +#include "iovec-util.h" #include "measure.h" -#include "string-util-fundamental.h" +#include "string-util.h" #include "tpm2-pcr.h" #include "util.h" diff --git a/src/boot/device-path-util.c b/src/boot/device-path-util.c index a40cb5e8a1..5243e81e5d 100644 --- a/src/boot/device-path-util.c +++ b/src/boot/device-path-util.c @@ -2,7 +2,7 @@ #include "device-path-util.h" #include "efi-string.h" -#include "string-util-fundamental.h" +#include "string-util.h" #include "util.h" static const EFI_DEVICE_PATH *device_path_find_end_node(const EFI_DEVICE_PATH *dp) { diff --git a/src/boot/drivers.c b/src/boot/drivers.c index d58b1e39da..215404d4b0 100644 --- a/src/boot/drivers.c +++ b/src/boot/drivers.c @@ -3,7 +3,7 @@ #include "device-path-util.h" #include "drivers.h" #include "efi-log.h" -#include "string-util-fundamental.h" +#include "string-util.h" #include "util.h" static EFI_STATUS load_one_driver( diff --git a/src/boot/edid.h b/src/boot/edid.h index 74649658d9..553684d8d1 100644 --- a/src/boot/edid.h +++ b/src/boot/edid.h @@ -1,7 +1,8 @@ /* SPDX-License-Identifier: LGPL-2.1-or-later */ #pragma once -#include "edid-fundamental.h" /* IWYU pragma: export */ #include "efi.h" +#include "../fundamental/edid.h" /* IWYU pragma: export */ + EFI_STATUS edid_get_discovered_panel_id(char16_t **ret_panel); diff --git a/src/boot/efi-efivars.h b/src/boot/efi-efivars.h index 6d88f56e71..c9e2f0d929 100644 --- a/src/boot/efi-efivars.h +++ b/src/boot/efi-efivars.h @@ -2,7 +2,7 @@ #pragma once #include "efi.h" -#include "efivars-fundamental.h" /* IWYU pragma: export */ +#include "efivars.h" /* IWYU pragma: export */ /* * Allocated random UUID, intended to be shared across tools that implement diff --git a/src/boot/efi-string-table.h b/src/boot/efi-string-table.h index 9e142aa6cc..7b755578b2 100644 --- a/src/boot/efi-string-table.h +++ b/src/boot/efi-string-table.h @@ -2,7 +2,7 @@ #pragma once #include "efi-string.h" -#include "macro-fundamental.h" +#include "macro.h" #define _DEFINE_STRING_TABLE_LOOKUP_TO_STRING(name,type,scope) \ scope const char* name##_to_string(type i) { \ diff --git a/src/boot/efi-string.c b/src/boot/efi-string.c index d0be7a1e16..3064463862 100644 --- a/src/boot/efi-string.c +++ b/src/boot/efi-string.c @@ -1,7 +1,7 @@ /* SPDX-License-Identifier: LGPL-2.1-or-later */ #include "efi-string.h" -#include "string-util-fundamental.h" +#include "string-util.h" #if SD_BOOT # include "proto/simple-text-io.h" diff --git a/src/boot/efi.h b/src/boot/efi.h index eddaad1eee..c518a0253f 100644 --- a/src/boot/efi.h +++ b/src/boot/efi.h @@ -9,11 +9,12 @@ #include /* IWYU pragma: export */ #include /* IWYU pragma: export */ -#include "assert-fundamental.h" /* IWYU pragma: export */ -#include "cleanup-fundamental.h" /* IWYU pragma: export */ -#include "efi-fundamental.h" /* IWYU pragma: export */ -#include "macro-fundamental.h" /* IWYU pragma: export */ -#include "string-table-fundamental.h" /* IWYU pragma: export */ +#include "assert-util.h" /* IWYU pragma: export */ +#include "cleanup-util.h" /* IWYU pragma: export */ +#include "macro.h" /* IWYU pragma: export */ +#include "string-table.h" /* IWYU pragma: export */ + +#include "../fundamental/efi.h" /* IWYU pragma: export */ #if SD_BOOT /* uchar.h/wchar.h are not suitable for freestanding environments. */ diff --git a/src/boot/initrd.c b/src/boot/initrd.c index 044e011f60..eced9273fe 100644 --- a/src/boot/initrd.c +++ b/src/boot/initrd.c @@ -2,7 +2,7 @@ #include "efi-log.h" #include "initrd.h" -#include "iovec-util-fundamental.h" +#include "iovec-util.h" #include "proto/device-path.h" #include "proto/load-file.h" #include "util.h" diff --git a/src/boot/initrd.h b/src/boot/initrd.h index cfcb8d1c6f..fb56d6919d 100644 --- a/src/boot/initrd.h +++ b/src/boot/initrd.h @@ -2,7 +2,7 @@ #pragma once #include "efi.h" -#include "iovec-util-fundamental.h" +#include "iovec-util.h" #include "util.h" EFI_STATUS initrd_register( diff --git a/src/boot/line-edit.c b/src/boot/line-edit.c index 1e6128e1ef..e37398d971 100644 --- a/src/boot/line-edit.c +++ b/src/boot/line-edit.c @@ -2,7 +2,7 @@ #include "console.h" #include "line-edit.h" -#include "string-util-fundamental.h" +#include "string-util.h" #include "util.h" static void cursor_left(size_t *cursor, size_t *first) { diff --git a/src/boot/linux.h b/src/boot/linux.h index 681d12c0c1..f7eb834bca 100644 --- a/src/boot/linux.h +++ b/src/boot/linux.h @@ -2,7 +2,7 @@ #pragma once #include "efi.h" -#include "iovec-util-fundamental.h" +#include "iovec-util.h" EFI_STATUS linux_exec( EFI_HANDLE parent, diff --git a/src/boot/linux_x86.c b/src/boot/linux_x86.c index 349e3fb26c..2f3275b065 100644 --- a/src/boot/linux_x86.c +++ b/src/boot/linux_x86.c @@ -12,8 +12,8 @@ #include "efi-log.h" #include "linux.h" -#include "macro-fundamental.h" -#include "memory-util-fundamental.h" +#include "macro.h" +#include "memory-util.h" #include "util.h" #define KERNEL_SECTOR_SIZE 512u diff --git a/src/boot/meson.build b/src/boot/meson.build index 1b8f94e58a..2dc9c64256 100644 --- a/src/boot/meson.build +++ b/src/boot/meson.build @@ -12,8 +12,8 @@ libefitest = static_library( ), build_by_default : false, include_directories : [ - basic_includes, include_directories('.'), + basic_includes, ], implicit_include_directories : false, dependencies : userspace) @@ -164,8 +164,8 @@ configure_file( ############################################################ efi_includes = [ - fundamental_include, include_directories('.'), + fundamental_include, version_include, ] diff --git a/src/boot/part-discovery.c b/src/boot/part-discovery.c index 8f5fefad47..ab553a6530 100644 --- a/src/boot/part-discovery.c +++ b/src/boot/part-discovery.c @@ -6,7 +6,7 @@ #include "proto/block-io.h" #include "proto/device-path.h" #include "proto/disk-io.h" -#include "string-util-fundamental.h" +#include "string-util.h" #include "util.h" typedef struct { diff --git a/src/boot/random-seed.c b/src/boot/random-seed.c index a31215c3b0..6d27a92552 100644 --- a/src/boot/random-seed.c +++ b/src/boot/random-seed.c @@ -2,11 +2,11 @@ #include "efi-efivars.h" #include "efi-log.h" -#include "memory-util-fundamental.h" +#include "memory-util.h" #include "proto/rng.h" #include "random-seed.h" #include "secure-boot.h" -#include "sha256-fundamental.h" +#include "sha256.h" #include "util.h" #define RANDOM_MAX_SIZE_MIN (32U) diff --git a/src/boot/secure-boot.h b/src/boot/secure-boot.h index 03bead2712..58cc02a9d2 100644 --- a/src/boot/secure-boot.h +++ b/src/boot/secure-boot.h @@ -2,7 +2,7 @@ #pragma once #include "efi.h" -#include "efivars-fundamental.h" +#include "efivars.h" typedef enum { ENROLL_OFF, /* no Secure Boot key enrollment whatsoever, even manual entries are not generated */ diff --git a/src/boot/splash.c b/src/boot/splash.c index 487f212e65..126fff9547 100644 --- a/src/boot/splash.c +++ b/src/boot/splash.c @@ -4,7 +4,7 @@ #include "logarithm.h" #include "proto/graphics-output.h" #include "splash.h" -#include "unaligned-fundamental.h" +#include "unaligned.h" #include "util.h" struct bmp_file { diff --git a/src/boot/stub.c b/src/boot/stub.c index 52927e91ff..6411102ec4 100644 --- a/src/boot/stub.c +++ b/src/boot/stub.c @@ -11,10 +11,10 @@ #include "export-vars.h" #include "graphics.h" #include "initrd.h" -#include "iovec-util-fundamental.h" +#include "iovec-util.h" #include "linux.h" #include "measure.h" -#include "memory-util-fundamental.h" +#include "memory-util.h" #include "part-discovery.h" #include "pe.h" #include "proto/shell-parameters.h" diff --git a/src/boot/util.c b/src/boot/util.c index 22981bc00d..e0d2788c20 100644 --- a/src/boot/util.c +++ b/src/boot/util.c @@ -4,10 +4,10 @@ #include "efi-log.h" #include "efi-string.h" -#include "memory-util-fundamental.h" +#include "memory-util.h" #include "proto/device-path.h" #include "proto/simple-text-io.h" -#include "string-util-fundamental.h" +#include "string-util.h" #include "util.h" #include "version.h" diff --git a/src/boot/util.h b/src/boot/util.h index fa552d6f46..89f1184762 100644 --- a/src/boot/util.h +++ b/src/boot/util.h @@ -2,7 +2,7 @@ #pragma once #include "efi.h" -#include "memory-util-fundamental.h" +#include "memory-util.h" #if SD_BOOT diff --git a/src/boot/vmm.c b/src/boot/vmm.c index da17e4584a..902f61b41c 100644 --- a/src/boot/vmm.c +++ b/src/boot/vmm.c @@ -4,7 +4,7 @@ # include #endif -#include "confidential-virt-fundamental.h" +#include "confidential-virt.h" #include "device-path-util.h" #include "drivers.h" #include "efi-string.h" diff --git a/src/bootctl/bootctl-install.c b/src/bootctl/bootctl-install.c index 2ad76264fa..77d03e72b6 100644 --- a/src/bootctl/bootctl-install.c +++ b/src/bootctl/bootctl-install.c @@ -19,7 +19,7 @@ #include "crypto-util.h" #include "dirent-util.h" #include "efi-api.h" -#include "efi-fundamental.h" +#include "efi.h" #include "efivars.h" #include "env-file.h" #include "fd-util.h" diff --git a/src/core/automount.c b/src/core/automount.c index 5fd9c8f4cc..a0529cda5f 100644 --- a/src/core/automount.c +++ b/src/core/automount.c @@ -20,7 +20,7 @@ #include "io-util.h" #include "label-util.h" #include "manager.h" -#include "mkdir-label.h" +#include "mkdir.h" #include "mount.h" #include "mount-util.h" #include "mountpoint-util.h" diff --git a/src/core/exec-credential.c b/src/core/exec-credential.c index c1b2fcda85..13ecf72f49 100644 --- a/src/core/exec-credential.c +++ b/src/core/exec-credential.c @@ -17,7 +17,7 @@ #include "label-util.h" #include "log.h" #include "manager.h" -#include "mkdir-label.h" +#include "mkdir.h" #include "mount-util.h" #include "mountpoint-util.h" #include "namespace-util.h" diff --git a/src/core/exec-invoke.c b/src/core/exec-invoke.c index b82f7b995b..9004ad88d0 100644 --- a/src/core/exec-invoke.c +++ b/src/core/exec-invoke.c @@ -53,7 +53,7 @@ #include "libmount-util.h" #include "manager.h" #include "memfd-util.h" -#include "mkdir-label.h" +#include "mkdir.h" #include "mount-util.h" #include "mountpoint-util.h" #include "mstack.h" diff --git a/src/core/generator-setup.c b/src/core/generator-setup.c index d63a393d98..804eb11f14 100644 --- a/src/core/generator-setup.c +++ b/src/core/generator-setup.c @@ -4,7 +4,7 @@ #include "errno-util.h" #include "generator-setup.h" -#include "mkdir-label.h" +#include "mkdir.h" #include "path-lookup.h" #include "rm-rf.h" diff --git a/src/core/import-creds.c b/src/core/import-creds.c index 89f0c55707..488d63eb41 100644 --- a/src/core/import-creds.c +++ b/src/core/import-creds.c @@ -17,7 +17,7 @@ #include "initrd-util.h" #include "io-util.h" #include "log.h" -#include "mkdir-label.h" +#include "mkdir.h" #include "mount-util.h" #include "mountpoint-util.h" #include "parse-util.h" diff --git a/src/core/main.c b/src/core/main.c index 0b88afae62..7815691133 100644 --- a/src/core/main.c +++ b/src/core/main.c @@ -78,7 +78,7 @@ #include "manager.h" #include "manager-dump.h" #include "manager-serialize.h" -#include "mkdir-label.h" +#include "mkdir.h" #include "mount-setup.h" #include "mount-util.h" #include "options.h" diff --git a/src/core/manager.c b/src/core/manager.c index 165914b2a5..bb8a735683 100644 --- a/src/core/manager.c +++ b/src/core/manager.c @@ -61,7 +61,7 @@ #include "manager-dump.h" #include "manager-serialize.h" #include "manager.h" -#include "mkdir-label.h" +#include "mkdir.h" #include "mount-util.h" #include "notify-recv.h" #include "parse-util.h" diff --git a/src/core/meson.build b/src/core/meson.build index e1f315dda6..af50a2a4fa 100644 --- a/src/core/meson.build +++ b/src/core/meson.build @@ -159,7 +159,7 @@ generated_sources += [load_fragment_gperf_c, load_fragment_gperf_nulstr_c, bpf_d libcore_sources += [load_fragment_gperf_c, load_fragment_gperf_nulstr_c, bpf_delegate_configs_inc] libcore_build_dir = meson.current_build_dir() libcore_name = 'systemd-core-@0@'.format(shared_lib_tag) -core_includes = [includes, include_directories('.')] +core_includes = [include_directories('.'), includes] libcore_static = static_library( libcore_name, diff --git a/src/core/mount.c b/src/core/mount.c index 408274c386..4d5cd35fae 100644 --- a/src/core/mount.c +++ b/src/core/mount.c @@ -23,7 +23,7 @@ #include "libmount-util.h" #include "log.h" #include "manager.h" -#include "mkdir-label.h" +#include "mkdir.h" #include "mount-util.h" #include "mount.h" #include "mount-setup.h" diff --git a/src/core/namespace.c b/src/core/namespace.c index b07b1082ed..49635d3e95 100644 --- a/src/core/namespace.c +++ b/src/core/namespace.c @@ -31,7 +31,7 @@ #include "log.h" #include "loop-util.h" #include "loopback-setup.h" -#include "mkdir-label.h" +#include "mkdir.h" #include "mount-util.h" #include "mountpoint-util.h" #include "mstack.h" diff --git a/src/core/path.c b/src/core/path.c index 18a5e140f1..93e702a481 100644 --- a/src/core/path.c +++ b/src/core/path.c @@ -15,7 +15,7 @@ #include "glob-util.h" #include "inotify-util.h" #include "manager.h" -#include "mkdir-label.h" +#include "mkdir.h" #include "path.h" #include "path-util.h" #include "serialize.h" diff --git a/src/core/socket.c b/src/core/socket.c index 3c4742fba1..2cdb34c4be 100644 --- a/src/core/socket.c +++ b/src/core/socket.c @@ -30,7 +30,7 @@ #include "ip-protocol-list.h" #include "log.h" #include "manager.h" -#include "mkdir-label.h" +#include "mkdir.h" #include "namespace-util.h" #include "parse-util.h" #include "path-util.h" diff --git a/src/core/unit.c b/src/core/unit.c index f81083a70f..d66f813a9a 100644 --- a/src/core/unit.c +++ b/src/core/unit.c @@ -40,7 +40,7 @@ #include "load-fragment.h" #include "log.h" #include "logarithm.h" -#include "mkdir-label.h" +#include "mkdir.h" #include "manager.h" #include "mount-util.h" #include "mountpoint-util.h" diff --git a/src/coredump/coredump-submit.c b/src/coredump/coredump-submit.c index f0c961ded7..a108fe3eb5 100644 --- a/src/coredump/coredump-submit.c +++ b/src/coredump/coredump-submit.c @@ -33,7 +33,7 @@ #include "journal-send.h" #include "json-util.h" #include "log.h" -#include "mkdir-label.h" +#include "mkdir.h" #include "namespace-util.h" #include "path-util.h" #include "process-util.h" diff --git a/src/firstboot/firstboot.c b/src/firstboot/firstboot.c index eac9e7f19b..e328c85500 100644 --- a/src/firstboot/firstboot.c +++ b/src/firstboot/firstboot.c @@ -55,7 +55,7 @@ #include "strv.h" #include "terminal-util.h" #include "time-util.h" -#include "tmpfile-util-label.h" +#include "tmpfile-util.h" #include "user-util.h" #include "vconsole-util.h" diff --git a/src/fundamental/assert-fundamental.h b/src/fundamental/assert-util.h similarity index 99% rename from src/fundamental/assert-fundamental.h rename to src/fundamental/assert-util.h index d3425cb54d..7f173fefb3 100644 --- a/src/fundamental/assert-fundamental.h +++ b/src/fundamental/assert-util.h @@ -5,7 +5,7 @@ # include #endif -#include "macro-fundamental.h" +#include "macro.h" #if SD_BOOT _noreturn_ void efi_assert(const char *expr, const char *file, unsigned line, const char *function); diff --git a/src/fundamental/bootspec-fundamental.c b/src/fundamental/bootspec.c similarity index 98% rename from src/fundamental/bootspec-fundamental.c rename to src/fundamental/bootspec.c index 5ca6674029..6daf48479d 100644 --- a/src/fundamental/bootspec-fundamental.c +++ b/src/fundamental/bootspec.c @@ -1,6 +1,6 @@ /* SPDX-License-Identifier: LGPL-2.1-or-later */ -#include "bootspec-fundamental.h" +#include "bootspec.h" bool bootspec_pick_name_version_sort_key( const sd_char *os_pretty_name, diff --git a/src/fundamental/bootspec-fundamental.h b/src/fundamental/bootspec.h similarity index 94% rename from src/fundamental/bootspec-fundamental.h rename to src/fundamental/bootspec.h index 19b489ccf5..50722d2b34 100644 --- a/src/fundamental/bootspec-fundamental.h +++ b/src/fundamental/bootspec.h @@ -1,7 +1,7 @@ /* SPDX-License-Identifier: LGPL-2.1-or-later */ #pragma once -#include "string-util-fundamental.h" +#include "string-util.h" bool bootspec_pick_name_version_sort_key( const sd_char *os_pretty_name, diff --git a/src/fundamental/chid-fundamental.c b/src/fundamental/chid.c similarity index 98% rename from src/fundamental/chid-fundamental.c rename to src/fundamental/chid.c index 474aab7484..28bc4572f0 100644 --- a/src/fundamental/chid-fundamental.c +++ b/src/fundamental/chid.c @@ -24,10 +24,10 @@ #define strlen16 char16_strlen #endif -#include "chid-fundamental.h" -#include "macro-fundamental.h" -#include "memory-util-fundamental.h" -#include "sha1-fundamental.h" +#include "chid.h" +#include "macro.h" +#include "memory-util.h" +#include "sha1.h" static void get_chid( const char16_t *const smbios_fields[static _CHID_SMBIOS_FIELDS_MAX], diff --git a/src/fundamental/chid-fundamental.h b/src/fundamental/chid.h similarity index 94% rename from src/fundamental/chid-fundamental.h rename to src/fundamental/chid.h index a0e77dd9b0..1d5247bf12 100644 --- a/src/fundamental/chid-fundamental.h +++ b/src/fundamental/chid.h @@ -2,14 +2,12 @@ #pragma once -#if SD_BOOT -# include "efi.h" -#else +#include "efi.h" + +#if !SD_BOOT # include #endif -#include "efi-fundamental.h" - #define CHID_TYPES_MAX 18 /* Any chids starting from EXTRA_CHID_BASE are non-standard and are subject to change and renumeration at any time */ #define EXTRA_CHID_BASE 15 diff --git a/src/fundamental/cleanup-fundamental.h b/src/fundamental/cleanup-util.h similarity index 99% rename from src/fundamental/cleanup-fundamental.h rename to src/fundamental/cleanup-util.h index b9f9c07245..538469f255 100644 --- a/src/fundamental/cleanup-fundamental.h +++ b/src/fundamental/cleanup-util.h @@ -1,7 +1,7 @@ /* SPDX-License-Identifier: LGPL-2.1-or-later */ #pragma once -#include "assert-fundamental.h" +#include "assert-util.h" /* A wrapper for 'func' to return void. * Only useful when a void-returning function is required by some API. */ diff --git a/src/fundamental/confidential-virt-fundamental.h b/src/fundamental/confidential-virt.h similarity index 100% rename from src/fundamental/confidential-virt-fundamental.h rename to src/fundamental/confidential-virt.h diff --git a/src/fundamental/edid-fundamental.c b/src/fundamental/edid.c similarity index 97% rename from src/fundamental/edid-fundamental.c rename to src/fundamental/edid.c index bfd314e444..980a3989b7 100644 --- a/src/fundamental/edid-fundamental.c +++ b/src/fundamental/edid.c @@ -4,8 +4,8 @@ #include #endif -#include "edid-fundamental.h" -#include "efivars-fundamental.h" +#include "edid.h" +#include "efivars.h" #define EDID_FIXED_HEADER_PATTERN "\x00\xFF\xFF\xFF\xFF\xFF\xFF" assert_cc(sizeof_field(EdidHeader, pattern) == sizeof(EDID_FIXED_HEADER_PATTERN)); diff --git a/src/fundamental/edid-fundamental.h b/src/fundamental/edid.h similarity index 97% rename from src/fundamental/edid-fundamental.h rename to src/fundamental/edid.h index 2a76c4524d..6c5930f4c6 100644 --- a/src/fundamental/edid-fundamental.h +++ b/src/fundamental/edid.h @@ -10,7 +10,7 @@ # include #endif -#include "macro-fundamental.h" +#include "macro.h" /* EDID structure, version 1.4 */ typedef struct EdidHeader { diff --git a/src/fundamental/efi-fundamental.h b/src/fundamental/efi.h similarity index 100% rename from src/fundamental/efi-fundamental.h rename to src/fundamental/efi.h diff --git a/src/fundamental/efivars-fundamental.c b/src/fundamental/efivars.c similarity index 98% rename from src/fundamental/efivars-fundamental.c rename to src/fundamental/efivars.c index 611b0b682d..87dc1fff8f 100644 --- a/src/fundamental/efivars-fundamental.c +++ b/src/fundamental/efivars.c @@ -1,6 +1,6 @@ /* SPDX-License-Identifier: LGPL-2.1-or-later */ -#include "efivars-fundamental.h" +#include "efivars.h" static const sd_char * const table[_SECURE_BOOT_MAX] = { [SECURE_BOOT_UNSUPPORTED] = STR_C("unsupported"), diff --git a/src/fundamental/efivars-fundamental.h b/src/fundamental/efivars.h similarity index 98% rename from src/fundamental/efivars-fundamental.h rename to src/fundamental/efivars.h index fea23fa29c..eddda7c23a 100644 --- a/src/fundamental/efivars-fundamental.h +++ b/src/fundamental/efivars.h @@ -6,7 +6,7 @@ #else # include #endif -#include "string-util-fundamental.h" +#include "string-util.h" /* Features of the loader, i.e. systemd-boot */ #define EFI_LOADER_FEATURE_CONFIG_TIMEOUT (UINT64_C(1) << 0) diff --git a/src/fundamental/iovec-util-fundamental.h b/src/fundamental/iovec-util.h similarity index 96% rename from src/fundamental/iovec-util-fundamental.h rename to src/fundamental/iovec-util.h index 5b693742f3..7d8f65db43 100644 --- a/src/fundamental/iovec-util-fundamental.h +++ b/src/fundamental/iovec-util.h @@ -5,8 +5,8 @@ #include #endif -#include "assert-fundamental.h" /* IWYU pragma: keep */ -#include "macro-fundamental.h" +#include "assert-util.h" /* IWYU pragma: keep */ +#include "macro.h" #if SD_BOOT /* struct iovec is a POSIX userspace construct. Let's introduce it also in EFI mode, it's just so useful */ diff --git a/src/fundamental/macro-fundamental.h b/src/fundamental/macro.h similarity index 100% rename from src/fundamental/macro-fundamental.h rename to src/fundamental/macro.h diff --git a/src/fundamental/memory-util-fundamental.c b/src/fundamental/memory-util.c similarity index 95% rename from src/fundamental/memory-util-fundamental.c rename to src/fundamental/memory-util.c index 1a64fbe514..39d116cc8b 100644 --- a/src/fundamental/memory-util-fundamental.c +++ b/src/fundamental/memory-util.c @@ -1,6 +1,6 @@ /* SPDX-License-Identifier: LGPL-2.1-or-later */ -#include "memory-util-fundamental.h" +#include "memory-util.h" bool memeqbyte(uint8_t byte, const void *data, size_t length) { assert(data || length == 0); diff --git a/src/fundamental/memory-util-fundamental.h b/src/fundamental/memory-util.h similarity index 98% rename from src/fundamental/memory-util-fundamental.h rename to src/fundamental/memory-util.h index 7c88264053..55ed19e15c 100644 --- a/src/fundamental/memory-util-fundamental.h +++ b/src/fundamental/memory-util.h @@ -9,8 +9,8 @@ # include #endif -#include "assert-fundamental.h" /* IWYU pragma: keep */ -#include "macro-fundamental.h" +#include "assert-util.h" /* IWYU pragma: keep */ +#include "macro.h" #define memzero(x, l) \ ({ \ diff --git a/src/fundamental/meson.build b/src/fundamental/meson.build index 14d956ac07..93a332ec8a 100644 --- a/src/fundamental/meson.build +++ b/src/fundamental/meson.build @@ -3,15 +3,15 @@ fundamental_include = include_directories('.') fundamental_sources = files( - 'bootspec-fundamental.c', - 'chid-fundamental.c', - 'edid-fundamental.c', - 'efivars-fundamental.c', - 'iovec-util-fundamental.h', - 'memory-util-fundamental.c', - 'sha1-fundamental.c', - 'sha256-fundamental.c', - 'string-util-fundamental.c', + 'bootspec.c', + 'chid.c', + 'edid.c', + 'efivars.c', + 'iovec-util.h', + 'memory-util.c', + 'sha1.c', + 'sha256.c', + 'string-util.c', 'uki.c', ) diff --git a/src/fundamental/sha1-fundamental.c b/src/fundamental/sha1.c similarity index 99% rename from src/fundamental/sha1-fundamental.c rename to src/fundamental/sha1.c index b2af1e9888..1d48d6874a 100644 --- a/src/fundamental/sha1-fundamental.c +++ b/src/fundamental/sha1.c @@ -82,8 +82,8 @@ modified for use with systemd # include #endif -#include "memory-util-fundamental.h" -#include "sha1-fundamental.h" +#include "memory-util.h" +#include "sha1.h" #define SHA1_DIGEST_SIZE 20 diff --git a/src/fundamental/sha1-fundamental.h b/src/fundamental/sha1.h similarity index 100% rename from src/fundamental/sha1-fundamental.h rename to src/fundamental/sha1.h diff --git a/src/fundamental/sha256-fundamental.c b/src/fundamental/sha256.c similarity index 98% rename from src/fundamental/sha256-fundamental.c rename to src/fundamental/sha256.c index 76951ccfad..ac514eddab 100644 --- a/src/fundamental/sha256-fundamental.c +++ b/src/fundamental/sha256.c @@ -27,10 +27,10 @@ # include #endif -#include "assert-fundamental.h" -#include "memory-util-fundamental.h" -#include "sha256-fundamental.h" -#include "unaligned-fundamental.h" +#include "assert-util.h" +#include "memory-util.h" +#include "sha256.h" +#include "unaligned.h" #if __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__ # define SWAP(n) \ diff --git a/src/fundamental/sha256-fundamental.h b/src/fundamental/sha256.h similarity index 100% rename from src/fundamental/sha256-fundamental.h rename to src/fundamental/sha256.h diff --git a/src/fundamental/string-table-fundamental.h b/src/fundamental/string-table.h similarity index 96% rename from src/fundamental/string-table-fundamental.h rename to src/fundamental/string-table.h index d402515068..41c8158689 100644 --- a/src/fundamental/string-table-fundamental.h +++ b/src/fundamental/string-table.h @@ -1,7 +1,7 @@ /* SPDX-License-Identifier: LGPL-2.1-or-later */ #pragma once -#include "macro-fundamental.h" +#include "macro.h" #define DECLARE_STRING_TABLE_LOOKUP_TO_STRING(name, type) \ const char* name##_to_string(type i) _const_ diff --git a/src/fundamental/string-util-fundamental.c b/src/fundamental/string-util.c similarity index 99% rename from src/fundamental/string-util-fundamental.c rename to src/fundamental/string-util.c index 6877dd439a..bd6b81ea14 100644 --- a/src/fundamental/string-util-fundamental.c +++ b/src/fundamental/string-util.c @@ -1,7 +1,7 @@ /* SPDX-License-Identifier: LGPL-2.1-or-later */ -#include "macro-fundamental.h" -#include "string-util-fundamental.h" +#include "macro.h" +#include "string-util.h" sd_char *startswith_internal(const sd_char *s, const sd_char *prefix) { size_t l; diff --git a/src/fundamental/string-util-fundamental.h b/src/fundamental/string-util.h similarity index 97% rename from src/fundamental/string-util-fundamental.h rename to src/fundamental/string-util.h index 83b90e4e9e..c068c1904a 100644 --- a/src/fundamental/string-util-fundamental.h +++ b/src/fundamental/string-util.h @@ -8,8 +8,8 @@ # include #endif -#include "assert-fundamental.h" /* IWYU pragma: keep */ -#include "macro-fundamental.h" +#include "assert-util.h" /* IWYU pragma: keep */ +#include "macro.h" /* What is interpreted as whitespace? */ #define WHITESPACE " \t\n\r" diff --git a/src/fundamental/strv-fundamental.h b/src/fundamental/strv.h similarity index 84% rename from src/fundamental/strv-fundamental.h rename to src/fundamental/strv.h index 7e7e34822f..0ede9c3b79 100644 --- a/src/fundamental/strv-fundamental.h +++ b/src/fundamental/strv.h @@ -1,8 +1,8 @@ /* SPDX-License-Identifier: LGPL-2.1-or-later */ #pragma once -#include "macro-fundamental.h" -#include "string-util-fundamental.h" +#include "macro.h" +#include "string-util.h" #define _STRV_FOREACH(s, l, i) \ for (typeof(*(l)) *s, *i = (l); (s = i) && *i; i++) diff --git a/src/fundamental/unaligned-fundamental.h b/src/fundamental/unaligned.h similarity index 100% rename from src/fundamental/unaligned-fundamental.h rename to src/fundamental/unaligned.h diff --git a/src/import/import-fs.c b/src/import/import-fs.c index 1e6d8beff2..dcb0f8c511 100644 --- a/src/import/import-fs.c +++ b/src/import/import-fs.c @@ -17,7 +17,7 @@ #include "install-file.h" #include "log.h" #include "main-func.h" -#include "mkdir-label.h" +#include "mkdir.h" #include "options.h" #include "parse-argument.h" #include "path-util.h" diff --git a/src/import/import-raw.c b/src/import/import-raw.c index 2095a0dde5..62aaf6bf86 100644 --- a/src/import/import-raw.c +++ b/src/import/import-raw.c @@ -18,7 +18,7 @@ #include "install-file.h" #include "io-util.h" #include "log.h" -#include "mkdir-label.h" +#include "mkdir.h" #include "pretty-print.h" #include "qcow2-util.h" #include "ratelimit.h" diff --git a/src/import/import-tar.c b/src/import/import-tar.c index 06ee56bd78..25e16f671a 100644 --- a/src/import/import-tar.c +++ b/src/import/import-tar.c @@ -20,7 +20,7 @@ #include "install-file.h" #include "io-util.h" #include "log.h" -#include "mkdir-label.h" +#include "mkdir.h" #include "path-util.h" #include "pidref.h" #include "pretty-print.h" diff --git a/src/import/pull-oci.c b/src/import/pull-oci.c index c1c76fc898..b6fa71c902 100644 --- a/src/import/pull-oci.c +++ b/src/import/pull-oci.c @@ -21,7 +21,7 @@ #include "install-file.h" #include "io-util.h" #include "json-util.h" -#include "mkdir-label.h" +#include "mkdir.h" #include "oci-util.h" #include "ordered-set.h" #include "path-util.h" @@ -31,7 +31,7 @@ #include "pull-oci.h" #include "rm-rf.h" #include "set.h" -#include "sha256-fundamental.h" +#include "sha256.h" #include "signal-util.h" #include "stat-util.h" #include "string-util.h" diff --git a/src/import/pull-raw.c b/src/import/pull-raw.c index c63a453177..c069160cb4 100644 --- a/src/import/pull-raw.c +++ b/src/import/pull-raw.c @@ -15,7 +15,7 @@ #include "install-file.h" #include "iovec-util.h" #include "log.h" -#include "mkdir-label.h" +#include "mkdir.h" #include "pull-common.h" #include "pull-job.h" #include "pull-raw.h" diff --git a/src/import/pull-tar.c b/src/import/pull-tar.c index 453ad1187c..bf62b2e780 100644 --- a/src/import/pull-tar.c +++ b/src/import/pull-tar.c @@ -16,7 +16,7 @@ #include "fs-util.h" #include "install-file.h" #include "log.h" -#include "mkdir-label.h" +#include "mkdir.h" #include "path-util.h" #include "pidref.h" #include "pretty-print.h" diff --git a/src/include/override/sys/param.h b/src/include/override/sys/param.h index 88cc47edf4..2a4410f526 100644 --- a/src/include/override/sys/param.h +++ b/src/include/override/sys/param.h @@ -3,6 +3,6 @@ /* sys/param.h from glibc unconditionally overrides the MIN() and MAX() macros which interferes with our own * MAX() macro. It also includes a bunch of other headers transitively so we don't want to include - * sys/param.h in macro-fundamental.h unconditionally. We'd like to make including this file an error but + * sys/param.h in macro.h unconditionally. We'd like to make including this file an error but * unfortunately includes it. However, doesn't actually make use of anything from * sys/param.h, so we override it with an empty file so it can't mess with our macros. */ diff --git a/src/libsystemd-network/meson.build b/src/libsystemd-network/meson.build index ab1ac35409..b9b8c7062e 100644 --- a/src/libsystemd-network/meson.build +++ b/src/libsystemd-network/meson.build @@ -53,7 +53,7 @@ libsystemd_network = static_library( dependencies : userspace, build_by_default : false) -libsystemd_network_includes = [includes, include_directories('.')] +libsystemd_network_includes = [include_directories('.'), includes] ############################################################ diff --git a/src/libsystemd/sd-bus/test-bus-marshal.c b/src/libsystemd/sd-bus/test-bus-marshal.c index 9bf8889f4a..05074fd92b 100644 --- a/src/libsystemd/sd-bus/test-bus-marshal.c +++ b/src/libsystemd/sd-bus/test-bus-marshal.c @@ -2,7 +2,7 @@ /* We make an exception here to our usual "include system headers first" rule because we need one of these * macros to disable a warning triggered by the glib headers. */ -#include "macro-fundamental.h" +#include "macro.h" #if HAVE_GLIB DISABLE_WARNING_FORMAT_NONLITERAL diff --git a/src/libudev/meson.build b/src/libudev/meson.build index eb9dda79ae..854628aed4 100644 --- a/src/libudev/meson.build +++ b/src/libudev/meson.build @@ -15,7 +15,7 @@ sources += libudev_sources ############################################################ -libudev_includes = [includes, include_directories('.')] +libudev_includes = [include_directories('.'), includes] libudev_dir_path = meson.current_source_dir() diff --git a/src/locale/localed-util.c b/src/locale/localed-util.c index 25c361d400..ab2abd7dae 100644 --- a/src/locale/localed-util.c +++ b/src/locale/localed-util.c @@ -17,7 +17,7 @@ #include "kbd-util.h" #include "localed-util.h" #include "log.h" -#include "mkdir-label.h" +#include "mkdir.h" #include "stat-util.h" #include "string-util.h" #include "strv.h" diff --git a/src/login/logind-dbus.c b/src/login/logind-dbus.c index 14208bc149..5ff5a1f656 100644 --- a/src/login/logind-dbus.c +++ b/src/login/logind-dbus.c @@ -49,7 +49,7 @@ #include "logind-user.h" #include "logind-user-dbus.h" #include "logind-utmp.h" -#include "mkdir-label.h" +#include "mkdir.h" #include "os-util.h" #include "parse-util.h" #include "path-util.h" diff --git a/src/login/logind-inhibit.c b/src/login/logind-inhibit.c index b78d39d02d..30b43404b1 100644 --- a/src/login/logind-inhibit.c +++ b/src/login/logind-inhibit.c @@ -22,7 +22,7 @@ #include "logind.h" #include "logind-dbus.h" #include "logind-inhibit.h" -#include "mkdir-label.h" +#include "mkdir.h" #include "parse-util.h" #include "path-util.h" #include "string-table.h" diff --git a/src/login/logind-seat.c b/src/login/logind-seat.c index 77f006a479..66c27d3d73 100644 --- a/src/login/logind-seat.c +++ b/src/login/logind-seat.c @@ -25,7 +25,7 @@ #include "logind-session-dbus.h" #include "logind-session-device.h" #include "logind-user.h" -#include "mkdir-label.h" +#include "mkdir.h" #include "path-util.h" #include "set.h" #include "stat-util.h" diff --git a/src/login/logind-session.c b/src/login/logind-session.c index 72cad13665..420ec81008 100644 --- a/src/login/logind-session.c +++ b/src/login/logind-session.c @@ -39,7 +39,7 @@ #include "logind-user.h" #include "logind-user-dbus.h" #include "logind-varlink.h" -#include "mkdir-label.h" +#include "mkdir.h" #include "parse-util.h" #include "path-util.h" #include "process-util.h" diff --git a/src/login/logind-user.c b/src/login/logind-user.c index 49d51952e9..0595ce5bd2 100644 --- a/src/login/logind-user.c +++ b/src/login/logind-user.c @@ -24,7 +24,7 @@ #include "logind-seat.h" #include "logind-user.h" #include "logind-user-dbus.h" -#include "mkdir-label.h" +#include "mkdir.h" #include "parse-util.h" #include "percent-util.h" #include "serialize.h" diff --git a/src/login/logind.c b/src/login/logind.c index 2b7984051e..c19c1cb791 100644 --- a/src/login/logind.c +++ b/src/login/logind.c @@ -35,7 +35,7 @@ #include "logind-utmp.h" #include "logind-varlink.h" #include "main-func.h" -#include "mkdir-label.h" +#include "mkdir.h" #include "parse-util.h" #include "process-util.h" #include "service-util.h" diff --git a/src/login/user-runtime-dir.c b/src/login/user-runtime-dir.c index 6cf157ffad..cb623d98e5 100644 --- a/src/login/user-runtime-dir.c +++ b/src/login/user-runtime-dir.c @@ -16,7 +16,7 @@ #include "limits-util.h" #include "log.h" #include "main-func.h" -#include "mkdir-label.h" +#include "mkdir.h" #include "mount-util.h" #include "mountpoint-util.h" #include "path-util.h" diff --git a/src/machine/machine.c b/src/machine/machine.c index 63fed79687..56d93ae560 100644 --- a/src/machine/machine.c +++ b/src/machine/machine.c @@ -26,7 +26,7 @@ #include "machine-dbus.h" #include "machined-resolve-hook.h" #include "machined.h" -#include "mkdir-label.h" +#include "mkdir.h" #include "namespace-util.h" #include "operation.h" #include "parse-util.h" diff --git a/src/machine/machined.c b/src/machine/machined.c index 7c1f57baac..c419571dee 100644 --- a/src/machine/machined.c +++ b/src/machine/machined.c @@ -26,7 +26,7 @@ #include "machined-dbus.h" #include "machined-varlink.h" #include "main-func.h" -#include "mkdir-label.h" +#include "mkdir.h" #include "operation.h" #include "path-lookup.h" #include "service-util.h" diff --git a/src/network/meson.build b/src/network/meson.build index 23f6f3a4fe..9844229ebd 100644 --- a/src/network/meson.build +++ b/src/network/meson.build @@ -169,7 +169,7 @@ else libshared_static] endif -network_includes = [libsystemd_network_includes, include_directories(['.', 'netdev', 'tc'])] +network_includes = [include_directories(['.', 'netdev', 'tc']), libsystemd_network_includes] network_test_template = test_template + { 'conditions' : ['ENABLE_NETWORKD'], diff --git a/src/network/networkctl-config-file.c b/src/network/networkctl-config-file.c index 43729c3765..f69c509023 100644 --- a/src/network/networkctl-config-file.c +++ b/src/network/networkctl-config-file.c @@ -14,7 +14,7 @@ #include "extract-word.h" #include "fd-util.h" #include "log.h" -#include "mkdir-label.h" +#include "mkdir.h" #include "netlink-util.h" #include "network-util.h" #include "networkctl.h" diff --git a/src/network/networkd.c b/src/network/networkd.c index 3e0666610b..73e03c2a25 100644 --- a/src/network/networkd.c +++ b/src/network/networkd.c @@ -10,7 +10,7 @@ #include "capability-util.h" #include "daemon-util.h" #include "main-func.h" -#include "mkdir-label.h" +#include "mkdir.h" #include "networkd-conf.h" #include "networkd-manager.h" #include "networkd-manager-bus.h" diff --git a/src/nspawn/meson.build b/src/nspawn/meson.build index 815b74cb15..95bc461cc5 100644 --- a/src/nspawn/meson.build +++ b/src/nspawn/meson.build @@ -43,8 +43,8 @@ executables += [ 'sources' : nspawn_sources, 'extract' : nspawn_extract_sources, 'include_directories' : [ + include_directories('.'), executable_template['include_directories'], - include_directories('.') ], 'dependencies' : [ libmount_cflags, diff --git a/src/nspawn/nspawn-mount.c b/src/nspawn/nspawn-mount.c index a75582e2b4..3b57a75070 100644 --- a/src/nspawn/nspawn-mount.c +++ b/src/nspawn/nspawn-mount.c @@ -14,7 +14,7 @@ #include "format-util.h" #include "fs-util.h" #include "log.h" -#include "mkdir-label.h" +#include "mkdir.h" #include "mount-util.h" #include "mountpoint-util.h" #include "namespace-util.h" diff --git a/src/nss-resolve/meson.build b/src/nss-resolve/meson.build index 1fae426636..63332913c7 100644 --- a/src/nss-resolve/meson.build +++ b/src/nss-resolve/meson.build @@ -6,7 +6,7 @@ modules += [ 'conditions' : ['ENABLE_NSS_RESOLVE'], 'sources' : files('nss-resolve.c'), 'version-script' : meson.current_source_dir() / 'nss-resolve.sym', - 'include_directories' : includes + - include_directories('../resolve'), + 'include_directories' : [include_directories('../resolve'), + includes], }, ] diff --git a/src/pcrlock/pcrlock.c b/src/pcrlock/pcrlock.c index 9ce991262e..fa2ee54c57 100644 --- a/src/pcrlock/pcrlock.c +++ b/src/pcrlock/pcrlock.c @@ -36,7 +36,7 @@ #include "label-util.h" #include "list.h" #include "main-func.h" -#include "mkdir-label.h" +#include "mkdir.h" #include "options.h" #include "ordered-set.h" #include "parse-argument.h" diff --git a/src/resolve/resolved-resolv-conf.c b/src/resolve/resolved-resolv-conf.c index 5052bb531e..cae546ff82 100644 --- a/src/resolve/resolved-resolv-conf.c +++ b/src/resolve/resolved-resolv-conf.c @@ -21,7 +21,7 @@ #include "string-table.h" #include "string-util.h" #include "strv.h" -#include "tmpfile-util-label.h" +#include "tmpfile-util.h" int manager_check_resolv_conf(const Manager *m) { struct stat st, own; diff --git a/src/resolve/resolved-socket-graveyard.c b/src/resolve/resolved-socket-graveyard.c index bfa3055ded..753570f7ad 100644 --- a/src/resolve/resolved-socket-graveyard.c +++ b/src/resolve/resolved-socket-graveyard.c @@ -2,7 +2,7 @@ #include "sd-event.h" #include "alloc-util.h" -#include "assert-fundamental.h" +#include "assert-util.h" #include "log.h" #include "resolved-manager.h" #include "resolved-socket-graveyard.h" diff --git a/src/resolve/resolved.c b/src/resolve/resolved.c index aa165927a4..aaf206ac2c 100644 --- a/src/resolve/resolved.c +++ b/src/resolve/resolved.c @@ -12,7 +12,7 @@ #include "label-util.h" #include "log.h" #include "main-func.h" -#include "mkdir-label.h" +#include "mkdir.h" #include "resolved-bus.h" #include "resolved-manager.h" #include "resolved-resolv-conf.h" diff --git a/src/sbsign/sbsign.c b/src/sbsign/sbsign.c index f845bcdf42..1d690220d1 100644 --- a/src/sbsign/sbsign.c +++ b/src/sbsign/sbsign.c @@ -9,7 +9,7 @@ #include "build.h" #include "copy.h" #include "crypto-util.h" -#include "efi-fundamental.h" +#include "efi.h" #include "fd-util.h" #include "fileio.h" #include "format-table.h" diff --git a/src/shared/bootspec.c b/src/shared/bootspec.c index a167e19a90..77ee218996 100644 --- a/src/shared/bootspec.c +++ b/src/shared/bootspec.c @@ -7,7 +7,6 @@ #include "alloc-util.h" #include "bootspec.h" -#include "bootspec-fundamental.h" #include "chase.h" #include "devnum-util.h" #include "dirent-util.h" diff --git a/src/shared/bootspec.h b/src/shared/bootspec.h index 677667383c..0560bfb3a4 100644 --- a/src/shared/bootspec.h +++ b/src/shared/bootspec.h @@ -4,6 +4,8 @@ #include "shared-forward.h" +#include "../fundamental/bootspec.h" /* IWYU pragma: export */ + typedef enum BootEntryType { BOOT_ENTRY_TYPE1, /* Boot Loader Specification Type #1 entries: *.conf files */ BOOT_ENTRY_TYPE2, /* Boot Loader Specification Type #2 entries: *.efi files (UKIs) */ diff --git a/src/shared/btrfs-util.h b/src/shared/btrfs-util.h index da7c897945..da7c0481a6 100644 --- a/src/shared/btrfs-util.h +++ b/src/shared/btrfs-util.h @@ -3,9 +3,10 @@ #include "sd-id128.h" -#include "btrfs.h" /* IWYU pragma: export */ #include "shared-forward.h" +#include "../basic/btrfs-util.h" /* IWYU pragma: export */ + typedef struct BtrfsSubvolInfo { uint64_t subvol_id; usec_t otime; /* creation time */ diff --git a/src/shared/copy.c b/src/shared/copy.c index 5b68bb9a5a..fbcb8e2a30 100644 --- a/src/shared/copy.c +++ b/src/shared/copy.c @@ -12,7 +12,7 @@ #include #include "alloc-util.h" -#include "btrfs.h" +#include "btrfs-util.h" #include "chattr-util.h" #include "copy.h" #include "dirent-util.h" diff --git a/src/shared/creds-util.c b/src/shared/creds-util.c index dd2a93844d..6ed4337353 100644 --- a/src/shared/creds-util.c +++ b/src/shared/creds-util.c @@ -28,7 +28,7 @@ #include "json-util.h" #include "log.h" #include "memory-util.h" -#include "mkdir-label.h" +#include "mkdir.h" #include "parse-util.h" #include "path-util.h" #include "random-util.h" diff --git a/src/shared/dev-setup.c b/src/shared/dev-setup.c index e79db91dde..9424e22001 100644 --- a/src/shared/dev-setup.c +++ b/src/shared/dev-setup.c @@ -9,7 +9,7 @@ #include "fs-util.h" #include "label-util.h" #include "log.h" -#include "mkdir-label.h" +#include "mkdir.h" #include "nulstr-util.h" #include "path-util.h" #include "stat-util.h" diff --git a/src/shared/dissect-image.c b/src/shared/dissect-image.c index 8483a16e94..17c14db3ff 100644 --- a/src/shared/dissect-image.c +++ b/src/shared/dissect-image.c @@ -47,7 +47,7 @@ #include "json-util.h" #include "libmount-util.h" #include "loop-util.h" -#include "mkdir-label.h" +#include "mkdir.h" #include "mount-util.h" #include "mountpoint-util.h" #include "namespace-util.h" diff --git a/src/shared/edit-util.c b/src/shared/edit-util.c index d48c36c1d5..4180d2a6f7 100644 --- a/src/shared/edit-util.c +++ b/src/shared/edit-util.c @@ -13,12 +13,12 @@ #include "fileio.h" #include "fs-util.h" #include "log.h" -#include "mkdir-label.h" +#include "mkdir.h" #include "path-util.h" #include "process-util.h" #include "string-util.h" #include "strv.h" -#include "tmpfile-util-label.h" +#include "tmpfile-util.h" typedef struct EditFile { EditFileContext *context; diff --git a/src/shared/efi-api.c b/src/shared/efi-api.c index 8a3a40cbec..c205ffb900 100644 --- a/src/shared/efi-api.c +++ b/src/shared/efi-api.c @@ -5,7 +5,7 @@ #include "alloc-util.h" #include "dirent-util.h" #include "efi-api.h" -#include "efi-fundamental.h" +#include "efi.h" #include "efivars.h" #include "fd-util.h" #include "fileio.h" diff --git a/src/shared/ethtool-util.c b/src/shared/ethtool-util.c index 74a979c184..44e9c49e81 100644 --- a/src/shared/ethtool-util.c +++ b/src/shared/ethtool-util.c @@ -13,7 +13,7 @@ #include "extract-word.h" #include "fd-util.h" #include "log.h" -#include "macro-fundamental.h" +#include "macro.h" #include "memory-util.h" #include "parse-util.h" #include "socket-util.h" diff --git a/src/shared/generator.c b/src/shared/generator.c index 5e2f8f6e0e..36fdff5263 100644 --- a/src/shared/generator.c +++ b/src/shared/generator.c @@ -14,7 +14,7 @@ #include "generator.h" #include "initrd-util.h" #include "log.h" -#include "mkdir-label.h" +#include "mkdir.h" #include "mountpoint-util.h" #include "parse-util.h" #include "path-util.h" diff --git a/src/shared/hwdb-util.c b/src/shared/hwdb-util.c index 46c3f26a9b..b42681a289 100644 --- a/src/shared/hwdb-util.c +++ b/src/shared/hwdb-util.c @@ -15,7 +15,7 @@ #include "hwdb-util.h" #include "label-util.h" #include "log.h" -#include "mkdir-label.h" +#include "mkdir.h" #include "nulstr-util.h" #include "path-util.h" #include "sort-util.h" diff --git a/src/shared/install.c b/src/shared/install.c index d01906c205..6fc43a8df4 100644 --- a/src/shared/install.c +++ b/src/shared/install.c @@ -22,7 +22,7 @@ #include "install.h" #include "install-printf.h" #include "log.h" -#include "mkdir-label.h" +#include "mkdir.h" #include "path-lookup.h" #include "path-util.h" #include "rm-rf.h" diff --git a/src/shared/label-util.h b/src/shared/label-util.h index c7ed307dee..720bd06533 100644 --- a/src/shared/label-util.h +++ b/src/shared/label-util.h @@ -2,7 +2,8 @@ #pragma once #include "shared-forward.h" -#include "label.h" /* IWYU pragma: export */ + +#include "../basic/label-util.h" /* IWYU pragma: export */ typedef enum LabelFixFlags { LABEL_IGNORE_ENOENT = 1 << 0, diff --git a/src/shared/meson.build b/src/shared/meson.build index 55cf8364d3..4d11a2637f 100644 --- a/src/shared/meson.build +++ b/src/shared/meson.build @@ -139,7 +139,7 @@ shared_sources = files( 'main-func.c', 'metrics.c', 'microhttpd-util.c', - 'mkdir-label.c', + 'mkdir.c', 'mkfs-util.c', 'module-util.c', 'mount-setup.c', @@ -204,7 +204,7 @@ shared_sources = files( 'switch-root.c', 'swtpm-util.c', 'tar-util.c', - 'tmpfile-util-label.c', + 'tmpfile-util.c', 'tomoyo-util.c', 'tpm2-util.c', 'tpm2-event-log.c', diff --git a/src/shared/mkdir-label.c b/src/shared/mkdir.c similarity index 98% rename from src/shared/mkdir-label.c rename to src/shared/mkdir.c index 36473b1066..1228bca19b 100644 --- a/src/shared/mkdir-label.c +++ b/src/shared/mkdir.c @@ -4,7 +4,7 @@ #include "errno-util.h" #include "label-util.h" /* IWYU pragma: keep */ -#include "mkdir-label.h" +#include "mkdir.h" #include "selinux-util.h" #include "smack-util.h" diff --git a/src/shared/mkdir-label.h b/src/shared/mkdir.h similarity index 93% rename from src/shared/mkdir-label.h rename to src/shared/mkdir.h index c884190a0e..b02e02a8f0 100644 --- a/src/shared/mkdir-label.h +++ b/src/shared/mkdir.h @@ -2,7 +2,8 @@ #pragma once #include "shared-forward.h" -#include "mkdir.h" + +#include "../basic/mkdir.h" /* IWYU pragma: export */ int mkdirat_label(int dirfd, const char *path, mode_t mode); diff --git a/src/shared/mount-setup.c b/src/shared/mount-setup.c index 8c6cd2b12b..f402990cf7 100644 --- a/src/shared/mount-setup.c +++ b/src/shared/mount-setup.c @@ -12,7 +12,7 @@ #include "fileio.h" #include "label-util.h" #include "log.h" -#include "mkdir-label.h" +#include "mkdir.h" #include "mount-setup.h" #include "mount-util.h" #include "mountpoint-util.h" diff --git a/src/shared/mount-util.c b/src/shared/mount-util.c index 12d3da82e2..cda0070b14 100644 --- a/src/shared/mount-util.c +++ b/src/shared/mount-util.c @@ -21,7 +21,7 @@ #include "hashmap.h" #include "libmount-util.h" #include "log.h" -#include "mkdir-label.h" +#include "mkdir.h" #include "mount-util.h" #include "mountpoint-util.h" #include "namespace-util.h" diff --git a/src/shared/resize-fs.c b/src/shared/resize-fs.c index 147af7ec33..7a78546664 100644 --- a/src/shared/resize-fs.c +++ b/src/shared/resize-fs.c @@ -10,7 +10,7 @@ #include "resize-fs.h" #include "stat-util.h" #include "stdio-util.h" -#include "string-util-fundamental.h" +#include "string-util.h" int resize_fs(int fd, uint64_t sz, uint64_t *ret_size) { struct statfs sfs; diff --git a/src/shared/selinux-util.c b/src/shared/selinux-util.c index 6c83f3fdd2..81ec4a9ba6 100644 --- a/src/shared/selinux-util.c +++ b/src/shared/selinux-util.c @@ -21,7 +21,6 @@ #include "alloc-util.h" #include "fd-util.h" -#include "label.h" #include "path-util.h" #include "string-util.h" #include "time-util.h" diff --git a/src/shared/smack-util.c b/src/shared/smack-util.c index e1dbf8686e..6380a4e3af 100644 --- a/src/shared/smack-util.c +++ b/src/shared/smack-util.c @@ -13,7 +13,6 @@ #include "errno-util.h" #include "fd-util.h" #include "fileio.h" -#include "label.h" #include "label-util.h" #include "log.h" #include "path-util.h" diff --git a/src/shared/socket-label.c b/src/shared/socket-label.c index 3f2ac99b9b..ea1116983e 100644 --- a/src/shared/socket-label.c +++ b/src/shared/socket-label.c @@ -7,7 +7,7 @@ #include "fd-util.h" #include "fs-util.h" #include "log.h" -#include "mkdir-label.h" +#include "mkdir.h" #include "parse-util.h" #include "selinux-util.h" #include "smack-util.h" diff --git a/src/shared/storage-util.h b/src/shared/storage-util.h index b37515bedb..fe78112d24 100644 --- a/src/shared/storage-util.h +++ b/src/shared/storage-util.h @@ -3,7 +3,6 @@ #include "sd-json.h" -#include "string-table-fundamental.h" #include "string-util.h" /* This closely follows the kernel's inode type naming, i.e. is supposed to be a subset of what diff --git a/src/shared/switch-root.c b/src/shared/switch-root.c index 08710a8966..3bb2611523 100644 --- a/src/shared/switch-root.c +++ b/src/shared/switch-root.c @@ -11,7 +11,7 @@ #include "errno-util.h" #include "fd-util.h" #include "log.h" -#include "mkdir-label.h" +#include "mkdir.h" #include "mount-util.h" #include "mountpoint-util.h" #include "rm-rf.h" diff --git a/src/shared/tmpfile-util-label.c b/src/shared/tmpfile-util.c similarity index 95% rename from src/shared/tmpfile-util-label.c rename to src/shared/tmpfile-util.c index b928460f1b..9a5360d6d2 100644 --- a/src/shared/tmpfile-util-label.c +++ b/src/shared/tmpfile-util.c @@ -4,7 +4,6 @@ #include "selinux-util.h" #include "tmpfile-util.h" -#include "tmpfile-util-label.h" int fopen_temporary_at_label( int dir_fd, diff --git a/src/shared/tmpfile-util-label.h b/src/shared/tmpfile-util.h similarity index 50% rename from src/shared/tmpfile-util-label.h rename to src/shared/tmpfile-util.h index d8920cc697..23db87cbb1 100644 --- a/src/shared/tmpfile-util-label.h +++ b/src/shared/tmpfile-util.h @@ -1,11 +1,11 @@ /* SPDX-License-Identifier: LGPL-2.1-or-later */ #pragma once -#include "shared-forward.h" +#include "../basic/tmpfile-util.h" /* IWYU pragma: export */ -/* These functions are split out of tmpfile-util.h (and not for example just flags to the functions they - * wrap) in order to optimize linking: this way, -lselinux is needed only for the callers of these functions - * that need selinux, but not for all. */ +/* These functions extend the basic tmpfile-util.h API with shared-only functionality (selinux labelling). + * Targets that link libshared automatically pick up this version via -Isrc/shared; targets that only have + * src/basic on their include path fall through to the basic header. */ int fopen_temporary_at_label(int dir_fd, const char *target, const char *path, FILE **f, char **temp_path); static inline int fopen_temporary_label(const char *target, const char *path, FILE **f, char **temp_path) { diff --git a/src/shared/tpm2-util.h b/src/shared/tpm2-util.h index b5a8ec1c1e..f2f63a94a4 100644 --- a/src/shared/tpm2-util.h +++ b/src/shared/tpm2-util.h @@ -4,7 +4,7 @@ #include "bitfield.h" #include "iovec-util.h" #include "shared-forward.h" -#include "sha256-fundamental.h" +#include "sha256.h" typedef enum TPM2Flags { TPM2_FLAGS_USE_PIN = 1 << 0, diff --git a/src/systemctl/systemctl-enable.c b/src/systemctl/systemctl-enable.c index 68c349a195..5ad2066557 100644 --- a/src/systemctl/systemctl-enable.c +++ b/src/systemctl/systemctl-enable.c @@ -13,7 +13,6 @@ #include "path-lookup.h" #include "path-util.h" #include "string-util.h" -#include "strv-fundamental.h" #include "strv.h" #include "systemctl.h" #include "systemctl-daemon-reload.h" diff --git a/src/sysusers/sysusers.c b/src/sysusers/sysusers.c index 05a3e2db50..cdbc053f6b 100644 --- a/src/sysusers/sysusers.c +++ b/src/sysusers/sysusers.c @@ -40,7 +40,7 @@ #include "strv.h" #include "sync-util.h" #include "time-util.h" -#include "tmpfile-util-label.h" +#include "tmpfile-util.h" #include "uid-classification.h" #include "uid-range.h" #include "user-util.h" diff --git a/src/test/test-chid.c b/src/test/test-chid.c index 86b748016a..84f7eefac3 100644 --- a/src/test/test-chid.c +++ b/src/test/test-chid.c @@ -1,6 +1,6 @@ /* SPDX-License-Identifier: LGPL-2.1-or-later */ -#include "chid-fundamental.h" +#include "chid.h" #include "tests.h" static const char16_t *const test_fields[_CHID_SMBIOS_FIELDS_MAX] = { diff --git a/src/test/test-label.c b/src/test/test-label.c index 5ce9988ce2..3bd96a3a1b 100644 --- a/src/test/test-label.c +++ b/src/test/test-label.c @@ -7,7 +7,7 @@ #include "errno-util.h" #include "fd-util.h" #include "fs-util.h" -#include "label.h" +#include "label-util.h" #include "path-util.h" #include "string-util.h" #include "tests.h" diff --git a/src/test/test-sha1.c b/src/test/test-sha1.c index 3a5ff148df..6356400c62 100644 --- a/src/test/test-sha1.c +++ b/src/test/test-sha1.c @@ -1,7 +1,7 @@ /* SPDX-License-Identifier: LGPL-2.1-or-later */ #include "hexdecoct.h" -#include "sha1-fundamental.h" +#include "sha1.h" #include "tests.h" static void sha1_process_string(const char *key, struct sha1_ctx *ctx) { diff --git a/src/tmpfiles/tmpfiles.c b/src/tmpfiles/tmpfiles.c index b6007f6207..8b7b676598 100644 --- a/src/tmpfiles/tmpfiles.c +++ b/src/tmpfiles/tmpfiles.c @@ -42,7 +42,7 @@ #include "log.h" #include "loop-util.h" #include "main-func.h" -#include "mkdir-label.h" +#include "mkdir.h" #include "mount-util.h" #include "mountpoint-util.h" #include "offline-passwd.h" diff --git a/src/tty-ask-password-agent/tty-ask-password-agent.c b/src/tty-ask-password-agent/tty-ask-password-agent.c index d675e4269a..c7b1fb3e1f 100644 --- a/src/tty-ask-password-agent/tty-ask-password-agent.c +++ b/src/tty-ask-password-agent/tty-ask-password-agent.c @@ -28,7 +28,7 @@ #include "inotify-util.h" #include "io-util.h" #include "main-func.h" -#include "mkdir-label.h" +#include "mkdir.h" #include "options.h" #include "path-util.h" #include "pidref.h" diff --git a/src/udev/meson.build b/src/udev/meson.build index 7e2435d0fa..375645e759 100644 --- a/src/udev/meson.build +++ b/src/udev/meson.build @@ -150,8 +150,8 @@ udev_binaries_dict = [ keyboard_keys_from_name_inc, 'extract' : udevadm_extract_sources, 'include_directories' : [ - libexec_template['include_directories'], include_directories('.', 'net'), + libexec_template['include_directories'], ], 'dependencies' : udev_dependencies, 'link_with' : udev_link_with, diff --git a/src/udev/test-udev-rule-runner.c b/src/udev/test-udev-rule-runner.c index 1acbe2f090..dfb4b49722 100644 --- a/src/udev/test-udev-rule-runner.c +++ b/src/udev/test-udev-rule-runner.c @@ -12,7 +12,7 @@ #include "label-util.h" #include "log.h" #include "main-func.h" -#include "mkdir-label.h" +#include "mkdir.h" #include "mount-util.h" #include "namespace-util.h" #include "parse-util.h" diff --git a/src/udev/udev-node.c b/src/udev/udev-node.c index 4d1ecf5d11..ba28a8b809 100644 --- a/src/udev/udev-node.c +++ b/src/udev/udev-node.c @@ -20,7 +20,7 @@ #include "hashmap.h" #include "hexdecoct.h" #include "label-util.h" -#include "mkdir-label.h" +#include "mkdir.h" #include "parse-util.h" #include "path-util.h" #include "selinux-util.h"