checkbox-dev team mailing list archive
-
checkbox-dev team
-
Mailing list archive
-
Message #00285
Using libpci to resolve device names
Hey
A while ago I talked to Pierre about a bug where we would not see
product name for a certain PCI graphics card. We looked, read, and
searched and realized how the PCI database works. We thought about
adding a local database or about doing something better than just not
working at all.
The canonical way to look up those names is through libpci. Since
libpci is written in C and has a simple API I thought about making
some bindings so that we can use that in checkbox.
And so I did, this is an example program that does vendor or device
name lookup [1, 2, 3]. Note that currently it only works on Python 3.4
as I used the enum module (it doesn't work on Ubuntu 12.04).
One interesting observation is the ability to query the central server
when a given identifier cannot be found in a local database. You can
use that by setting pci.flag_network = True (or call the pci-lookup
script with --network argument at the end).
Please tell me what you think.
Thanks
ZK
[1] https://github.com/zyga/libpci/blob/master/pci-lookup
[2] https://github.com/zyga/libpci
[3] http://libpci.readthedocs.org/en/latest/usage.html#module-libpci
Follow ups