]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
shared: move storage-util to libshared
authorChristian Brauner <brauner@kernel.org>
Fri, 1 May 2026 11:29:56 +0000 (13:29 +0200)
committerChristian Brauner <brauner@kernel.org>
Wed, 6 May 2026 08:30:16 +0000 (10:30 +0200)
The storage backend providers (block, fs) and storagectl currently each
extract storage-util.c into their target. Several upcoming consumers
(machine-util's BindVolume parser, vmspawn's hotplug glue, machinectl's
new bind-volume verbs) need the StorageProvider type/string-table
helpers and a future shared Acquire client helper.

Move storage-util.{c,h} to src/shared so libshared exports the symbols
once and every consumer (storage providers, storagectl, libshared
itself) picks them up by linking libshared. Drop the now-redundant
'extract'/'objects' wiring in src/storage/meson.build.

No code changes; this is purely a relocation.

Signed-off-by: Christian Brauner (Amutable) <brauner@kernel.org>
src/shared/meson.build
src/shared/storage-util.c [moved from src/storage/storage-util.c with 100% similarity]
src/shared/storage-util.h [moved from src/storage/storage-util.h with 100% similarity]
src/storage/meson.build

index 0529d35d26586a27d30d26d5e0a33ee0b1d919b5..d4cd5ca431233fce5f392da9ecf8ebdc93946a16 100644 (file)
@@ -199,6 +199,7 @@ shared_sources = files(
         'socket-netlink.c',
         'specifier.c',
         'ssl-util.c',
+        'storage-util.c',
         'switch-root.c',
         'swtpm-util.c',
         'tar-util.c',
index 21456141dec8c6052178d1d0876e0222a7fa92c8..bcd68e612da9b7314d48a8d1f8564e2f89767d7a 100644 (file)
@@ -4,18 +4,15 @@ executables += [
         libexec_template + {
                 'name' : 'systemd-storage-block',
                 'sources' : files('storage-block.c'),
-                'extract' : files('storage-util.c')
         },
         libexec_template + {
                 'name' : 'systemd-storage-fs',
                 'sources' : files('storage-fs.c'),
-                'objects' : ['systemd-storage-block'],
         },
         executable_template + {
                 'name' : 'storagectl',
                 'public' : true,
                 'sources' : files('storagectl.c'),
-                'objects' : ['systemd-storage-block'],
         },
 ]