summaryrefslogtreecommitdiff
path: root/src/driver.h
diff options
context:
space:
mode:
authorOsier Yang <jyang@redhat.com>2013-02-04 21:03:09 +0800
committerOsier Yang <jyang@redhat.com>2013-02-12 00:23:57 +0800
commitefed366eb738ead959cfbb821d60b370a0dd585d (patch)
tree32210b029dd55eaee3811b9397ba16bf5ea0b84d /src/driver.h
parent0ab49601a8d2900e940102a1cdfda6e15631bee4 (diff)
downloadlibvirt-efed366eb738ead959cfbb821d60b370a0dd585d.tar.gz
Introduce API virNodeDeviceLookupSCSIHostByWWN
Since the name (like scsi_host10) is not stable for vHBA, (it can be changed either after recreating or system rebooting), current API virNodeDeviceLookupByName is not nice to use for management app in this case. (E.g. one wants to destroy the vHBA whose name has been changed after system rebooting, he has to find out current name first). Later patches will support the persistent vHBA via storage pool, with which one can identify the vHBA stably by the wwnn && wwpn pair. So this new API comes.
Diffstat (limited to 'src/driver.h')
-rw-r--r--src/driver.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/driver.h b/src/driver.h
index 02ddd83d11..8d0f0a56e1 100644
--- a/src/driver.h
+++ b/src/driver.h
@@ -1553,6 +1553,11 @@ typedef int (*virDevMonListAllNodeDevices)(virConnectPtr conn,
typedef virNodeDevicePtr (*virDevMonDeviceLookupByName)(virConnectPtr conn,
const char *name);
+typedef virNodeDevicePtr (*virDevMonDeviceLookupSCSIHostByWWN)(virConnectPtr conn,
+ const char *wwnn,
+ const char *wwpn,
+ unsigned int flags);
+
typedef char * (*virDevMonDeviceGetXMLDesc)(virNodeDevicePtr dev,
unsigned int flags);
@@ -1584,6 +1589,7 @@ struct _virDeviceMonitor {
virDevMonListDevices listDevices;
virDevMonListAllNodeDevices listAllNodeDevices;
virDevMonDeviceLookupByName deviceLookupByName;
+ virDevMonDeviceLookupSCSIHostByWWN deviceLookupSCSIHostByWWN;
virDevMonDeviceGetXMLDesc deviceGetXMLDesc;
virDevMonDeviceGetParent deviceGetParent;
virDevMonDeviceNumOfCaps deviceNumOfCaps;