]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
tree-wide: Ensure source file names are unique
authorDaan De Meyer <daan.j.demeyer@gmail.com>
Thu, 15 May 2025 12:07:59 +0000 (14:07 +0200)
committerDaan De Meyer <daan.j.demeyer@gmail.com>
Tue, 20 May 2025 08:29:59 +0000 (10:29 +0200)
Let's ensure all of our source file names are unique without having
to take the directory into account.

This allows us to create meson targets or unit tests identified by the
the name of the source file they operate on without having to include
the full path of the source file in the target or test name to avoid
conflicts.

32 files changed:
src/boot/boot.c
src/boot/edid.c
src/boot/efi-efivars.c [moved from src/boot/efivars.c with 99% similarity]
src/boot/efi-efivars.h [moved from src/boot/efivars.h with 100% similarity]
src/boot/efi-log.c [moved from src/boot/log.c with 99% similarity]
src/boot/efi-log.h [moved from src/boot/log.h with 100% similarity]
src/boot/export-vars.c
src/boot/meson.build
src/boot/random-seed.c
src/boot/secure-boot.c
src/boot/shim.c
src/boot/smbios.c
src/boot/stub.c
src/boot/ubsan.c
src/boot/util.c
src/boot/util.h
src/boot/vmm.c
src/escape/escape-tool.c [moved from src/escape/escape.c with 100% similarity]
src/escape/meson.build
src/measure/measure-tool.c [moved from src/measure/measure.c with 100% similarity]
src/measure/meson.build
src/network/generator/network-generator-main.c [moved from src/network/generator/main.c with 100% similarity]
src/network/meson.build
src/network/wait-online/wait-online-link.c [moved from src/network/wait-online/link.c with 99% similarity]
src/network/wait-online/wait-online-link.h [moved from src/network/wait-online/link.h with 100% similarity]
src/network/wait-online/wait-online-manager.c [moved from src/network/wait-online/manager.c with 99% similarity]
src/network/wait-online/wait-online-manager.h [moved from src/network/wait-online/manager.h with 100% similarity]
src/network/wait-online/wait-online.c
src/path/meson.build
src/path/path-tool.c [moved from src/path/path.c with 100% similarity]
src/random-seed/meson.build
src/random-seed/random-seed-tool.c [moved from src/random-seed/random-seed.c with 100% similarity]

index c2851e126748ee423aeb9cd397937333dac2410d..967b9db1dc6cca620c0876bb8b933925032f34d2 100644 (file)
@@ -8,8 +8,8 @@
 #include "device-path-util.h"
 #include "devicetree.h"
 #include "drivers.h"
+#include "efi-efivars.h"
 #include "efi-string-table.h"
-#include "efivars.h"
 #include "efivars-fundamental.h"
 #include "export-vars.h"
 #include "graphics.h"
index 62e338353ecca82c97d12c7548aaa489ee3f1889..a1a41cc28919340c3e6ce992ab4432e268738b16 100644 (file)
@@ -2,7 +2,7 @@
 
 #include "edid.h"
 #include "edid-fundamental.h"
-#include "log.h"
+#include "efi-log.h"
 #include "proto/edid-discovered.h"
 #include "util.h"
 
similarity index 99%
rename from src/boot/efivars.c
rename to src/boot/efi-efivars.c
index 2613efa6d722c21f585325e656045a46d44266d8..e05997972bc726591d2e39623f2ed1d52c3ca728 100644 (file)
@@ -1,7 +1,7 @@
 /* SPDX-License-Identifier: LGPL-2.1-or-later */
 
+#include "efi-efivars.h"
 #include "efi-string.h"
-#include "efivars.h"
 #include "ticks.h"
 #include "util.h"
 
similarity index 100%
rename from src/boot/efivars.h
rename to src/boot/efi-efivars.h
similarity index 99%
rename from src/boot/log.c
rename to src/boot/efi-log.c
index edad4125c6a3e8669fb5ea6838a359ba0204d205..1810375c6aa35d05b3842e8bd4095caad56f68e5 100644 (file)
@@ -1,6 +1,6 @@
 /* SPDX-License-Identifier: LGPL-2.1-or-later */
 
-#include "log.h"
+#include "efi-log.h"
 #include "proto/rng.h"
 #include "util.h"
 
similarity index 100%
rename from src/boot/log.h
rename to src/boot/efi-log.h
index fb281ad394c795ccbe2256eff843dd1c859ebeb8..25ca62065a39f528f1d4c8566621dea5e85c1c84 100644 (file)
@@ -1,7 +1,7 @@
 /* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include "device-path-util.h"
-#include "efivars.h"
+#include "efi-efivars.h"
 #include "export-vars.h"
 #include "part-discovery.h"
 #include "url-discovery.h"
index 570ea2079e3366810fa44bd0f97ab75948e1d35e..48d03b5b807ef8ec18bf33c69fbb9bd7b32c1528 100644 (file)
@@ -298,13 +298,13 @@ libefi_sources = files(
         'devicetree.c',
         'drivers.c',
         'edid.c',
+        'efi-efivars.c',
         'efi-firmware.c',
+        'efi-log.c',
         'efi-string.c',
-        'efivars.c',
         'export-vars.c',
         'graphics.c',
         'initrd.c',
-        'log.c',
         'measure.c',
         'part-discovery.c',
         'pe.c',
index 9837a85ccd85ab4f0e9cdb9033c4a314849882dd..a4d7f5ba265a4f632ceb065957e1927e6a3604cb 100644 (file)
@@ -1,6 +1,6 @@
 /* SPDX-License-Identifier: LGPL-2.1-or-later */
 
-#include "efivars.h"
+#include "efi-efivars.h"
 #include "memory-util-fundamental.h"
 #include "proto/rng.h"
 #include "random-seed.h"
index f44a6f149b0267dfec4e97abbddb6fcbe8b9fe71..5781669a4c23013fac6cdf9033954aa9820ed267 100644 (file)
@@ -1,8 +1,8 @@
 /* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include "console.h"
+#include "efi-efivars.h"
 #include "efi-string-table.h"
-#include "efivars.h"
 #include "proto/security-arch.h"
 #include "secure-boot.h"
 #include "util.h"
index 09d87df530abb27bb88c7bacc76654f560a12dc8..c84e7fe589a5e700fe065999441ba58b00e97fbe 100644 (file)
@@ -9,7 +9,7 @@
  */
 
 #include "device-path-util.h"
-#include "efivars.h"
+#include "efi-efivars.h"
 #include "secure-boot.h"
 #include "shim.h"
 #include "util.h"
index 0e2b8812ee501c12f469690085c3eca6945db35d..e2674f6cd34865be69a4ef32a098c03d3e8679c3 100644 (file)
@@ -1,7 +1,7 @@
 /* SPDX-License-Identifier: LGPL-2.1-or-later */
 
+#include "efi-efivars.h"
 #include "efi-string.h"
-#include "efivars.h"
 #include "proto/device-path.h"
 #include "smbios.h"
 #include "string-util-fundamental.h"
index 9cc115a1f684da023073bea0c7d09a91f5e52fcd..a117d1133216efdc9b17e633df6d8aaad0644479 100644 (file)
@@ -5,7 +5,7 @@
 #include "cpio.h"
 #include "device-path-util.h"
 #include "devicetree.h"
-#include "efivars.h"
+#include "efi-efivars.h"
 #include "export-vars.h"
 #include "graphics.h"
 #include "iovec-util-fundamental.h"
index 951204683ef660dc6ae2b37a9c98c512399d98b0..959c78d2bc6007df6c5b6cf9656bab750e5da847 100644 (file)
@@ -1,6 +1,6 @@
 /* SPDX-License-Identifier: LGPL-2.1-or-later */
 
-#include "log.h"
+#include "efi-log.h"
 
 typedef struct {
         const char *filename;
index a218ee2cc1fd6b54d54c6887f1898578bbcfaf3c..20db520654b7c36de8b8cb28ea030f1537fa346a 100644 (file)
@@ -1,8 +1,8 @@
 /* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include "device-path-util.h"
+#include "efi-efivars.h"
 #include "efi-string.h"
-#include "efivars.h"
 #include "memory-util-fundamental.h"
 #include "proto/device-path.h"
 #include "proto/simple-text-io.h"
index 6b227680b450a5f7bfb87763a09706caabe7b578..4f0fe431498a14fba8d1e96ff4ea644eb2a3e996 100644 (file)
@@ -8,7 +8,7 @@
 
 #if SD_BOOT
 
-#include "log.h"
+#include "efi-log.h"
 #include "proto/file-io.h"
 
 /* This is provided by the linker. */
index 29dbd6ffdb63337d475d7ace25bcd3369013ae55..babe581073e90a845cccfe934bbe9962aaceed67 100644 (file)
@@ -8,7 +8,7 @@
 #include "device-path-util.h"
 #include "drivers.h"
 #include "efi-string.h"
-#include "efivars.h"
+#include "efi-efivars.h"
 #include "proto/device-path.h"
 #include "smbios.h"
 #include "string-util-fundamental.h"
similarity index 100%
rename from src/escape/escape.c
rename to src/escape/escape-tool.c
index d21b3722ccf5a37a6462931458b0bd35e6bbc1dd..94cd3b1fba2fdb079e40234d388299702ae4d832 100644 (file)
@@ -4,6 +4,6 @@ executables += [
         executable_template + {
                 'name' : 'systemd-escape',
                 'public' : true,
-                'sources' : files('escape.c'),
+                'sources' : files('escape-tool.c'),
         },
 ]
index 13a890170c5a5ca98a99c1e9c66b44b3a5a00736..e4e4f579dfa0639fc6c8fdb211f93c6d94c5d171 100644 (file)
@@ -8,7 +8,7 @@ executables += [
                         'HAVE_OPENSSL',
                         'HAVE_TPM2',
                 ],
-                'sources' : files('measure.c'),
+                'sources' : files('measure-tool.c'),
                 'dependencies' : libopenssl,
         },
 ]
index 97191fb171f42ebe3c10e9c9efcf346980657bcf..70c5a09bb20cee40a60ea49b280953eebbd61bac 100644 (file)
@@ -116,8 +116,8 @@ systemd_networkd_extract_sources = files(
 
 systemd_networkd_wait_online_sources = files(
         'wait-online/dns-configuration.c',
-        'wait-online/link.c',
-        'wait-online/manager.c',
+        'wait-online/wait-online-link.c',
+        'wait-online/wait-online-manager.c',
         'wait-online/wait-online.c',
 )
 
@@ -229,7 +229,7 @@ executables += [
         },
         libexec_template + {
                 'name' : 'systemd-network-generator',
-                'sources' : files('generator/network-generator.c', 'generator/main.c'),
+                'sources' : files('generator/network-generator.c', 'generator/network-generator-main.c'),
                 'extract' : files('generator/network-generator.c'),
                 'link_with' : networkd_link_with,
         },
similarity index 99%
rename from src/network/wait-online/link.c
rename to src/network/wait-online/wait-online-link.c
index 7515579edbbf47366a1f08d38d5fea4796e3b641..f7c2e4fc987ecec5e9be954bb04cfb1abf695d47 100644 (file)
@@ -6,10 +6,10 @@
 #include "dns-configuration.h"
 #include "format-ifname.h"
 #include "hashmap.h"
-#include "link.h"
-#include "manager.h"
 #include "string-util.h"
 #include "strv.h"
+#include "wait-online-link.h"
+#include "wait-online-manager.h"
 
 static Link* link_free(Link *l) {
 
similarity index 99%
rename from src/network/wait-online/manager.c
rename to src/network/wait-online/wait-online-manager.c
index c4318d3cf5c0dc1f9f58e8a73fc0227f9bc309ee..0ff2c77277ffd58844ce9b567f94e1e6925fdf4e 100644 (file)
 #include "alloc-util.h"
 #include "dns-configuration.h"
 #include "json-util.h"
-#include "link.h"
-#include "manager.h"
 #include "netlink-util.h"
+#include "string-util.h"
 #include "strv.h"
 #include "time-util.h"
+#include "wait-online-link.h"
+#include "wait-online-manager.h"
 
 static bool link_in_command_line_interfaces(Link *link, Manager *m) {
         assert(link);
index 58b485bbd1516c764744e3fa6282fcd7ac32e81e..c693b5335c85d53fa4e680602b5642c24985bb76 100644 (file)
 #include "daemon-util.h"
 #include "log.h"
 #include "main-func.h"
-#include "manager.h"
 #include "parse-argument.h"
 #include "pretty-print.h"
 #include "signal-util.h"
 #include "socket-util.h"
 #include "strv.h"
+#include "wait-online-manager.h"
 
 static bool arg_quiet = false;
 static usec_t arg_timeout = 120 * USEC_PER_SEC;
index 70d3dd0cfd08548c4ba0076566dc10d447893b9d..64c2e1d1919fc9cf40730faad79efa74c281e05d 100644 (file)
@@ -4,6 +4,6 @@ executables += [
         executable_template + {
                 'name' : 'systemd-path',
                 'public' : true,
-                'sources' : files('path.c'),
+                'sources' : files('path-tool.c'),
         },
 ]
similarity index 100%
rename from src/path/path.c
rename to src/path/path-tool.c
index daa2eefa7412bacb8dab3ec40935493fe1f7782f..6e8292f8d43ab89f27a05a04a263b4bd0f3876ef 100644 (file)
@@ -4,6 +4,6 @@ executables += [
         libexec_template + {
                 'name' : 'systemd-random-seed',
                 'conditions' : ['ENABLE_RANDOMSEED'],
-                'sources' : files('random-seed.c'),
+                'sources' : files('random-seed-tool.c'),
         },
 ]