On a Monday in 2023, Peter Krempa wrote:
Introduce a set of accessors, which return node names based on
semantics. This will allow to us to modify how we setup the backing
chain in cases when e.g. the format driver can be omitted, without
breaking all the code.
Signed-off-by: Peter Krempa <pkrempa(a)redhat.com>
---
src/qemu/qemu_block.c | 48 +++++++++++++++++++++++++++++++++++++++++++
src/qemu/qemu_block.h | 11 ++++++++++
2 files changed, 59 insertions(+)
diff --git a/src/qemu/qemu_block.c b/src/qemu/qemu_block.c
index 07bc8ede76..0c9460f678 100644
--- a/src/qemu/qemu_block.c
+++ b/src/qemu/qemu_block.c
@@ -52,6 +52,54 @@ qemuBlockNodeNameValidate(const char *nn)
}
+/**
+ * qemuBlockStorageSourceSetStorageNodename:
+ * @src: virStorageSource to set the storage nodename
+ * @nodename: The node name to set (stolen)
But that's stealing!
+ *
+ * Sets @nodename as the storage node name of @src. Using NULL @nodename clears
+ * the nodename. @src takes ownership of @nodename.
+ */
Reviewed-by: Ján Tomko <jtomko(a)redhat.com>
Jano