[PATCH 17/31] qemu: block: Add accessors for storage source effective nodename

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Signed-off-by: Peter Krempa <pkrempa@xxxxxxxxxx>
---
 src/qemu/qemu_block.c | 14 ++++++++++++++
 src/qemu/qemu_block.h |  3 +++
 2 files changed, 17 insertions(+)

diff --git a/src/qemu/qemu_block.c b/src/qemu/qemu_block.c
index cba1fb1c1e..10c2c0104b 100644
--- a/src/qemu/qemu_block.c
+++ b/src/qemu/qemu_block.c
@@ -86,6 +86,20 @@ qemuBlockStorageSourceSetFormatNodename(virStorageSource *src,
 }


+/**
+ * qemuBlockStorageSourceGetEffectiveNodename:
+ * @src: virStorageSource to get the effective nodename of
+ *
+ * Gets the nodename that exposes the guest visible data. This function always
+ * returns a name.
+ */
+const char *
+qemuBlockStorageSourceGetEffectiveNodename(virStorageSource *src)
+{
+    return src->nodeformat;
+}
+
+
 /**
  * qemuBlockStorageSourceGetEffectiveStorageNodename:
  * @src: virStorageSource to get the effective nodename of
diff --git a/src/qemu/qemu_block.h b/src/qemu/qemu_block.h
index 6ed0aa85b2..7008a4e7da 100644
--- a/src/qemu/qemu_block.h
+++ b/src/qemu/qemu_block.h
@@ -43,6 +43,9 @@ qemuBlockStorageSourceGetStorageNodename(virStorageSource *src);
 const char *
 qemuBlockStorageSourceGetFormatNodename(virStorageSource *src);

+const char *
+qemuBlockStorageSourceGetEffectiveNodename(virStorageSource *src);
+

 typedef struct qemuBlockNodeNameBackingChainData qemuBlockNodeNameBackingChainData;
 struct qemuBlockNodeNameBackingChainData {
-- 
2.41.0




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux