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

[libvirt] [PATCH v2] Fix disability to run on systems with no PCI bus



The patch which moved libpciaccess initialization to one place caused
regression - we were not able to run on system with no PCI bus, like
s390(x).
---
 src/node_device/node_device_udev.c |    9 +++++++++
 1 files changed, 9 insertions(+), 0 deletions(-)

diff --git a/src/node_device/node_device_udev.c b/src/node_device/node_device_udev.c
index 2139ef3..fcff252 100644
--- a/src/node_device/node_device_udev.c
+++ b/src/node_device/node_device_udev.c
@@ -1421,8 +1421,12 @@ static int udevDeviceMonitorShutdown(void)
         ret = -1;
     }
 
+#if defined __s390__ || defined __s390x_
+    /* Nothing was initialized, nothing needs to be cleaned up */
+#else
     /* pci_system_cleanup returns void */
     pci_system_cleanup();
+#endif
 
     return ret;
 }
@@ -1595,6 +1599,10 @@ static int udevDeviceMonitorStartup(int privileged)
     int ret = 0;
     int pciret;
 
+#if defined __s390__ || defined __s390x_
+    /* On x390(x) system there is no PCI bus.
+     * Therefore there is nothing to initialize here. */
+#else
     if ((pciret = pci_system_init()) != 0) {
         /* Ignore failure as non-root; udev is not as helpful in that
          * situation, but a non-privileged user won't benefit much
@@ -1607,6 +1615,7 @@ static int udevDeviceMonitorStartup(int privileged)
             goto out;
         }
     }
+#endif
 
     if (VIR_ALLOC(priv) < 0) {
         virReportOOMError();
-- 
1.7.4.4


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