From nobody Thu May 15 04:07:09 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; envelope-from=libvir-list-bounces@redhat.com; helo=mx1.redhat.com; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1516872276205449.80765835846194; Thu, 25 Jan 2018 01:24:36 -0800 (PST) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 50677780EE; Thu, 25 Jan 2018 09:24:35 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 204A35C8B7; Thu, 25 Jan 2018 09:24:35 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id D54C53FC73; Thu, 25 Jan 2018 09:24:34 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id w0P9OX0i032712 for ; Thu, 25 Jan 2018 04:24:33 -0500 Received: by smtp.corp.redhat.com (Postfix) id 1D92F2C315; Thu, 25 Jan 2018 09:24:33 +0000 (UTC) Received: from beluga.usersys.redhat.com (unknown [10.43.2.166]) by smtp.corp.redhat.com (Postfix) with ESMTP id 03DB12C314; Thu, 25 Jan 2018 09:24:27 +0000 (UTC) From: Erik Skultety To: libvir-list@redhat.com Date: Thu, 25 Jan 2018 10:23:52 +0100 Message-Id: <72172317b8e0bd9df4dad457b542f2d290530a4b.1516872173.git.eskultet@redhat.com> In-Reply-To: References: In-Reply-To: References: X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-loop: libvir-list@redhat.com Cc: Erik Skultety Subject: [libvirt] [PATCH 05/15] nodedev: Move the sysfs-related cap handling to node_device_conf.c X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.27]); Thu, 25 Jan 2018 09:24:35 +0000 (UTC) X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" The capabilities are defined/parsed/formatted/queried from this module, no reason for 'update' not being part of the module as well. This also involves some module-specific prefix changes. This patch also drops the node_device_linux_sysfs module from the repo since: a) it only contained the capability handlers we just moved b) it's only linked with the driver (by design) and thus unreachable to other modules c) we touch sysfs across all the src/util modules so the module being deleted hasn't been serving its original intention for some time already. Signed-off-by: Erik Skultety --- src/Makefile.am | 4 +- src/conf/node_device_conf.c | 154 +++++++++++++++++++++- src/conf/node_device_conf.h | 7 + src/libvirt_private.syms | 2 + src/node_device/node_device_driver.c | 7 +- src/node_device/node_device_hal.c | 1 - src/node_device/node_device_linux_sysfs.c | 206 --------------------------= ---- src/node_device/node_device_linux_sysfs.h | 33 ----- src/node_device/node_device_udev.c | 5 +- 9 files changed, 168 insertions(+), 251 deletions(-) delete mode 100644 src/node_device/node_device_linux_sysfs.c delete mode 100644 src/node_device/node_device_linux_sysfs.h diff --git a/src/Makefile.am b/src/Makefile.am index 166c9a8e9..b8ecd8df8 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -1168,9 +1168,7 @@ ACCESS_DRIVER_POLKIT_POLICY =3D \ =20 NODE_DEVICE_DRIVER_SOURCES =3D \ node_device/node_device_driver.c \ - node_device/node_device_driver.h \ - node_device/node_device_linux_sysfs.c \ - node_device/node_device_linux_sysfs.h + node_device/node_device_driver.h =20 NODE_DEVICE_DRIVER_HAL_SOURCES =3D \ node_device/node_device_hal.c \ diff --git a/src/conf/node_device_conf.c b/src/conf/node_device_conf.c index 70a753ebf..5b0af559a 100644 --- a/src/conf/node_device_conf.c +++ b/src/conf/node_device_conf.c @@ -33,11 +33,13 @@ #include "virstring.h" #include "node_device_conf.h" #include "device_conf.h" +#include "dirname.h" #include "virxml.h" #include "virbuffer.h" #include "viruuid.h" #include "virrandom.h" #include "virlog.h" +#include "virfcp.h" =20 #define VIR_FROM_THIS VIR_FROM_NODEDEV =20 @@ -2514,10 +2516,160 @@ virNodeDeviceGetSCSIHostCaps(virNodeDevCapSCSIHost= Ptr scsi_host) return ret; } =20 + +int +virNodeDeviceGetSCSITargetCaps(const char *sysfsPath, + virNodeDevCapSCSITargetPtr scsi_target) +{ + int ret =3D -1; + char *dir =3D NULL, *rport =3D NULL; + + VIR_DEBUG("Checking if '%s' is an FC remote port", scsi_target->name); + + /* /sys/devices/[...]/host0/rport-0:0-0/target0:0:0 -> rport-0:0-0 */ + if (!(dir =3D mdir_name(sysfsPath))) + return -1; + + if (VIR_STRDUP(rport, last_component(dir)) < 0) + goto cleanup; + + if (!virFCIsCapableRport(rport)) + goto cleanup; + + VIR_FREE(scsi_target->rport); + VIR_STEAL_PTR(scsi_target->rport, rport); + + if (virFCReadRportValue(scsi_target->rport, "port_name", + &scsi_target->wwpn) < 0) { + VIR_WARN("Failed to read port_name for '%s'", scsi_target->rport); + goto cleanup; + } + + scsi_target->flags |=3D VIR_NODE_DEV_CAP_FLAG_FC_RPORT; + ret =3D 0; + + cleanup: + if (ret < 0) { + VIR_FREE(scsi_target->rport); + VIR_FREE(scsi_target->wwpn); + scsi_target->flags &=3D ~VIR_NODE_DEV_CAP_FLAG_FC_RPORT; + } + VIR_FREE(rport); + VIR_FREE(dir); + + return ret; +} + + +static int +virNodeDeviceGetPCISRIOVCaps(const char *sysfsPath, + virNodeDevCapPCIDevPtr pci_dev) +{ + size_t i; + int ret; + + /* this could be a refresh, so clear out the old data */ + for (i =3D 0; i < pci_dev->num_virtual_functions; i++) + VIR_FREE(pci_dev->virtual_functions[i]); + VIR_FREE(pci_dev->virtual_functions); + pci_dev->num_virtual_functions =3D 0; + pci_dev->max_virtual_functions =3D 0; + pci_dev->flags &=3D ~VIR_NODE_DEV_CAP_FLAG_PCI_VIRTUAL_FUNCTION; + pci_dev->flags &=3D ~VIR_NODE_DEV_CAP_FLAG_PCI_PHYSICAL_FUNCTION; + + ret =3D virPCIGetPhysicalFunction(sysfsPath, + &pci_dev->physical_function); + if (ret < 0) + goto cleanup; + + if (pci_dev->physical_function) + pci_dev->flags |=3D VIR_NODE_DEV_CAP_FLAG_PCI_PHYSICAL_FUNCTION; + + ret =3D virPCIGetVirtualFunctions(sysfsPath, &pci_dev->virtual_functio= ns, + &pci_dev->num_virtual_functions, + &pci_dev->max_virtual_functions); + if (ret < 0) + goto cleanup; + + if (pci_dev->num_virtual_functions > 0 || + pci_dev->max_virtual_functions > 0) + pci_dev->flags |=3D VIR_NODE_DEV_CAP_FLAG_PCI_VIRTUAL_FUNCTION; + + cleanup: + return ret; +} + + +static int +virNodeDeviceGetPCIIOMMUGroupCaps(virNodeDevCapPCIDevPtr pci_dev) +{ + size_t i; + int tmpGroup, ret =3D -1; + virPCIDeviceAddress addr; + + /* this could be a refresh, so clear out the old data */ + for (i =3D 0; i < pci_dev->nIommuGroupDevices; i++) + VIR_FREE(pci_dev->iommuGroupDevices[i]); + VIR_FREE(pci_dev->iommuGroupDevices); + pci_dev->nIommuGroupDevices =3D 0; + pci_dev->iommuGroupNumber =3D 0; + + addr.domain =3D pci_dev->domain; + addr.bus =3D pci_dev->bus; + addr.slot =3D pci_dev->slot; + addr.function =3D pci_dev->function; + tmpGroup =3D virPCIDeviceAddressGetIOMMUGroupNum(&addr); + if (tmpGroup =3D=3D -1) { + /* error was already reported */ + goto cleanup; + } + if (tmpGroup =3D=3D -2) { + /* -2 return means there is no iommu_group data */ + ret =3D 0; + goto cleanup; + } + if (tmpGroup >=3D 0) { + if (virPCIDeviceAddressGetIOMMUGroupAddresses(&addr, &pci_dev->iom= muGroupDevices, + &pci_dev->nIommuGrou= pDevices) < 0) + goto cleanup; + pci_dev->iommuGroupNumber =3D tmpGroup; + } + + ret =3D 0; + cleanup: + return ret; +} + + +/* virNodeDeviceGetPCIDynamicCaps() get info that is stored in sysfs + * about devices related to this device, i.e. things that can change + * without this device itself changing. These must be refreshed + * anytime full XML of the device is requested, because they can + * change with no corresponding notification from the kernel/udev. + */ +int +virNodeDeviceGetPCIDynamicCaps(const char *sysfsPath, + virNodeDevCapPCIDevPtr pci_dev) +{ + if (virNodeDeviceGetPCISRIOVCaps(sysfsPath, pci_dev) < 0) + return -1; + if (virNodeDeviceGetPCIIOMMUGroupCaps(pci_dev) < 0) + return -1; + return 0; +} + #else =20 int -virNodeDeviceGetSCSIHostCaps(virNodeDevCap) +virNodeDeviceGetPCIDynamicCaps(const char *sysfsPath, + virNodeDevCapPCIDevPtr pci_dev) +{ + return -1; +} + + +int virNodeDeviceGetSCSITargetCaps(const char *sysfsPath ATTRIBUTE_UNUSED, + virNodeDevCapSCSITargetPtr scsi_target = ATTRIBUTE_UNUSED) { return -1; } diff --git a/src/conf/node_device_conf.h b/src/conf/node_device_conf.h index cf79773aa..4e3154875 100644 --- a/src/conf/node_device_conf.h +++ b/src/conf/node_device_conf.h @@ -393,4 +393,11 @@ virNodeDeviceDeleteVport(virConnectPtr conn, int virNodeDeviceGetSCSIHostCaps(virNodeDevCapSCSIHostPtr scsi_host); =20 +int +virNodeDeviceGetSCSITargetCaps(const char *sysfsPath, + virNodeDevCapSCSITargetPtr scsi_target); + +int +virNodeDeviceGetPCIDynamicCaps(const char *sysfsPath, + virNodeDevCapPCIDevPtr pci_dev); #endif /* __VIR_NODE_DEVICE_CONF_H__ */ diff --git a/src/libvirt_private.syms b/src/libvirt_private.syms index bc8cc1fba..0cd8086a6 100644 --- a/src/libvirt_private.syms +++ b/src/libvirt_private.syms @@ -707,7 +707,9 @@ virNodeDeviceDefParseNode; virNodeDeviceDefParseString; virNodeDeviceDeleteVport; virNodeDeviceGetParentName; +virNodeDeviceGetPCIDynamicCaps; virNodeDeviceGetSCSIHostCaps; +virNodeDeviceGetSCSITargetCaps; virNodeDeviceGetWWNs; =20 =20 diff --git a/src/node_device/node_device_driver.c b/src/node_device/node_de= vice_driver.c index a2f687942..2e42d3527 100644 --- a/src/node_device/node_device_driver.c +++ b/src/node_device/node_device_driver.c @@ -38,7 +38,6 @@ #include "node_device_event.h" #include "node_device_driver.h" #include "node_device_hal.h" -#include "node_device_linux_sysfs.h" #include "virvhba.h" #include "viraccessapicheck.h" #include "virnetdev.h" @@ -59,7 +58,7 @@ nodeDeviceUpdateCaps(virNodeDeviceDefPtr def) virNodeDeviceGetSCSIHostCaps(&cap->data.scsi_host); break; case VIR_NODE_DEV_CAP_SCSI_TARGET: - nodeDeviceSysfsGetSCSITargetCaps(def->sysfs_path, + virNodeDeviceGetSCSITargetCaps(def->sysfs_path, &cap->data.scsi_target); break; case VIR_NODE_DEV_CAP_NET: @@ -70,8 +69,8 @@ nodeDeviceUpdateCaps(virNodeDeviceDefPtr def) return -1; break; case VIR_NODE_DEV_CAP_PCI_DEV: - if (nodeDeviceSysfsGetPCIRelatedDevCaps(def->sysfs_path, - &cap->data.pci_dev) < 0) + if (virNodeDeviceGetPCIDynamicCaps(def->sysfs_path, + &cap->data.pci_dev) < 0) return -1; break; =20 diff --git a/src/node_device/node_device_hal.c b/src/node_device/node_devic= e_hal.c index 4c50f4613..f98fd0856 100644 --- a/src/node_device/node_device_hal.c +++ b/src/node_device/node_device_hal.c @@ -31,7 +31,6 @@ #include "node_device_conf.h" #include "node_device_driver.h" #include "node_device_hal.h" -#include "node_device_linux_sysfs.h" #include "virerror.h" #include "driver.h" #include "datatypes.h" diff --git a/src/node_device/node_device_linux_sysfs.c b/src/node_device/no= de_device_linux_sysfs.c deleted file mode 100644 index b3f80a555..000000000 --- a/src/node_device/node_device_linux_sysfs.c +++ /dev/null @@ -1,206 +0,0 @@ -/* - * node_device_linux_sysfs.c: Linux specific code to gather device data - * that is available from sysfs (but not from UDEV or HAL). - * - * Copyright (C) 2009-2015 Red Hat, Inc. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library. If not, see - * . - * - */ - -#include - -#include -#include -#include - -#include "dirname.h" -#include "node_device_driver.h" -#include "node_device_hal.h" -#include "node_device_linux_sysfs.h" -#include "virerror.h" -#include "viralloc.h" -#include "virfcp.h" -#include "virlog.h" -#include "virfile.h" -#include "virscsihost.h" -#include "virstring.h" -#include "virvhba.h" - -#define VIR_FROM_THIS VIR_FROM_NODEDEV - -#ifdef __linux__ - -VIR_LOG_INIT("node_device.node_device_linux_sysfs"); - - -int -nodeDeviceSysfsGetSCSITargetCaps(const char *sysfsPath, - virNodeDevCapSCSITargetPtr scsi_target) -{ - int ret =3D -1; - char *dir =3D NULL, *rport =3D NULL; - - VIR_DEBUG("Checking if '%s' is an FC remote port", scsi_target->name); - - /* /sys/devices/[...]/host0/rport-0:0-0/target0:0:0 -> rport-0:0-0 */ - if (!(dir =3D mdir_name(sysfsPath))) - return -1; - - if (VIR_STRDUP(rport, last_component(dir)) < 0) - goto cleanup; - - if (!virFCIsCapableRport(rport)) - goto cleanup; - - VIR_FREE(scsi_target->rport); - VIR_STEAL_PTR(scsi_target->rport, rport); - - if (virFCReadRportValue(scsi_target->rport, "port_name", - &scsi_target->wwpn) < 0) { - VIR_WARN("Failed to read port_name for '%s'", scsi_target->rport); - goto cleanup; - } - - scsi_target->flags |=3D VIR_NODE_DEV_CAP_FLAG_FC_RPORT; - ret =3D 0; - - cleanup: - if (ret < 0) { - VIR_FREE(scsi_target->rport); - VIR_FREE(scsi_target->wwpn); - scsi_target->flags &=3D ~VIR_NODE_DEV_CAP_FLAG_FC_RPORT; - } - VIR_FREE(rport); - VIR_FREE(dir); - - return ret; -} - - -static int -nodeDeviceSysfsGetPCISRIOVCaps(const char *sysfsPath, - virNodeDevCapPCIDevPtr pci_dev) -{ - size_t i; - int ret; - - /* this could be a refresh, so clear out the old data */ - for (i =3D 0; i < pci_dev->num_virtual_functions; i++) - VIR_FREE(pci_dev->virtual_functions[i]); - VIR_FREE(pci_dev->virtual_functions); - pci_dev->num_virtual_functions =3D 0; - pci_dev->max_virtual_functions =3D 0; - pci_dev->flags &=3D ~VIR_NODE_DEV_CAP_FLAG_PCI_VIRTUAL_FUNCTION; - pci_dev->flags &=3D ~VIR_NODE_DEV_CAP_FLAG_PCI_PHYSICAL_FUNCTION; - - ret =3D virPCIGetPhysicalFunction(sysfsPath, - &pci_dev->physical_function); - if (ret < 0) - goto cleanup; - - if (pci_dev->physical_function) - pci_dev->flags |=3D VIR_NODE_DEV_CAP_FLAG_PCI_PHYSICAL_FUNCTION; - - ret =3D virPCIGetVirtualFunctions(sysfsPath, &pci_dev->virtual_functio= ns, - &pci_dev->num_virtual_functions, - &pci_dev->max_virtual_functions); - if (ret < 0) - goto cleanup; - - if (pci_dev->num_virtual_functions > 0 || - pci_dev->max_virtual_functions > 0) - pci_dev->flags |=3D VIR_NODE_DEV_CAP_FLAG_PCI_VIRTUAL_FUNCTION; - - cleanup: - return ret; -} - - -static int -nodeDeviceSysfsGetPCIIOMMUGroupCaps(virNodeDevCapPCIDevPtr pci_dev) -{ - size_t i; - int tmpGroup, ret =3D -1; - virPCIDeviceAddress addr; - - /* this could be a refresh, so clear out the old data */ - for (i =3D 0; i < pci_dev->nIommuGroupDevices; i++) - VIR_FREE(pci_dev->iommuGroupDevices[i]); - VIR_FREE(pci_dev->iommuGroupDevices); - pci_dev->nIommuGroupDevices =3D 0; - pci_dev->iommuGroupNumber =3D 0; - - addr.domain =3D pci_dev->domain; - addr.bus =3D pci_dev->bus; - addr.slot =3D pci_dev->slot; - addr.function =3D pci_dev->function; - tmpGroup =3D virPCIDeviceAddressGetIOMMUGroupNum(&addr); - if (tmpGroup =3D=3D -1) { - /* error was already reported */ - goto cleanup; - } - if (tmpGroup =3D=3D -2) { - /* -2 return means there is no iommu_group data */ - ret =3D 0; - goto cleanup; - } - if (tmpGroup >=3D 0) { - if (virPCIDeviceAddressGetIOMMUGroupAddresses(&addr, &pci_dev->iom= muGroupDevices, - &pci_dev->nIommuGrou= pDevices) < 0) - goto cleanup; - pci_dev->iommuGroupNumber =3D tmpGroup; - } - - ret =3D 0; - cleanup: - return ret; -} - - -/* nodeDeviceSysfsGetPCIRelatedCaps() get info that is stored in sysfs - * about devices related to this device, i.e. things that can change - * without this device itself changing. These must be refreshed - * anytime full XML of the device is requested, because they can - * change with no corresponding notification from the kernel/udev. - */ -int -nodeDeviceSysfsGetPCIRelatedDevCaps(const char *sysfsPath, - virNodeDevCapPCIDevPtr pci_dev) -{ - if (nodeDeviceSysfsGetPCISRIOVCaps(sysfsPath, pci_dev) < 0) - return -1; - if (nodeDeviceSysfsGetPCIIOMMUGroupCaps(pci_dev) < 0) - return -1; - return 0; -} - - -#else - -int nodeDeviceSysfsGetSCSITargetCaps(const char *sysfsPath ATTRIBUTE_UNUSE= D, - virNodeDevCapSCSITargetPtr scsi_targe= t ATTRIBUTE_UNUSED) -{ - return -1; -} - -int -nodeDeviceSysfsGetPCIRelatedDevCaps(const char *sysfsPath ATTRIBUTE_UNUSED, - virNodeDevCapPCIDevPtr pci_dev ATTRIBU= TE_UNUSED) -{ - return -1; -} - -#endif /* __linux__ */ diff --git a/src/node_device/node_device_linux_sysfs.h b/src/node_device/no= de_device_linux_sysfs.h deleted file mode 100644 index 9392d6934..000000000 --- a/src/node_device/node_device_linux_sysfs.h +++ /dev/null @@ -1,33 +0,0 @@ -/* - * node_device_linux_sysfs.h: Linux specific code to gather device data - * that is available from sysfs (but not from UDEV or HAL). - * - * Copyright (C) 2015 Red Hat, Inc. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library. If not, see - * . - * - */ - -#ifndef __VIR_NODE_DEVICE_LINUX_SYSFS_H__ -# define __VIR_NODE_DEVICE_LINUX_SYSFS_H__ - -# include "node_device_conf.h" - -int nodeDeviceSysfsGetSCSITargetCaps(const char *sysfsPath, - virNodeDevCapSCSITargetPtr scsi_targe= t); -int nodeDeviceSysfsGetPCIRelatedDevCaps(const char *sysfsPath, - virNodeDevCapPCIDevPtr pci_dev); - -#endif /* __VIR_NODE_DEVICE_LINUX_SYSFS_H__ */ diff --git a/src/node_device/node_device_udev.c b/src/node_device/node_devi= ce_udev.c index 4cc531d2c..519b0bf6f 100644 --- a/src/node_device/node_device_udev.c +++ b/src/node_device/node_device_udev.c @@ -30,7 +30,6 @@ #include "node_device_conf.h" #include "node_device_event.h" #include "node_device_driver.h" -#include "node_device_linux_sysfs.h" #include "node_device_udev.h" #include "virerror.h" #include "driver.h" @@ -558,7 +557,7 @@ udevProcessPCI(struct udev_device *device, &pci_dev->numa_node, 10) < 0) goto cleanup; =20 - if (nodeDeviceSysfsGetPCIRelatedDevCaps(def->sysfs_path, pci_dev) < 0) + if (virNodeDeviceGetPCIDynamicCaps(def->sysfs_path, pci_dev) < 0) goto cleanup; =20 if (!(pciDev =3D virPCIDeviceNew(pci_dev->domain, @@ -802,7 +801,7 @@ udevProcessSCSITarget(struct udev_device *device, if (VIR_STRDUP(scsi_target->name, sysname) < 0) return -1; =20 - nodeDeviceSysfsGetSCSITargetCaps(def->sysfs_path, &def->caps->data.scs= i_target); + virNodeDeviceGetSCSITargetCaps(def->sysfs_path, &def->caps->data.scsi_= target); =20 if (udevGenerateDeviceName(device, def, NULL) !=3D 0) return -1; --=20 2.13.6 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list