shared: move storage-util to libshared

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>
This commit is contained in:
Christian Brauner
2026-05-06 10:30:16 +02:00
parent eaa0073027
commit efb0a0fa7a
4 changed files with 1 additions and 3 deletions
+1
View 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',
-3
View 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'],
},
]