[PATCH] Changed the order of arguments of function pciSysfsFile

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

 



---
 src/util/pci.c       |    3 +--
 src/util/pci.h       |    2 +-
 src/util/virnetdev.c |    2 +-
 3 files changed, 3 insertions(+), 4 deletions(-)

diff --git a/src/util/pci.c b/src/util/pci.c
index 89a9d12..311a847 100644
--- a/src/util/pci.c
+++ b/src/util/pci.c
@@ -39,7 +39,6 @@
 #include "command.h"
 #include "virterror_internal.h"
 #include "virfile.h"
-#include "virnetdev.h"
 
 /* avoid compilation breakage on some systems */
 #ifndef MODPROBE
@@ -1997,7 +1996,7 @@ out:
   */
 
 int
-pciSysfsFile(char **pci_sysfs_device_link, char *pciDeviceName)
+pciSysfsFile(char *pciDeviceName, char **pci_sysfs_device_link)
 {
     if (virAsprintf(pci_sysfs_device_link, PCI_SYSFS "devices/%s",
                     pciDeviceName) < 0) {
diff --git a/src/util/pci.h b/src/util/pci.h
index 3800d98..30ff6ff 100644
--- a/src/util/pci.h
+++ b/src/util/pci.h
@@ -143,6 +143,6 @@ int pciGetVirtualFunctionIndex(const char *pf_sysfs_device_link,
 
 int pciDeviceNetName(char *device_link_sysfs_path, char **netname);
 
-int pciSysfsFile(char **pci_sysfs_device_link, char *pciDeviceName);
+int pciSysfsFile(char *pciDeviceName, char **pci_sysfs_device_link);
 
 #endif /* __VIR_PCI_H__ */
diff --git a/src/util/virnetdev.c b/src/util/virnetdev.c
index d07d8fa..0b3f91a 100644
--- a/src/util/virnetdev.c
+++ b/src/util/virnetdev.c
@@ -1017,7 +1017,7 @@ virNetDevGetNetName(struct pci_config_address *vf, char **vfname)
     
     dev = pciGetDevice(vf->domain, vf->bus, vf->slot, vf->function);
     if (dev != NULL) {
-        if (pciSysfsFile(&pci_sysfs_device_link, dev->name) < 0) {
+        if (pciSysfsFile(dev->name, &pci_sysfs_device_link) < 0) {
             virReportSystemError(ENOSYS, "%s",
                          _("Failed to get PCI SYSFS file"));
             goto out;
-- 
1.7.4.4

--
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]