[PATCH] nodedev: Fix failing to parse PCI address for non-PCI network devices

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

 



Commit 8708ca01c added virNetDevSwitchdevFeature to check whether
the NIC had Switchdev capabilities; however this causes errors for
network devices whose address is not in PCI format, like qeth device
whose address is 0.0.0800, when calling virPCIDeviceAddressParse.

Change virReportError to VIR_DEBUG to avoid these two error messages
occuring when starting the libvirtd service, just leave their callers
to handle the return values respectively.

Signed-off-by: Fei Li <fli@xxxxxxxx>
---
 src/util/virpci.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/src/util/virpci.c b/src/util/virpci.c
index fe57bef32..880d7baba 100644
--- a/src/util/virpci.c
+++ b/src/util/virpci.c
@@ -2561,7 +2561,7 @@ logStrToLong_ui(char const *s,
 
     ret = virStrToLong_ui(s, end_ptr, base, result);
     if (ret != 0)
-        VIR_ERROR(_("Failed to convert '%s' to unsigned int"), s);
+        VIR_DEBUG("Failed to convert '%s' to unsigned int", s);
     return ret;
 }
 
@@ -2638,9 +2638,7 @@ virPCIGetDeviceAddressFromSysfsLink(const char *device_link)
         goto out;
 
     if (virPCIDeviceAddressParse(config_address, bdf) < 0) {
-        virReportError(VIR_ERR_INTERNAL_ERROR,
-                       _("Failed to parse PCI config address '%s'"),
-                       config_address);
+        VIR_DEBUG("Failed to parse PCI config address '%s'", config_address);
         VIR_FREE(bdf);
         goto out;
     }
-- 
2.13.5

--
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]
  Powered by Linux