}
-static virNodeDevicePtr
-nodeDeviceLookupByWWN(virConnectPtr conn,
- const char *wwnn,
- const char *wwpn)
+virNodeDevicePtr
+nodeDeviceLookupSCSIHostByWWN(virConnectPtr conn,
+ const char *wwnn,
+ const char *wwpn,
+ unsigned int flags)
{
unsigned int i;
virDeviceMonitorStatePtr driver = conn->devMonPrivateData;
virNodeDeviceObjPtr obj = NULL;
virNodeDevicePtr dev = NULL;
+ virCheckFlags(0, NULL);
+
nodeDeviceLock(driver);
for (i = 0; i < devs->count; i++) {
virFileWaitForDevices();
- dev = nodeDeviceLookupByWWN(conn, wwnn, wwpn);
+ dev = nodeDeviceLookupSCSIHostByWWN(conn, wwnn, wwpn, 0);
if (dev != NULL) {
break;
virNodeDevicePtr **devices,
unsigned int flags);
virNodeDevicePtr nodeDeviceLookupByName(virConnectPtr conn, const char *name);
+virNodeDevicePtr nodeDeviceLookupSCSIHostByWWN(virConnectPtr conn,
+ const char *wwnn,
+ const char *wwpn,
+ unsigned int flags);
char *nodeDeviceGetXMLDesc(virNodeDevicePtr dev, unsigned int flags);
char *nodeDeviceGetParent(virNodeDevicePtr dev);
int nodeDeviceNumOfCaps(virNodeDevicePtr dev);
.listDevices = nodeListDevices, /* 0.5.0 */
.listAllNodeDevices = nodeListAllNodeDevices, /* 0.10.2 */
.deviceLookupByName = nodeDeviceLookupByName, /* 0.5.0 */
+ .deviceLookupSCSIHostByWWN = nodeDeviceLookupSCSIHostByWWN, /* 1.0.2 */
.deviceGetXMLDesc = nodeDeviceGetXMLDesc, /* 0.5.0 */
.deviceGetParent = nodeDeviceGetParent, /* 0.5.0 */
.deviceNumOfCaps = nodeDeviceNumOfCaps, /* 0.5.0 */
.listDevices = nodeListDevices, /* 0.7.3 */
.listAllNodeDevices = nodeListAllNodeDevices, /* 0.10.2 */
.deviceLookupByName = nodeDeviceLookupByName, /* 0.7.3 */
+ .deviceLookupSCSIHostByWWN = nodeDeviceLookupSCSIHostByWWN, /* 1.0.2 */
.deviceGetXMLDesc = nodeDeviceGetXMLDesc, /* 0.7.3 */
.deviceGetParent = nodeDeviceGetParent, /* 0.7.3 */
.deviceNumOfCaps = nodeDeviceNumOfCaps, /* 0.7.3 */