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

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

 



On 04/22/2011 10:19 AM, Jiri Denemark wrote:
On Fri, Apr 22, 2011 at 09:58:38 +0200, Michal Privoznik wrote:
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;
          }
      }

Why do we try to initialize libpciaccess if we know it won't succeed? What
about just completely dropping libpciaccess dependency on s390(x)?

Jirka

Well,
although investigation on the internet shows there is at least PCI-like bus, linux kernel doesn't know how to use it (see arch/s390/include/asm/pci.h) which is the most important. so NAK and prepare v2.

Michal

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