]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
tree-wide: standardize header names across src/fundamental, src/basic and src/shared
authorDaan De Meyer <daan@amutable.com>
Mon, 18 May 2026 20:29:04 +0000 (20:29 +0000)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Thu, 21 May 2026 01:33:03 +0000 (10:33 +0900)
Drop the -fundamental suffix from src/fundamental/ headers in favor of names
that match their src/basic/ or src/shared/ counterparts (e.g.
macro-fundamental.h -> macro.h, assert-fundamental.h -> assert-util.h,
cleanup-fundamental.h -> cleanup-util.h). Rename src/basic/{btrfs,label}.{c,h}
to use the -util suffix to match the existing shared/btrfs-util and
shared/label-util siblings. Rename src/shared/mkdir-label.{c,h} to mkdir.{c,h}
and src/shared/tmpfile-util-label.{c,h} to tmpfile-util.{c,h} to match the
corresponding src/basic names.

This saves us from having to come up with separate names for files that do
the same thing across tiers, and it makes it easier to move stuff between
src/fundamental, src/basic and src/shared: consumers just #include "foo.h"
and pick up whichever tier their -I path resolves to first, so call sites
don't need to be updated when an API moves between layers.

Where a higher-tier wrapper exists (e.g. src/basic/macro.h wrapping
src/fundamental/macro.h), the wrapper uses an explicit "../fundamental/foo.h"
or "../basic/foo.h" relative include for the lower-tier header. We can't use
GCC's #include_next directive for this — when the wrapper is reachable both
via same-dir-as-source lookup and via -I (e.g. -Isrc/shared) for the
directory it lives in, #include_next advances by exactly one slot in libcpp's
internal directory chain and lands on the same physical directory it was
already in, never reaching the lower-tier sibling (see make_cpp_dir() in
gcc/libcpp/files.cc:1986).

To make sure the right headers are always picked up, the include directories
are reordered so that e.g. src/shared always takes priority over src/basic and
similar for the other directories.

Co-developed-by: Claude Opus 4.7 <noreply@anthropic.com>
166 files changed:
.clangd
LICENSES/README.md
coccinelle/parsing_hacks.h
docs/CODING_STYLE.md
meson.build
src/analyze/analyze-chid.c
src/basic/assert-util.h
src/basic/basic-forward.h
src/basic/btrfs-util.c [moved from src/basic/btrfs.c with 99% similarity]
src/basic/btrfs-util.h [moved from src/basic/btrfs.h with 100% similarity]
src/basic/cleanup-util.h
src/basic/confidential-virt.c
src/basic/confidential-virt.h
src/basic/efivars.h
src/basic/env-file.c
src/basic/fileio.c
src/basic/fs-util.c
src/basic/iovec-util.h
src/basic/label-util.c [moved from src/basic/label.c with 96% similarity]
src/basic/label-util.h [moved from src/basic/label.h with 100% similarity]
src/basic/macro.h
src/basic/memory-util.h
src/basic/meson.build
src/basic/mkdir.c
src/basic/sha256.h
src/basic/string-util.h
src/basic/strv.h
src/basic/unaligned.h
src/boot/boot-secret.c
src/boot/boot.c
src/boot/chid.c
src/boot/chid.h
src/boot/console.c
src/boot/cpio.c
src/boot/device-path-util.c
src/boot/drivers.c
src/boot/edid.h
src/boot/efi-efivars.h
src/boot/efi-string-table.h
src/boot/efi-string.c
src/boot/efi.h
src/boot/initrd.c
src/boot/initrd.h
src/boot/line-edit.c
src/boot/linux.h
src/boot/linux_x86.c
src/boot/meson.build
src/boot/part-discovery.c
src/boot/random-seed.c
src/boot/secure-boot.h
src/boot/splash.c
src/boot/stub.c
src/boot/util.c
src/boot/util.h
src/boot/vmm.c
src/bootctl/bootctl-install.c
src/core/automount.c
src/core/exec-credential.c
src/core/exec-invoke.c
src/core/generator-setup.c
src/core/import-creds.c
src/core/main.c
src/core/manager.c
src/core/meson.build
src/core/mount.c
src/core/namespace.c
src/core/path.c
src/core/socket.c
src/core/unit.c
src/coredump/coredump-submit.c
src/firstboot/firstboot.c
src/fundamental/assert-util.h [moved from src/fundamental/assert-fundamental.h with 99% similarity]
src/fundamental/bootspec.c [moved from src/fundamental/bootspec-fundamental.c with 98% similarity]
src/fundamental/bootspec.h [moved from src/fundamental/bootspec-fundamental.h with 94% similarity]
src/fundamental/chid.c [moved from src/fundamental/chid-fundamental.c with 98% similarity]
src/fundamental/chid.h [moved from src/fundamental/chid-fundamental.h with 94% similarity]
src/fundamental/cleanup-util.h [moved from src/fundamental/cleanup-fundamental.h with 99% similarity]
src/fundamental/confidential-virt.h [moved from src/fundamental/confidential-virt-fundamental.h with 100% similarity]
src/fundamental/edid.c [moved from src/fundamental/edid-fundamental.c with 97% similarity]
src/fundamental/edid.h [moved from src/fundamental/edid-fundamental.h with 97% similarity]
src/fundamental/efi.h [moved from src/fundamental/efi-fundamental.h with 100% similarity]
src/fundamental/efivars.c [moved from src/fundamental/efivars-fundamental.c with 98% similarity]
src/fundamental/efivars.h [moved from src/fundamental/efivars-fundamental.h with 98% similarity]
src/fundamental/iovec-util.h [moved from src/fundamental/iovec-util-fundamental.h with 96% similarity]
src/fundamental/macro.h [moved from src/fundamental/macro-fundamental.h with 100% similarity]
src/fundamental/memory-util.c [moved from src/fundamental/memory-util-fundamental.c with 95% similarity]
src/fundamental/memory-util.h [moved from src/fundamental/memory-util-fundamental.h with 98% similarity]
src/fundamental/meson.build
src/fundamental/sha1.c [moved from src/fundamental/sha1-fundamental.c with 99% similarity]
src/fundamental/sha1.h [moved from src/fundamental/sha1-fundamental.h with 100% similarity]
src/fundamental/sha256.c [moved from src/fundamental/sha256-fundamental.c with 98% similarity]
src/fundamental/sha256.h [moved from src/fundamental/sha256-fundamental.h with 100% similarity]
src/fundamental/string-table.h [moved from src/fundamental/string-table-fundamental.h with 96% similarity]
src/fundamental/string-util.c [moved from src/fundamental/string-util-fundamental.c with 99% similarity]
src/fundamental/string-util.h [moved from src/fundamental/string-util-fundamental.h with 97% similarity]
src/fundamental/strv.h [moved from src/fundamental/strv-fundamental.h with 84% similarity]
src/fundamental/unaligned.h [moved from src/fundamental/unaligned-fundamental.h with 100% similarity]
src/import/import-fs.c
src/import/import-raw.c
src/import/import-tar.c
src/import/pull-oci.c
src/import/pull-raw.c
src/import/pull-tar.c
src/include/override/sys/param.h
src/libsystemd-network/meson.build
src/libsystemd/sd-bus/test-bus-marshal.c
src/libudev/meson.build
src/locale/localed-util.c
src/login/logind-dbus.c
src/login/logind-inhibit.c
src/login/logind-seat.c
src/login/logind-session.c
src/login/logind-user.c
src/login/logind.c
src/login/user-runtime-dir.c
src/machine/machine.c
src/machine/machined.c
src/network/meson.build
src/network/networkctl-config-file.c
src/network/networkd.c
src/nspawn/meson.build
src/nspawn/nspawn-mount.c
src/nss-resolve/meson.build
src/pcrlock/pcrlock.c
src/resolve/resolved-resolv-conf.c
src/resolve/resolved-socket-graveyard.c
src/resolve/resolved.c
src/sbsign/sbsign.c
src/shared/bootspec.c
src/shared/bootspec.h
src/shared/btrfs-util.h
src/shared/copy.c
src/shared/creds-util.c
src/shared/dev-setup.c
src/shared/dissect-image.c
src/shared/edit-util.c
src/shared/efi-api.c
src/shared/ethtool-util.c
src/shared/generator.c
src/shared/hwdb-util.c
src/shared/install.c
src/shared/label-util.h
src/shared/meson.build
src/shared/mkdir.c [moved from src/shared/mkdir-label.c with 98% similarity]
src/shared/mkdir.h [moved from src/shared/mkdir-label.h with 93% similarity]
src/shared/mount-setup.c
src/shared/mount-util.c
src/shared/resize-fs.c
src/shared/selinux-util.c
src/shared/smack-util.c
src/shared/socket-label.c
src/shared/storage-util.h
src/shared/switch-root.c
src/shared/tmpfile-util.c [moved from src/shared/tmpfile-util-label.c with 95% similarity]
src/shared/tmpfile-util.h [moved from src/shared/tmpfile-util-label.h with 50% similarity]
src/shared/tpm2-util.h
src/systemctl/systemctl-enable.c
src/sysusers/sysusers.c
src/test/test-chid.c
src/test/test-label.c
src/test/test-sha1.c
src/tmpfiles/tmpfiles.c
src/tty-ask-password-agent/tty-ask-password-agent.c
src/udev/meson.build
src/udev/test-udev-rule-runner.c
src/udev/udev-node.c

diff --git a/.clangd b/.clangd
index 7ce59c6002f4142e87eddf325a8243d493748214..b0deab559c881a08ef69f3fd034d257df3e5a9e5 100644 (file)
--- 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]
index 9bd26baa0dc6747ec9a164e3befd5e4ba0749b61..90550d85c78acd3e07b6cc6ee14670cc0776375e 100644 (file)
@@ -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
index bc84235557719853e48b62e3d7c57a62e0381571..536a2d2670c04279f04ce82274f739de743f2c99 100644 (file)
 
 /* 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)
index 085c97df5ce44e694ee0e4817ebc47349557199c..d6580bbbecd426799e3a896db69a35b1862d6f4a 100644 (file)
@@ -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:
 
index 1d2d59e4fa5368cb4e0c90c15e55df5a373861a5..c5af3b107c155633bcbea2c5171187cf47e0e834 100644 (file)
@@ -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')
index 9fe68b2de45daa65ada2a5fe58f3e189b6531043..896c6e54b36a5bb3e2cf71f4144dc1e8196afb4c 100644 (file)
@@ -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"
index 899a4365601f709acef78b798759c0cc4ed9755b..8451b7b29916f74686a7fa5ee77e3c19c9010c3c 100644 (file)
@@ -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 */
 
index 5edd494f783c69010c0c8724d1a891ed5b41087d..0a245a18631960a2ff7e160e1e908d68a254e9ea 100644 (file)
@@ -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 */
 
similarity index 99%
rename from src/basic/btrfs.c
rename to src/basic/btrfs-util.c
index 81c9839450734c1f972fd567392850442908ba51..941d66c93cf1121a74de1296dd2c1a0d2143196a 100644 (file)
@@ -5,7 +5,7 @@
 #include <sys/stat.h>
 
 #include "alloc-util.h"
-#include "btrfs.h"
+#include "btrfs-util.h"
 #include "errno-util.h"
 #include "fd-util.h"
 #include "fs-util.h"
similarity index 100%
rename from src/basic/btrfs.h
rename to src/basic/btrfs-util.h
index e3a2ade4ed98427017eb88f9ea7ada0b0a00eb7c..93f6a0de96d6034e866d3b02f7aa8fa980364c70 100644 (file)
@@ -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);
index a5996b244bd15c1431578442b36bbae5b81e6db5..29d598a5988d8c92b370378c443551b3ea702ce3 100644 (file)
@@ -8,7 +8,6 @@
 #include <unistd.h>
 
 #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 */
index 446080de3595f4344760cb635df540743ddb0848..5505f997e6f65364d02e4fdfaae36a6383acb6a6 100644 (file)
@@ -3,6 +3,8 @@
 
 #include "basic-forward.h"
 
+#include "../fundamental/confidential-virt.h"   /* IWYU pragma: export */
+
 typedef enum ConfidentialVirtualization {
         CONFIDENTIAL_VIRTUALIZATION_NONE = 0,
 
index 22e0eab9a0afa47af7d31c0df63c1a59ce274b5e..368fe12a49acc87bf77bae4f3f19c9e6ea7f6aec 100644 (file)
@@ -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)
index 587618614e66df7dbf100701c5d257bd7e6bed5f..7689c653a28b2f77512669b1a9053bff62b8eabf 100644 (file)
@@ -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"
index 8149bb8b0dd442875386bc4675127f29df5d5a29..de2ac6af726e7a16b774f77d0674fb448d73e24f 100644 (file)
@@ -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"
index 84b76072d7c6314f484c7250fe818d7966eb12ec..b51d63089823971fdaa5241b9615f646a0f8dfaf 100644 (file)
@@ -7,14 +7,14 @@
 #include <unistd.h>
 
 #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"
index a0a059550b7dbb2a5b3af176c36db6eb73359765..35cdce6a76ed1877f6ea814a6bcd0a422cd86460 100644 (file)
@@ -4,7 +4,8 @@
 #include <sys/uio.h>                /* 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 */
similarity index 96%
rename from src/basic/label.c
rename to src/basic/label-util.c
index cce3e75c7c1be2ce1a70b122d8944632cf1195f1..a6d616210afaf3c9b0a62e9ffcbbf5fd7fb0a03c 100644 (file)
@@ -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;
 
similarity index 100%
rename from src/basic/label.h
rename to src/basic/label-util.h
index 390a9fab38ca36727efebc922632d268de121726..cb0719f15f220706d192c3f18c7930b3f785a622 100644 (file)
@@ -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)
index f16118fbb09c26f62b7be2e5b856ee2fa349feff..4caf58585a77924ed34dd2c387c87624d6f428ab 100644 (file)
@@ -4,7 +4,8 @@
 #include <string.h>
 
 #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())
index 7cc62c7b8bdac87a49e33539ec9b9a723e653d7c..6987c3cabb137ef71b6ab2bfcf383fc4f9f76e3c 100644 (file)
@@ -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',
index 7b353542e342ff64746562c988ee17fc9a5fa9e9..fc79763bb95e379638084189c2aca571770ff9d0 100644 (file)
@@ -3,7 +3,7 @@
 #include <unistd.h>
 
 #include "alloc-util.h"
-#include "btrfs.h"
+#include "btrfs-util.h"
 #include "chase.h"
 #include "errno-util.h"
 #include "fd-util.h"
index 5016cb42b025a39fcc5d6a611f062fe35709e7cc..74314a0cab853133f719f8e0f8ca76ec18e543eb 100644 (file)
@@ -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]);
 
index 8cddc051d5d3d8ec0ad98c8802abfe9975d84ab1..447f4f807e76b858e8a642d2dc7a05f031cdc78d 100644 (file)
@@ -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)
index d7c4b2bcf08edbf55202bcbb1a75fd8a558c4d41..cf6fa158b6a416ea111cbbbb2183594b242635a1 100644 (file)
@@ -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_;
index b45fb3c3587d63bfe074b5054cd65ad1b200ccab..f54d7d8edd99939a6a9efec8443b35e5eac3d3ca 100644 (file)
@@ -4,7 +4,8 @@
 #include <endian.h>
 
 #include "basic-forward.h"
-#include "unaligned-fundamental.h" /* IWYU pragma: export */
+
+#include "../fundamental/unaligned.h" /* IWYU pragma: export */
 
 /* BE */
 
index 54078b51c23bd53bf53c7f34410e461e3c8f4332..7be0880d3b07476bea3b213af3ec5bce0acf63ce 100644 (file)
@@ -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"
index 8660814aaebd63d7ee1eab031f498ed148523f73..9f833f02b1b0fefb8bca4fccbae71a472d82ae44 100644 (file)
@@ -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"
 #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"
index 8abd9de47ceea51dce1b5780be9c2d80c1507bc3..6cb11e8b1c1b20c7506970711594e45b96d3fad6 100644 (file)
@@ -15,7 +15,6 @@
  */
 
 #include "chid.h"
-#include "chid-fundamental.h"
 #include "edid.h"
 #if SD_BOOT
 #include "efi-log.h"
index f8299fde88888126a223753025adffdb4d82f514..8bf4b555a40a9424b329e0a3e7e090f546754782 100644 (file)
@@ -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
index 8dcd986aa4f157277d620119b520ac77b49ccc5d..1115eeaae0a2c6a998d471c2e5029f2780d43285 100644 (file)
@@ -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
index 36c536681cc1242a5be5c774b09669f861ecde85..6c1b3caedd1786b5089b0dd895ca095813d663c3 100644 (file)
@@ -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"
 
index a40cb5e8a11e99dbf36f7e13196db530ceab7eda..5243e81e5df18b33bbd6c29c45f642f0edfeb083 100644 (file)
@@ -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) {
index d58b1e39da74c2e41b4d02c8dd11b30acc38b705..215404d4b0398f46d0996c135756977d49247e6c 100644 (file)
@@ -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(
index 74649658d93ff27eddb797388676171adf70727c..553684d8d1c771e2817e356da67324ebb1606c7a 100644 (file)
@@ -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);
index 6d88f56e71296a987c772d016a64ea459d2baf93..c9e2f0d9295c76ad0fba41ced5ed0356dfd9cd59 100644 (file)
@@ -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
index 9e142aa6ccc1313ca3422ec669906e1c1f92edb3..7b755578b215de8f5a35baa1278f51461cc57989 100644 (file)
@@ -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) {                                    \
index d0be7a1e160d38176be7bfcd5edfac559e93fb56..306446386271acfdd6710d284ba56a2e3398c7c5 100644 (file)
@@ -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"
index eddaad1eeeaaab071bfb8f15c123c49f8b416937..c518a0253ff8dd9e3349ea94ad2a57c2f209813b 100644 (file)
@@ -9,11 +9,12 @@
 #include <stddef.h>                     /* IWYU pragma: export */
 #include <stdint.h>                     /* 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. */
index 044e011f60e89006f4a7d837eccbfaea33e4dfc9..eced9273fe0faea1593b8dabdd634e4007c19d88 100644 (file)
@@ -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"
index cfcb8d1c6f59b24c04f2f31324c1f5d6a165f386..fb56d6919d97b8ad41f98264371e5011eb3ce209 100644 (file)
@@ -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(
index 1e6128e1effaa68d8447ff6a10892d4ac4a71c59..e37398d9719569f5fb0c51f178cbb04be9499928 100644 (file)
@@ -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) {
index 681d12c0c1cfa922d824afda05a8451fb54c1791..f7eb834bca7f96a4752bd9a1f40d20bbbca1bd68 100644 (file)
@@ -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,
index 349e3fb26c01b5206e6a8151c70251a48b4b18ec..2f3275b0654e62568eed434fa51d3da435e785fe 100644 (file)
@@ -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
index 1b8f94e58a247273874a2d9887e2b6c195751bc3..2dc9c64256305c81a237748615f645c47db7b19e 100644 (file)
@@ -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,
 ]
 
index 8f5fefad47c1d3063a4356d5b863fee0d5e85499..ab553a6530bbc019b66125f9e391343a08fadc0b 100644 (file)
@@ -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 {
index a31215c3b0262c3e54e8cb02bfc8e3448acdef8a..6d27a9255211c54f242d6bf5e816d3a267befb7c 100644 (file)
@@ -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)
index 03bead27124d8d2a0896ca30524163a42718b58f..58cc02a9d277d0a4eab50b8d494b9dfb126d0bc8 100644 (file)
@@ -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 */
index 487f212e65c1e8fc769bf840398e19513d12f416..126fff954714b5c4cbddfcf022eac4079cbcc317 100644 (file)
@@ -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 {
index 52927e91ff077d1a260f864a9142c06f3f75f2c8..6411102ec435e115bdf9f9c50de3723cfd6bbda8 100644 (file)
 #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"
index 22981bc00db1fa6426c943314054d450a1122ae7..e0d2788c202330bae1a6adca8b0f0801d432d94e 100644 (file)
@@ -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"
 
index fa552d6f46c08baf224dfa0d054e9cdb2e744b28..89f1184762aaf352791c5cd644c882614b19b660 100644 (file)
@@ -2,7 +2,7 @@
 #pragma once
 
 #include "efi.h"
-#include "memory-util-fundamental.h"
+#include "memory-util.h"
 
 #if SD_BOOT
 
index da17e4584aaecd941af670726b24d4a4120eb7df..902f61b41c2e40176f35cef3b6b0428bdf4ccb7e 100644 (file)
@@ -4,7 +4,7 @@
 #  include <cpuid.h>
 #endif
 
-#include "confidential-virt-fundamental.h"
+#include "confidential-virt.h"
 #include "device-path-util.h"
 #include "drivers.h"
 #include "efi-string.h"
index 2ad76264fa3900a69c73959f21971714ab456b8b..77d03e72b6c5cb2c9a0bbbed04a73b075d6882ed 100644 (file)
@@ -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"
index 5fd9c8f4ccbc23eda7a875ec2afbc9c41812cd34..a0529cda5f26d47b872300826e800741c2caa0e8 100644 (file)
@@ -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"
index c1b2fcda85cde6a60ec64c861ec8e33afa53a3dd..13ecf72f49e5b078931df82515c22c05ebd01808 100644 (file)
@@ -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"
index b82f7b995b6380c973d80c0100b466c0517c5ffd..9004ad88d0689e1677009f093d5eef1daa3ef86d 100644 (file)
@@ -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"
index d63a393d985d1b3e5cd35148a1bccb4650bd0688..804eb11f1462ba1642afaf9ba7be7de7dd65e24f 100644 (file)
@@ -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"
 
index 89f0c557078c2da781dae2f944f7a639f6f727e5..488d63eb41d816825c855f2616b499055e980072 100644 (file)
@@ -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"
index 0b88afae6242ee275cc8b02671422b2ea3ad038a..7815691133c6677403713af93eaadb00d8893de6 100644 (file)
@@ -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"
index 165914b2a53d03440a387997bd5caf09d49c6036..bb8a735683ee5ceffeb17b6c6e9f43119ad428c8 100644 (file)
@@ -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"
index e1f315dda622d3bd11c16069fcfe3d1a8b131c73..af50a2a4fa7d975301eb0d0daf2032712f5b04a1 100644 (file)
@@ -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,
index 408274c3864becb181cdbffcb800a31bb68ad6de..4d5cd35fae60b0b7d802d3edff13cdc3a76b817f 100644 (file)
@@ -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"
index b07b1082edef28a0ffe6b7bb68c4af5e1ec56f71..49635d3e9528a07914a848ece1c3d491ca80d4bf 100644 (file)
@@ -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"
index 18a5e140f144244a009686db7914081487e7bcc0..93e702a481610cf38ae58a2a8c760f02eb869d02 100644 (file)
@@ -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"
index 3c4742fba11ebc8c817bab098a0c70eeaf010eb3..2cdb34c4be656eaa58d21615548ac098ee7fb9ab 100644 (file)
@@ -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"
index f81083a70f753cf06e400038a734547b27961a1e..d66f813a9a3de407898afe193b7e0fbc142bdbd5 100644 (file)
@@ -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"
index f0c961ded7e5f9c4fe8e3f04ccdb2097dc3f1979..a108fe3eb5fb764488be8299b8b53efaf3c6f67b 100644 (file)
@@ -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"
index eac9e7f19bf839fe69ea1b7fb650e2e26659ad48..e328c8550015c5c143fa70cf7ad63b2803a381f6 100644 (file)
@@ -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"
 
similarity index 99%
rename from src/fundamental/assert-fundamental.h
rename to src/fundamental/assert-util.h
index d3425cb54df0c1013164eca19c6afa1c75175a4b..7f173fefb35f99f8d7ef520de94aeafa7b066088 100644 (file)
@@ -5,7 +5,7 @@
 #  include <assert.h>
 #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);
similarity index 98%
rename from src/fundamental/bootspec-fundamental.c
rename to src/fundamental/bootspec.c
index 5ca66740294e261a0e116f68e37dbef679d1e07c..6daf48479deb7236a8c388a683dfce62447c17ff 100644 (file)
@@ -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,
similarity index 94%
rename from src/fundamental/bootspec-fundamental.h
rename to src/fundamental/bootspec.h
index 19b489ccf55ad32bb34d17f2905c3be6e181d369..50722d2b345349835121239e4ad1955dd9a0297a 100644 (file)
@@ -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,
similarity index 98%
rename from src/fundamental/chid-fundamental.c
rename to src/fundamental/chid.c
index 474aab74840faea78583af6e3a22f714dd05f5a4..28bc4572f06bff8ba65014dcdfdcccaddb189a81 100644 (file)
 #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],
similarity index 94%
rename from src/fundamental/chid-fundamental.h
rename to src/fundamental/chid.h
index a0e77dd9b02ceab8542167c6dec4c6c70affd74f..1d5247bf12bbc6ed564a99faab5c7c27fda28858 100644 (file)
@@ -2,14 +2,12 @@
 
 #pragma once
 
-#if SD_BOOT
-#  include "efi.h"
-#else
+#include "efi.h"
+
+#if !SD_BOOT
 #  include <uchar.h>
 #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
similarity index 99%
rename from src/fundamental/cleanup-fundamental.h
rename to src/fundamental/cleanup-util.h
index b9f9c0724546bad2c23306baa23f6c5a8af057e5..538469f255ac0ba4deda249facb6637ee9b7a4af 100644 (file)
@@ -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. */
similarity index 97%
rename from src/fundamental/edid-fundamental.c
rename to src/fundamental/edid.c
index bfd314e44452b5fea7dc739e6457e0e3fb4dc68f..980a3989b71155dc2fef55efa71548801ed8633a 100644 (file)
@@ -4,8 +4,8 @@
 #include <endian.h>
 #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));
similarity index 97%
rename from src/fundamental/edid-fundamental.h
rename to src/fundamental/edid.h
index 2a76c4524de2e157529cb5881c6c1bb1aca93128..6c5930f4c6ac3d2b7e75847248ee72b3db67cae5 100644 (file)
@@ -10,7 +10,7 @@
 #  include <uchar.h>
 #endif
 
-#include "macro-fundamental.h"
+#include "macro.h"
 
 /* EDID structure, version 1.4 */
 typedef struct EdidHeader {
similarity index 98%
rename from src/fundamental/efivars-fundamental.c
rename to src/fundamental/efivars.c
index 611b0b682d9b77f89c17ce4466896fc110176634..87dc1fff8f4b41f889567255039d647fbcf32c52 100644 (file)
@@ -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"),
similarity index 98%
rename from src/fundamental/efivars-fundamental.h
rename to src/fundamental/efivars.h
index fea23fa29c182fafb3535c9b0e95aca03dfbf6e0..eddda7c23a0c873e2af35db58955ce74b27753db 100644 (file)
@@ -6,7 +6,7 @@
 #else
 #  include <errno.h>
 #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)
similarity index 96%
rename from src/fundamental/iovec-util-fundamental.h
rename to src/fundamental/iovec-util.h
index 5b693742f3a7cf067c424b81fd627c06663bfdee..7d8f65db43d2ba81fa9f5b4b0e00336af040a20b 100644 (file)
@@ -5,8 +5,8 @@
 #include <sys/uio.h>
 #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 */
similarity index 95%
rename from src/fundamental/memory-util-fundamental.c
rename to src/fundamental/memory-util.c
index 1a64fbe514ff885704f12f762c96f545602f9e74..39d116cc8b65dbfd7a84f802ed82b25d6f3040fb 100644 (file)
@@ -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);
similarity index 98%
rename from src/fundamental/memory-util-fundamental.h
rename to src/fundamental/memory-util.h
index 7c88264053ccd1d69c46fa44d24c934adbd65d9a..55ed19e15ca8e6e0e6b5bcd99290d42f4a93f843 100644 (file)
@@ -9,8 +9,8 @@
 #  include <string.h>
 #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)                                           \
         ({                                                      \
index 14d956ac07edfe2bab40bff96b27a07140fa70e3..93a332ec8a6a1064d8058cb0326071d35d0a671c 100644 (file)
@@ -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',
 )
 
similarity index 99%
rename from src/fundamental/sha1-fundamental.c
rename to src/fundamental/sha1.c
index b2af1e98885ed55c063cba34d335bb45e53fa3db..1d48d6874afd8d27f5c5205e6818c099ac9adf56 100644 (file)
@@ -82,8 +82,8 @@ modified for use with systemd
 #  include <string.h>
 #endif
 
-#include "memory-util-fundamental.h"
-#include "sha1-fundamental.h"
+#include "memory-util.h"
+#include "sha1.h"
 
 #define SHA1_DIGEST_SIZE 20
 
similarity index 98%
rename from src/fundamental/sha256-fundamental.c
rename to src/fundamental/sha256.c
index 76951ccfad2e06d2e916ea73c00f0ea6472de53c..ac514eddabbc2043463dd2ece3a12360915a05c7 100644 (file)
 #  include <string.h>
 #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)                                                        \
similarity index 96%
rename from src/fundamental/string-table-fundamental.h
rename to src/fundamental/string-table.h
index d40251506845b32274db7d2c7296fb398aadd769..41c8158689be42786ee31149d040b88e2ad9b407 100644 (file)
@@ -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_
similarity index 99%
rename from src/fundamental/string-util-fundamental.c
rename to src/fundamental/string-util.c
index 6877dd439a4bd7e60bf7c560e778d2b517aa6357..bd6b81ea14da9fbe68b839a846b119164300e78a 100644 (file)
@@ -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;
similarity index 97%
rename from src/fundamental/string-util-fundamental.h
rename to src/fundamental/string-util.h
index 83b90e4e9e543b41bd490249d3a18245a054eab7..c068c1904a8761a880c8bee6b977def7e79ead54 100644 (file)
@@ -8,8 +8,8 @@
 #  include <string.h>
 #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"
similarity index 84%
rename from src/fundamental/strv-fundamental.h
rename to src/fundamental/strv.h
index 7e7e34822f515824a8a2723c807fa9e265cdcf29..0ede9c3b796a1cac05e018c25fb9a94915531b8d 100644 (file)
@@ -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++)
index 1e6d8beff274c99d4211bbb05e0f6c0c3b59c986..dcb0f8c511a3d4ac01ef71d8e1af91d1a3c85879 100644 (file)
@@ -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"
index 2095a0dde57af6bed6a921b35f2163cf68c0b7fd..62aaf6bf86833e2d44ece0cfdda7273806c4e18a 100644 (file)
@@ -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"
index 06ee56bd78f90c8f59729031fb53c67d46c03119..25e16f671a786ae59b8971a3fc15b5d4cb4517f0 100644 (file)
@@ -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"
index c1c76fc89801784531482e2352ecc431af79eb72..b6fa71c902965839c28c5a6a48ec52052f3f3e33 100644 (file)
@@ -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"
index c63a453177cff572b9716d11d2a2ff4029e5ba10..c069160cb43cf2a1997b3ebc8ebc04cd9425baac 100644 (file)
@@ -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"
index 453ad1187cf7bb13d069fcef9a22779dc3ad5b2b..bf62b2e780d3bf446957bf165c021a3d21568fb4 100644 (file)
@@ -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"
index 88cc47edf4fe0ef80112f00e231cc611b86ef850..2a4410f526d193ccddfde80a904179fbc7c64f2c 100644 (file)
@@ -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 <resolv.h> includes it. However, <resolv.h> 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. */
index ab1ac35409cb8ee2bb1592bd46ee182e81b8b536..b9b8c7062ef3ad1acabd2e861270921251517652 100644 (file)
@@ -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]
 
 ############################################################
 
index 9bf8889f4a35ab3ae4afdcfb8c518ece2f49cf82..05074fd92b2f6c6cc0c8ec47e596cadb329f2453 100644 (file)
@@ -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
index eb9dda79ae2fcde577564f1be90320288fa0c031..854628aed42cee201ebc4443c55d56e85a2db205 100644 (file)
@@ -15,7 +15,7 @@ sources += libudev_sources
 
 ############################################################
 
-libudev_includes = [includes, include_directories('.')]
+libudev_includes = [include_directories('.'), includes]
 
 libudev_dir_path = meson.current_source_dir()
 
index 25c361d40040919624cbb937a554b4921876e1c3..ab2abd7daeae34609699090cc62b9a68097d7217 100644 (file)
@@ -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"
index 14208bc1496e9c967e40a3b38cdc45276b06c520..5ff5a1f656a9baca6f1dc5c09424ede0f66256a8 100644 (file)
@@ -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"
index b78d39d02d7775cefd16f250552bf284735ace8c..30b43404b19e7acd138869e4747000de6579ee05 100644 (file)
@@ -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"
index 77f006a479d29cab2f8f3f2c7ab3ed1f115f65b6..66c27d3d73c094e3671103475b035c44130b6bf6 100644 (file)
@@ -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"
index 72cad136650c212dee5960488775d50544d04cfb..420ec810080d9ca9b0f757810255347eb6258278 100644 (file)
@@ -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"
index 49d51952e98e7e07df9ef56e4a34a7cf727ea896..0595ce5bd2b053a0afabfe261fe3bafbb9e6b196 100644 (file)
@@ -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"
index 2b7984051e1975fd6f865b7d6e9235a0f82cbe83..c19c1cb791a693f6034582e9175f1d955f33de23 100644 (file)
@@ -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"
index 6cf157ffada3ffa8a4c869e804230cd4c1ed1dae..cb623d98e5274cc8e020c28154919ce63cf1958b 100644 (file)
@@ -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"
index 63fed79687e5d980d4863e0707f428c8b8ca9131..56d93ae560b1c8c4fcb7695e504e8340812683fa 100644 (file)
@@ -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"
index 7c1f57baac3def56d21cd61f624610837e87694e..c419571deed9ec274686b9378ae1423b2ba57ef7 100644 (file)
@@ -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"
index 23f6f3a4fe58758bfd39ba74d8693dd8f7e0d2b4..9844229ebdc58e8fe9b27b350dc2c2bb0875b73a 100644 (file)
@@ -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'],
index 43729c37653db4ad892c468fdb07dfdbb9260a19..f69c509023ab9cf7d2d275d17e2f56c1c2dc9806 100644 (file)
@@ -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"
index 3e0666610bfe9c9137554bf19f83ae54f1f39e6c..73e03c2a25d99a4865ba9d08da78a5e41d597ce9 100644 (file)
@@ -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"
index 815b74cb1572d111a895a0438281fd8b5b20172d..95bc461cc5a08c9ca3af101ddb9bf9d4f4ca1694 100644 (file)
@@ -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,
index a75582e2b4d6e01dd8c59d715e3718f90613c459..3b57a75070b82f74118a39a8d5c451901f6a05a6 100644 (file)
@@ -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"
index 1fae4266364f03616cadbad6ba49ba6cadceec4b..63332913c72a20317614f0c55bb5f0ea8f2726da 100644 (file)
@@ -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],
         },
 ]
index 9ce991262e0dbcf2164835c1acd942727fa437c6..fa2ee54c5756d2865b6ecf72cbdf3403503cdb5e 100644 (file)
@@ -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"
index 5052bb531e25d582e4d1ec3e348f994fae48f36c..cae546ff82a9fc1bb14cbe9fdd079373a707e47b 100644 (file)
@@ -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;
index bfa3055dedee4a16f867d65c84840c8b7a33860b..753570f7adc548cc8c18eb7763b84a0c47df3181 100644 (file)
@@ -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"
index aa165927a423fd90bd62b3676628021b83491499..aaf206ac2c7e97d2477923f0618094e8ea2e8057 100644 (file)
@@ -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"
index f845bcdf424b7dd6a61abb888bfe86ca54a54210..1d690220d1b51c773a882ddf05d8fb57b1438de8 100644 (file)
@@ -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"
index a167e19a90b586bf7fea3f6ffcadd46d14128c30..77ee218996e3cc3c450ef74563ce3861c6db08c3 100644 (file)
@@ -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"
index 677667383c9dee44ab9c90cc86504ea358a41b53..0560bfb3a4ac29c8aa35417f2d372df4cb12f758 100644 (file)
@@ -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) */
index da7c89794542e64eeb1d010bd2906d1c261e2839..da7c0481a6ab97f74985537672016aa4ffa40ba4 100644 (file)
@@ -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 */
index 5b68bb9a5ab97a1128b1c9fbb2c9e14da1ec91a5..fbcb8e2a30fd253ec1b88795add2e2c3514788a3 100644 (file)
@@ -12,7 +12,7 @@
 #include <unistd.h>
 
 #include "alloc-util.h"
-#include "btrfs.h"
+#include "btrfs-util.h"
 #include "chattr-util.h"
 #include "copy.h"
 #include "dirent-util.h"
index dd2a93844dbddb3cefc374f4e65a0e2cddb58fb4..6ed433735375be108081a26f059403acef3e487a 100644 (file)
@@ -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"
index e79db91ddee5339ae3faa0e7a1b233df9f05761d..9424e2200156418bda6a8ed7fdf9410a3cf8c5f2 100644 (file)
@@ -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"
index 8483a16e9442ee94f37a1f0910f5f502f6c1bcc0..17c14db3ffa192c524478772cc9425a5f5b0f636 100644 (file)
@@ -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"
index d48c36c1d5c2bfeb59f071404b58838775640efc..4180d2a6f7df5103e94b489eb0178106a1b21b90 100644 (file)
 #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;
index 8a3a40cbecba7960515de5a1fcad924b69332aa4..c205ffb9002b9fe064ebb2bae2238108964c0b7a 100644 (file)
@@ -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"
index 74a979c184e9d98d6c3e6ed4c54e444c00ea20c6..44e9c49e817c280cd0d5bb5f064910522a72d3dd 100644 (file)
@@ -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"
index 5e2f8f6e0e64f2fb03275e8c9529b708e489b84c..36fdff5263be181fca8065f6bdf8d53c88ab8f68 100644 (file)
@@ -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"
index 46c3f26a9b807af3a51f7c72b8b4aec1990fa859..b42681a289cc76b8b5fef599a71bc0dca6858b63 100644 (file)
@@ -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"
index d01906c205d9d70bceee8cf9d37ab9796b742c47..6fc43a8df4ee989314144e047d79f09a5d885dc7 100644 (file)
@@ -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"
index c7ed307dee25aaab2123d99182a3fdee83ee67c4..720bd0653362849d13acc2f2ecea44d99283ddad 100644 (file)
@@ -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,
index 55cf8364d374848f6ec6c430cc7482eb295c6533..4d11a2637f2cf1c177d9eb29122b44cb00402226 100644 (file)
@@ -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',
similarity index 98%
rename from src/shared/mkdir-label.c
rename to src/shared/mkdir.c
index 36473b10669ad510994126988153342f7e8bc76c..1228bca19bb3e2917ead83d828952bb86df8d24b 100644 (file)
@@ -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"
 
similarity index 93%
rename from src/shared/mkdir-label.h
rename to src/shared/mkdir.h
index c884190a0e25f00d08e93071231f91e15ec5fd8b..b02e02a8f083ff0801e43e21c6aaaea64bedbf94 100644 (file)
@@ -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);
 
index 8c6cd2b12b69ae3bc00815361ffca53eb6f12e95..f402990cf747c3aeb326345c28f7bdc04ebde219 100644 (file)
@@ -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"
index 12d3da82e220e336d01050e8f3d2021bf2a65926..cda0070b14e5471edbab6df3f27f3aab160105f3 100644 (file)
@@ -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"
index 147af7ec33da648458c2240e0c22203a4f2148fc..7a7854666486f098beba3da6baeb0b1ed320117b 100644 (file)
@@ -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;
index 6c83f3fdd28d8c2d95b2210401d36b9a9ea7d1c7..81ec4a9ba6d283e0382c77043425567995449533 100644 (file)
@@ -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"
index e1dbf8686edda12f5966bdd03517cccdf51a627c..6380a4e3af65e32f2b97a6fbd45121a967d0cfed 100644 (file)
@@ -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"
index 3f2ac99b9b0ec05e7254db0af5f7605db74a4e6f..ea1116983efff7867eca2419ff790d611e8c5fa8 100644 (file)
@@ -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"
index b37515bedbd43954930bf759512e6497f0c182d3..fe78112d24b8277552d623ac16d9d6b5559494bb 100644 (file)
@@ -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
index 08710a896640041b5218404844b38bd03357b55c..3bb2611523510136a3ac8262340c328d91bb6831 100644 (file)
@@ -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"
similarity index 95%
rename from src/shared/tmpfile-util-label.c
rename to src/shared/tmpfile-util.c
index b928460f1bedb7b44645c9bb44016048225b5709..9a5360d6d22dfc0663d7238d367ab5fafdca79a3 100644 (file)
@@ -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,
similarity index 50%
rename from src/shared/tmpfile-util-label.h
rename to src/shared/tmpfile-util.h
index d8920cc697f8324408e8f22981f6a33f225434ff..23db87cbb18af7896174f3948406505621b0f50c 100644 (file)
@@ -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) {
index b5a8ec1c1eaf77beb1978da72631749c0c469182..f2f63a94a43fc679824092af1f8d380d1ba5d8c4 100644 (file)
@@ -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,
index 68c349a195c67115907240bda276772f8399097e..5ad20665572846eef008761ddbab7d2940a037bd 100644 (file)
@@ -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"
index 05a3e2db509e4e656029ef8d02ce692f8cde5a05..cdbc053f6b3d28a7597a16d2442bbc68359f3a70 100644 (file)
@@ -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"
index 86b748016aba0f9d36abc4a3976fad83b8b22912..84f7eefac38ab56fd30ba56ff1f992530c292442 100644 (file)
@@ -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] = {
index 5ce9988ce277d20e70a7e3f18c2b563b27d4b7e9..3bd96a3a1b794d9b2186e90dbb4bb33a0b4404e2 100644 (file)
@@ -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"
index 3a5ff148df47e2d0acade59d34386b3af76a81fd..6356400c62887e40490d0a6b2202357cf8d9040c 100644 (file)
@@ -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) {
index b6007f6207ed66a1219b4612f77068c59a5107ab..8b7b676598702fa0a9d4abb30b3c8c12807e8168 100644 (file)
@@ -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"
index d675e4269ac16a4537fe4f8fa37e1e145b002c80..c7b1fb3e1fbe89ed3a5ded3d3188574943941892 100644 (file)
@@ -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"
index 7e2435d0fab68916f99b9f8dd18749b0ada32a8b..375645e7593ed79b5ea3e9f86bec761f96b33438 100644 (file)
@@ -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,
index 1acbe2f0909c8f64fe10d831a464629cd5c0a381..dfb4b497227fec33e0f9e16e7bd1d9c19fda833e 100644 (file)
@@ -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"
index 4d1ecf5d116a1d6f5cd8a8d8cb46f362561765be..ba28a8b809e8796a0e9bbf57c3c6ef38855637d3 100644 (file)
@@ -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"