mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-11 23:37:42 +00:00
udev: Parse PCI devices even if libpciaccess fails
We only use libpciaccess for resolving device product/vendor. If initializing the library fails (say if using qemu:///session), don't warn so loudly, and carry on as usual.
This commit is contained in:
parent
15770695d8
commit
ed005221ff
@ -363,12 +363,15 @@ static int udevTranslatePCIIds(unsigned int vendor,
|
|||||||
char **vendor_string,
|
char **vendor_string,
|
||||||
char **product_string)
|
char **product_string)
|
||||||
{
|
{
|
||||||
int ret = -1;
|
int ret = -1, pciret;
|
||||||
struct pci_id_match m;
|
struct pci_id_match m;
|
||||||
const char *vendor_name = NULL, *device_name = NULL;
|
const char *vendor_name = NULL, *device_name = NULL;
|
||||||
|
|
||||||
if (pci_system_init() != 0) {
|
if ((pciret = pci_system_init()) != 0) {
|
||||||
VIR_ERROR0(_("Failed to initialize libpciaccess"));
|
char ebuf[256];
|
||||||
|
VIR_INFO("Failed to initialize libpciaccess: %s",
|
||||||
|
virStrerror(pciret, ebuf, sizeof ebuf));
|
||||||
|
ret = 0;
|
||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user