From: Christian Brauner Date: Fri, 1 May 2026 11:29:56 +0000 (+0200) Subject: shared: move storage-util to libshared X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=efb0a0fa7a4c4f25a5abb5df60f4813951279772;p=thirdparty%2Fsystemd.git 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) --- diff --git a/src/shared/meson.build b/src/shared/meson.build index 0529d35d265..d4cd5ca4312 100644 --- a/src/shared/meson.build +++ b/src/shared/meson.build @@ -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', diff --git a/src/storage/storage-util.c b/src/shared/storage-util.c similarity index 100% rename from src/storage/storage-util.c rename to src/shared/storage-util.c diff --git a/src/storage/storage-util.h b/src/shared/storage-util.h similarity index 100% rename from src/storage/storage-util.h rename to src/shared/storage-util.h diff --git a/src/storage/meson.build b/src/storage/meson.build index 21456141dec..bcd68e612da 100644 --- a/src/storage/meson.build +++ b/src/storage/meson.build @@ -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'], }, ]