提交 a2eab003 编写于 作者: M Michal Privoznik

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).
上级 0e7f7f85
......@@ -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;
}
......@@ -1593,6 +1597,11 @@ static int udevDeviceMonitorStartup(int privileged)
udevPrivate *priv = NULL;
struct udev *udev = NULL;
int ret = 0;
#if defined __s390__ || defined __s390x_
/* On s390(x) system there is no PCI bus.
* Therefore there is nothing to initialize here. */
#else
int pciret;
if ((pciret = pci_system_init()) != 0) {
......@@ -1607,6 +1616,7 @@ static int udevDeviceMonitorStartup(int privileged)
goto out;
}
}
#endif
if (VIR_ALLOC(priv) < 0) {
virReportOOMError();
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册