-
Notifications
You must be signed in to change notification settings - Fork 228
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
RFE: The path to the pci.ids database should be configurable by a command line switch #377
Comments
We can do an ordered lookup with the first available file being used:
This way there wouldn't be a need for a major code restructuring and thing would work out of the box for most users with no need to introduce any new command line arguments. |
This wouldn't work in |
This largely addresses cloudflare#377.
I added support for |
decoder/pci.go currently hard-codes the file of the PCI IDs database to /usr/share/misc/pci.ids. However, not all Linux distributions put it in that location; Fedora places it in /usr/share/hwdata/pci.ids, and I believe this is followed by current versions of Red Hat Enterprise/CentOS/etc (it is certainly the case on CentOS 7). A command line switch would allow this to be adjusted on a system by system basis, and also allow people to substitute their own more up to date PCI ID databases on older versions of long term support releases that may have old ones.
Based on a quick look at the code this might require significant restructuring, since the in-program PCI database is currently initialized in an init() function (which also means it's loaded immediately on program startup, whether or not it will be needed by any program configured). I suspect such a restructuring is best undertaken by a core author who has a solid idea of how the result should fit into the exporter's overall structure and usage of its modules.
The text was updated successfully, but these errors were encountered: