virscsi: Introduce virSCSIDeviceGetPath

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-11-16 15:27:20 +01:00
parent c4237d8e0c
commit 6bcacd55e5
3 changed files with 8 additions and 0 deletions

View File

@ -2312,6 +2312,7 @@ virSCSIDeviceGetAdapter;
virSCSIDeviceGetBus; virSCSIDeviceGetBus;
virSCSIDeviceGetDevName; virSCSIDeviceGetDevName;
virSCSIDeviceGetName; virSCSIDeviceGetName;
virSCSIDeviceGetPath;
virSCSIDeviceGetReadonly; virSCSIDeviceGetReadonly;
virSCSIDeviceGetSgName; virSCSIDeviceGetSgName;
virSCSIDeviceGetShareable; virSCSIDeviceGetShareable;

View File

@ -315,6 +315,12 @@ virSCSIDeviceGetName(virSCSIDevicePtr dev)
return dev->name; return dev->name;
} }
const char *
virSCSIDeviceGetPath(virSCSIDevicePtr dev)
{
return dev->sg_path;
}
unsigned int unsigned int
virSCSIDeviceGetAdapter(virSCSIDevicePtr dev) virSCSIDeviceGetAdapter(virSCSIDevicePtr dev)
{ {

View File

@ -58,6 +58,7 @@ int virSCSIDeviceSetUsedBy(virSCSIDevicePtr dev,
const char *domname); const char *domname);
bool virSCSIDeviceIsAvailable(virSCSIDevicePtr dev); bool virSCSIDeviceIsAvailable(virSCSIDevicePtr dev);
const char *virSCSIDeviceGetName(virSCSIDevicePtr dev); const char *virSCSIDeviceGetName(virSCSIDevicePtr dev);
const char *virSCSIDeviceGetPath(virSCSIDevicePtr dev);
unsigned int virSCSIDeviceGetAdapter(virSCSIDevicePtr dev); unsigned int virSCSIDeviceGetAdapter(virSCSIDevicePtr dev);
unsigned int virSCSIDeviceGetBus(virSCSIDevicePtr dev); unsigned int virSCSIDeviceGetBus(virSCSIDevicePtr dev);
unsigned int virSCSIDeviceGetTarget(virSCSIDevicePtr dev); unsigned int virSCSIDeviceGetTarget(virSCSIDevicePtr dev);