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

Michal Privoznik mprivozn at redhat.com
Fri Apr 22 07:58:38 UTC 2011


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). This patch fix it.
---
 src/node_device/node_device_udev.c |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/src/node_device/node_device_udev.c b/src/node_device/node_device_udev.c
index 2139ef3..b6335ff 100644
--- a/src/node_device/node_device_udev.c
+++ b/src/node_device/node_device_udev.c
@@ -1603,7 +1603,13 @@ static int udevDeviceMonitorStartup(int privileged)
             char ebuf[256];
             VIR_ERROR(_("Failed to initialize libpciaccess: %s"),
                       virStrerror(pciret, ebuf, sizeof ebuf));
+#if defined __s390__ || defined __s390x_
+            /* On x390(x) system there is no PCI bus.
+             * Therefore we do not want to return error here */
+            ret = 0;
+#else
             ret = -1;
+#endif
             goto out;
         }
     }
-- 
1.7.4.4




More information about the libvir-list mailing list