[PATCH v1 07/21] virscsi: Introduce virSCSIDeviceGetPath

[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/virscsi.c       | 6 ++++++
 src/util/virscsi.h       | 1 +
 3 files changed, 8 insertions(+)

diff --git a/src/libvirt_private.syms b/src/libvirt_private.syms
index 8a172c3..a5eb852 100644
--- a/src/libvirt_private.syms
+++ b/src/libvirt_private.syms
@@ -2296,6 +2296,7 @@ virSCSIDeviceGetAdapter;
 virSCSIDeviceGetBus;
 virSCSIDeviceGetDevName;
 virSCSIDeviceGetName;
+virSCSIDeviceGetPath;
 virSCSIDeviceGetReadonly;
 virSCSIDeviceGetSgName;
 virSCSIDeviceGetShareable;
diff --git a/src/util/virscsi.c b/src/util/virscsi.c
index 4843367..4fd8838 100644
--- a/src/util/virscsi.c
+++ b/src/util/virscsi.c
@@ -315,6 +315,12 @@ virSCSIDeviceGetName(virSCSIDevicePtr dev)
     return dev->name;
 }
 
+const char *
+virSCSIDeviceGetPath(virSCSIDevicePtr dev)
+{
+    return dev->sg_path;
+}
+
 unsigned int
 virSCSIDeviceGetAdapter(virSCSIDevicePtr dev)
 {
diff --git a/src/util/virscsi.h b/src/util/virscsi.h
index df40d7f..7d88d4e 100644
--- a/src/util/virscsi.h
+++ b/src/util/virscsi.h
@@ -58,6 +58,7 @@ int virSCSIDeviceSetUsedBy(virSCSIDevicePtr dev,
                            const char *domname);
 bool virSCSIDeviceIsAvailable(virSCSIDevicePtr dev);
 const char *virSCSIDeviceGetName(virSCSIDevicePtr dev);
+const char *virSCSIDeviceGetPath(virSCSIDevicePtr dev);
 unsigned int virSCSIDeviceGetAdapter(virSCSIDevicePtr dev);
 unsigned int virSCSIDeviceGetBus(virSCSIDevicePtr dev);
 unsigned int virSCSIDeviceGetTarget(virSCSIDevicePtr dev);
-- 
2.8.4

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