[libvirt] [PATCH v2 06/21] virscsivhost: Introduce virSCSIVHostDeviceGetPath

Michal Privoznik mprivozn at redhat.com
Wed Dec 7 08:36:13 UTC 2016


We will need this function in near future so that we know what
/dev device corresponds to the SCSI device.

Signed-off-by: Michal Privoznik <mprivozn at redhat.com>
---
 src/libvirt_private.syms | 1 +
 src/util/virscsivhost.c  | 7 +++++++
 src/util/virscsivhost.h  | 1 +
 3 files changed, 9 insertions(+)

diff --git a/src/libvirt_private.syms b/src/libvirt_private.syms
index b89320713..0fd673acf 100644
--- a/src/libvirt_private.syms
+++ b/src/libvirt_private.syms
@@ -2332,6 +2332,7 @@ virSCSIDeviceSetUsedBy;
 virSCSIVHostDeviceFileIterate;
 virSCSIVHostDeviceFree;
 virSCSIVHostDeviceGetName;
+virSCSIVHostDeviceGetPath;
 virSCSIVHostDeviceListAdd;
 virSCSIVHostDeviceListCount;
 virSCSIVHostDeviceListDel;
diff --git a/src/util/virscsivhost.c b/src/util/virscsivhost.c
index f32d647eb..dc7df757a 100644
--- a/src/util/virscsivhost.c
+++ b/src/util/virscsivhost.c
@@ -243,6 +243,13 @@ virSCSIVHostDeviceGetName(virSCSIVHostDevicePtr dev)
 }
 
 
+const char *
+virSCSIVHostDeviceGetPath(virSCSIVHostDevicePtr dev)
+{
+    return dev->path;
+}
+
+
 virSCSIVHostDevicePtr
 virSCSIVHostDeviceNew(const char *name)
 {
diff --git a/src/util/virscsivhost.h b/src/util/virscsivhost.h
index 1a52acf02..6018b835e 100644
--- a/src/util/virscsivhost.h
+++ b/src/util/virscsivhost.h
@@ -40,6 +40,7 @@ int virSCSIVHostDeviceFileIterate(virSCSIVHostDevicePtr dev,
                                   virSCSIVHostDeviceFileActor actor,
                                   void *opaque);
 const char *virSCSIVHostDeviceGetName(virSCSIVHostDevicePtr dev);
+const char *virSCSIVHostDeviceGetPath(virSCSIVHostDevicePtr dev);
 virSCSIVHostDevicePtr virSCSIVHostDeviceListGet(virSCSIVHostDeviceListPtr list,
                                                 int idx);
 size_t virSCSIVHostDeviceListCount(virSCSIVHostDeviceListPtr list);
-- 
2.11.0




More information about the libvir-list mailing list