]> xenbits.xensource.com Git - libvirt.git/commitdiff
virscsivhost: Introduce virSCSIVHostDeviceGetPath
authorMichal Privoznik <mprivozn@redhat.com>
Tue, 6 Dec 2016 15:06:02 +0000 (16:06 +0100)
committerMichal Privoznik <mprivozn@redhat.com>
Thu, 15 Dec 2016 08:25:16 +0000 (09:25 +0100)
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@redhat.com>
src/libvirt_private.syms
src/util/virscsivhost.c
src/util/virscsivhost.h

index 9afb765fbf6497afb9c1e172b55184e46c43fe7e..d2730f188b7e93d2e8bbcb4a3e3222dfb2fabc14 100644 (file)
@@ -2334,6 +2334,7 @@ virSCSIDeviceSetUsedBy;
 virSCSIVHostDeviceFileIterate;
 virSCSIVHostDeviceFree;
 virSCSIVHostDeviceGetName;
+virSCSIVHostDeviceGetPath;
 virSCSIVHostDeviceListAdd;
 virSCSIVHostDeviceListCount;
 virSCSIVHostDeviceListDel;
index f32d647ebf171220efbee2f31362a3ca9efc4fe9..dc7df757a1b6eb1620f7c608044e74a112e28cfa 100644 (file)
@@ -243,6 +243,13 @@ virSCSIVHostDeviceGetName(virSCSIVHostDevicePtr dev)
 }
 
 
+const char *
+virSCSIVHostDeviceGetPath(virSCSIVHostDevicePtr dev)
+{
+    return dev->path;
+}
+
+
 virSCSIVHostDevicePtr
 virSCSIVHostDeviceNew(const char *name)
 {
index 1a52acf02e53c11b8e641717a823b43773d32233..6018b835e9d90d05bc75e763c45153a416f6abef 100644 (file)
@@ -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);