]> xenbits.xensource.com Git - people/liuw/libxenctrl-split/libvirt.git/commitdiff
nodedev: invert virIsCapableFCHost return value
authorJán Tomko <jtomko@redhat.com>
Thu, 28 Mar 2013 15:46:55 +0000 (16:46 +0100)
committerOsier Yang <jyang@redhat.com>
Fri, 29 Mar 2013 03:32:04 +0000 (11:32 +0800)
Both virIsCapableFCHost and virIsCapableVport return 0 when the
respective sysfs path is accessible.

src/node_device/node_device_linux_sysfs.c

index a1c36372b17a4c7b41744575334a64efe157d9d3..fd9143062056745d979bffcf4f2bf403afdb805f 100644 (file)
@@ -46,7 +46,7 @@ detect_scsi_host_caps_linux(union _virNodeDevCapData *d)
 
     VIR_DEBUG("Checking if host%d is an FC HBA", d->scsi_host.host);
 
-    if (virIsCapableFCHost(NULL, d->scsi_host.host)) {
+    if (virIsCapableFCHost(NULL, d->scsi_host.host) == 0) {
         d->scsi_host.flags |= VIR_NODE_DEV_CAP_FLAG_HBA_FC_HOST;
 
         if (virReadFCHost(NULL,