mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-23 06:05:27 +00:00
util: don't use virPCIGetSysfsFile()
virPCIDeviceAddressGetSysfsFile() is simpler to call. Signed-off-by: Laine Stump <laine@redhat.com> Reviewed-by: Erik Skultety <eskultet@redhat.com> Reviewed-by: Peter Krempa <pkrempa@redhat.com>
This commit is contained in:
parent
668dd10ba9
commit
4dc39a204a
@ -1212,13 +1212,10 @@ virNetDevGetVirtualFunctions(const char *pfname,
|
||||
*vfname = g_new0(char *, *n_vfname);
|
||||
|
||||
for (i = 0; i < *n_vfname; i++) {
|
||||
g_autofree char *pciConfigAddr = NULL;
|
||||
g_autofree char *pci_sysfs_device_link = NULL;
|
||||
|
||||
if (!(pciConfigAddr = virPCIDeviceAddressAsString((*virt_fns)[i])))
|
||||
goto cleanup;
|
||||
|
||||
if (virPCIGetSysfsFile(pciConfigAddr, &pci_sysfs_device_link) < 0) {
|
||||
if (virPCIDeviceAddressGetSysfsFile((*virt_fns)[i],
|
||||
&pci_sysfs_device_link) < 0) {
|
||||
virReportSystemError(ENOSYS, "%s",
|
||||
_("Failed to get PCI SYSFS file"));
|
||||
goto cleanup;
|
||||
|
Loading…
Reference in New Issue
Block a user