udevProcessPCI() seems to be the libvirt function that is meant to
collect data for a single PCI node. It calls

    udevTranslatePCIIds(pci_dev->vendor,
                        pci_dev->product,
                        &pci_dev->vendor_name,
                        &pci_dev->product_name);

Which calls pci_get_strings() comes from the libpciaccess library.

Both with udev_device_get_property_value() from libudev and
pci_lookup_name() from libpci I was able to read the vendor name and the
product name. But I was out of luck with pci_get_strings() from
libpciaccess.


Adding debug output to the libpciaccess library yielded:

gzopen failed: /usr/share/${prefix}/share/misc/pci.ids.gz: No such file or 
directory
gzopen failed: /usr/share/${prefix}/share/misc/pci.ids: No such file or 
directory

The following change to libpciaccess resolved the issue in my test
program:

diff --git a/debian/rules b/debian/rules
index 47934ec..d393288 100755
--- a/debian/rules
+++ b/debian/rules
@@ -8,8 +8,7 @@ PACKAGE = libpciaccess0
 override_dh_auto_configure:
        dh_auto_configure -- \
                -Ddefault_library=both \
-               -Dpci-ids=\$${prefix}/share/misc \
-               -Dzlib=enabled
+               -Dpci-ids=/usr/share/misc

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/2145797

Title:
  [Ubuntu26.04] PCI device descriptions missing in virt-manager

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/libvirt/+bug/2145797/+subscriptions


-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to