Re: [PATCH] libvirt-perl: Fix the wrong binding of virNodeDeviceLookupSCSIHostByWWN

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 27/11/13 17:29, Daniel P. Berrange wrote:
On Wed, Nov 27, 2013 at 03:04:26PM +0800, Osier Yang wrote:
The second parameter for virNodeDeviceLookupSCSIHostByWWN is "wwnn"
instead of "wwpn", and the API supports "flags".
---
  AUTHORS                    | 1 +
  lib/Sys/Virt/NodeDevice.pm | 5 +++--
  2 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/AUTHORS b/AUTHORS
index d53f191..c2af49a 100644
--- a/AUTHORS
+++ b/AUTHORS
@@ -12,5 +12,6 @@ Patches contributed by:
     Stepan Kasal      <skasal-at-redhat-dot-com>
     Ludwig Nussel     <ludwig-dot-nussel-at-suse-dot-de>
     Zhe Peng          <zpeng-at-redhat-dot-com>
+   Osier Yang        <jyang-at-redhat-dot-com>
-- End
diff --git a/lib/Sys/Virt/NodeDevice.pm b/lib/Sys/Virt/NodeDevice.pm
index 984910d..29ceac7 100644
--- a/lib/Sys/Virt/NodeDevice.pm
+++ b/lib/Sys/Virt/NodeDevice.pm
@@ -51,10 +51,11 @@ sub _new {
      my $self;
      if (exists $params{name}) {
  	$self = Sys::Virt::NodeDevice::_lookup_by_name($con,  $params{name});
-    } elsif (exists $params{wwpn}) {
+    } elsif (exists $params{wwnn}) {
  	$self = Sys::Virt::NodeDevice::_lookup_scsihost_by_wwn($con,
+							       $params{wwnn},
  							       $params{wwpn},
-							       $params{wwnn});
+                                                               $params{flags});
ACK if you fix the indentation to be consistent (yes, this file is using
tabs in places)

Thanks, pushed with the indention fixed.

Osier

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]