[PATCH v2 06/21] virscsivhost: Introduce virSCSIVHostDeviceGetPath

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

 



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@xxxxxxxxxx>
---
 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

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list



[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