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(a)redhat.com>
---
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 c91f3798f..b89320713 100644
--- a/src/libvirt_private.syms
+++ b/src/libvirt_private.syms
@@ -2310,6 +2310,7 @@ virSCSIDeviceGetAdapter;
virSCSIDeviceGetBus;
virSCSIDeviceGetDevName;
virSCSIDeviceGetName;
+virSCSIDeviceGetPath;
virSCSIDeviceGetReadonly;
virSCSIDeviceGetSgName;
virSCSIDeviceGetShareable;
diff --git a/src/util/virscsi.c b/src/util/virscsi.c
index 4843367e0..4fd883875 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 df40d7f62..7d88d4e70 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.11.0