From: Michal Privoznik Date: Tue, 6 Dec 2016 15:06:02 +0000 (+0100) Subject: virscsivhost: Introduce virSCSIVHostDeviceGetPath X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=5ac52bd0fe80d1741071250f485ae54375508e48;p=libvirt.git virscsivhost: Introduce virSCSIVHostDeviceGetPath 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 --- diff --git a/src/libvirt_private.syms b/src/libvirt_private.syms index 9afb765fbf..d2730f188b 100644 --- a/src/libvirt_private.syms +++ b/src/libvirt_private.syms @@ -2334,6 +2334,7 @@ virSCSIDeviceSetUsedBy; virSCSIVHostDeviceFileIterate; virSCSIVHostDeviceFree; virSCSIVHostDeviceGetName; +virSCSIVHostDeviceGetPath; virSCSIVHostDeviceListAdd; virSCSIVHostDeviceListCount; virSCSIVHostDeviceListDel; diff --git a/src/util/virscsivhost.c b/src/util/virscsivhost.c index f32d647ebf..dc7df757a1 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 1a52acf02e..6018b835e9 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);