how can one read the PCI ID of the chipset built into a computer?
I know lspci can do it with "-n" and the first line contains the PCI ID of the chipset:
The bold marked info is what I'm looking for. I haven't dealt with such things in C before and the lspci source code wasn't especially useful for me because I just wasn't able to understand it... (I'm not a professional coder, it's just a hobby and I'm not doing this for so long)Code:$ lspci -n 00:00.0 0600: 8086:2a00 (rev 03) [...]
So if anyone can tell me where exactly in the lspci source code I will have to look or has a simpler piece of code it would be great if he'd share it with me