]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
nodedev: fix vport detection for FC HBA
authorJán Tomko <jtomko@redhat.com>
Wed, 12 Jun 2013 08:30:13 +0000 (10:30 +0200)
committerJán Tomko <jtomko@redhat.com>
Tue, 18 Jun 2013 13:29:42 +0000 (15:29 +0200)
Use the host number as the host number when constructing the sysfs path
instead of the variable we are trying to fill.

https://bugzilla.redhat.com/show_bug.cgi?id=973543
(cherry picked from commit 371c15517c919e9d7d2ea3f66e490bd49b6db384)

src/node_device/node_device_linux_sysfs.c

index 0c8461936434d182e1ac256999560cd9b160f865..9f57f55a82205caa8c64da87c00183c7d695a931 100644 (file)
@@ -79,7 +79,7 @@ detect_scsi_host_caps(union _virNodeDevCapData *d)
         d->scsi_host.flags |= VIR_NODE_DEV_CAP_FLAG_HBA_VPORT_OPS;
 
         if (virReadFCHost(NULL,
-                          d->scsi_host.max_vports,
+                          d->scsi_host.host,
                           "max_npiv_vports",
                           &max_vports) < 0) {
             VIR_ERROR(_("Failed to read max_npiv_vports for host%d"),
@@ -88,7 +88,7 @@ detect_scsi_host_caps(union _virNodeDevCapData *d)
         }
 
          if (virReadFCHost(NULL,
-                          d->scsi_host.max_vports,
+                          d->scsi_host.host,
                           "npiv_vports_inuse",
                           &vports) < 0) {
             VIR_ERROR(_("Failed to read npiv_vports_inuse for host%d"),