diff options
author | Osier Yang <jyang@redhat.com> | 2013-02-04 21:03:11 +0800 |
---|---|---|
committer | Osier Yang <jyang@redhat.com> | 2013-02-12 00:23:57 +0800 |
commit | fb2e465362a53ada9ef6d3088c6dd63b4d85969f (patch) | |
tree | 32d547d4830c7b43917da157a24ddff48754adc0 /src/node_device/node_device_driver.c | |
parent | 39758e7567b766f1df3948ea671d6ccb93daf7a9 (diff) | |
download | libvirt-fb2e465362a53ada9ef6d3088c6dd63b4d85969f.tar.gz |
nodedev: Implement virNodeDeviceLookupSCSIHostByWWN
This just simply changes nodeDeviceLookupByWWN to be not static,
and its name into nodeDeviceLookupSCSIHostByWWN. And use that for
udev and HAL backends.
Diffstat (limited to 'src/node_device/node_device_driver.c')
-rw-r--r-- | src/node_device/node_device_driver.c | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/src/node_device/node_device_driver.c b/src/node_device/node_device_driver.c index 2b460417e1..64fd8316e3 100644 --- a/src/node_device/node_device_driver.c +++ b/src/node_device/node_device_driver.c @@ -224,10 +224,11 @@ cleanup: } -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; @@ -236,6 +237,8 @@ nodeDeviceLookupByWWN(virConnectPtr conn, virNodeDeviceObjPtr obj = NULL; virNodeDevicePtr dev = NULL; + virCheckFlags(0, NULL); + nodeDeviceLock(driver); for (i = 0; i < devs->count; i++) { @@ -546,7 +549,7 @@ find_new_device(virConnectPtr conn, const char *wwnn, const char *wwpn) virFileWaitForDevices(); - dev = nodeDeviceLookupByWWN(conn, wwnn, wwpn); + dev = nodeDeviceLookupSCSIHostByWWN(conn, wwnn, wwpn, 0); if (dev != NULL) { break; |