Skip to content
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

Decoding PCI IDs? #12

Open
VorpalBlade opened this issue Jul 6, 2024 · 2 comments
Open

Decoding PCI IDs? #12

VorpalBlade opened this issue Jul 6, 2024 · 2 comments

Comments

@VorpalBlade
Copy link

VorpalBlade commented Jul 6, 2024

Hi,

Any plans to add optional decoding of the vendor IDs etc like lspci does? I had a look at the format of /usr/share/hwdata/pci.ids and it seems quite simple to parse. Unfortunately it doesn't have a standard location but differs between for example Arch Linux (/usr/share/hwdata/pci.ids) and Debian (/usr/share/misc/pci.ids). Loading it from the system should avoid the license issue.

Of course, I have no idea how that would work on non-Linux platforms (nor do I particularly care about them for my use case).

@xanathar
Copy link
Owner

xanathar commented Aug 2, 2024

I wasn't planning to, mostly because there are issues around it (as you highlight) and there are already crates doing that (I think https://crates.io/crates/pci-ids does, but I didn't doublecheck tbh).

Any reason you would want it in this crate rather than https://crates.io/crates/pci-ids ?

@VorpalBlade
Copy link
Author

I don't remember that library showing up in my searches. It also bundles the db apparently (instead of loading from the system). And it has a strange license: MIT with restrictions (would need to look into exactly what restrictions).

I ended up writing my own code as a module in my program that parsers the installed pci db using a simple parser written in winnow. I haven't finished hooking it up yet fully (blocked on some issues with the embedded scripting engine that I use) but the code can be found here: https://github.com/VorpalBlade/paketkoll/tree/main/crates/konfigkoll_hwinfo

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants