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 <mprivozn@redhat.com>
This commit is contained in:
Michal Privoznik 2016-12-06 16:06:02 +01:00
parent 6bcacd55e5
commit 5ac52bd0fe
3 changed files with 9 additions and 0 deletions

View File

@ -2334,6 +2334,7 @@ virSCSIDeviceSetUsedBy;
virSCSIVHostDeviceFileIterate; virSCSIVHostDeviceFileIterate;
virSCSIVHostDeviceFree; virSCSIVHostDeviceFree;
virSCSIVHostDeviceGetName; virSCSIVHostDeviceGetName;
virSCSIVHostDeviceGetPath;
virSCSIVHostDeviceListAdd; virSCSIVHostDeviceListAdd;
virSCSIVHostDeviceListCount; virSCSIVHostDeviceListCount;
virSCSIVHostDeviceListDel; virSCSIVHostDeviceListDel;

View File

@ -243,6 +243,13 @@ virSCSIVHostDeviceGetName(virSCSIVHostDevicePtr dev)
} }
const char *
virSCSIVHostDeviceGetPath(virSCSIVHostDevicePtr dev)
{
return dev->path;
}
virSCSIVHostDevicePtr virSCSIVHostDevicePtr
virSCSIVHostDeviceNew(const char *name) virSCSIVHostDeviceNew(const char *name)
{ {

View File

@ -40,6 +40,7 @@ int virSCSIVHostDeviceFileIterate(virSCSIVHostDevicePtr dev,
virSCSIVHostDeviceFileActor actor, virSCSIVHostDeviceFileActor actor,
void *opaque); void *opaque);
const char *virSCSIVHostDeviceGetName(virSCSIVHostDevicePtr dev); const char *virSCSIVHostDeviceGetName(virSCSIVHostDevicePtr dev);
const char *virSCSIVHostDeviceGetPath(virSCSIVHostDevicePtr dev);
virSCSIVHostDevicePtr virSCSIVHostDeviceListGet(virSCSIVHostDeviceListPtr list, virSCSIVHostDevicePtr virSCSIVHostDeviceListGet(virSCSIVHostDeviceListPtr list,
int idx); int idx);
size_t virSCSIVHostDeviceListCount(virSCSIVHostDeviceListPtr list); size_t virSCSIVHostDeviceListCount(virSCSIVHostDeviceListPtr list);