HorlogeSkynet / archey4

:computer: Maintained fork of the original Archey (Linux) system tool
https://git.io/archey4
GNU General Public License v3.0
291 stars 37 forks source link

[GPU] Parses `lspci` to avoid classing 3D NAND devices as GPUs. #150

Closed ingrinder closed 5 months ago

ingrinder commented 5 months ago

Fix for #149.

Description

Parse lspci -m (ie machine readable format) to only match on the PCI class rather than the entire vendor + product string.

Reason and / or context

See #149 :grin:

How has this been tested ?

Seems to work fine on my systems, modified tests pass.

Types of changes :

Checklist :

HorlogeSkynet commented 5 months ago

Hey @ingrinder, thanks for this fast PR !! I wonder why I initially didn't pass -m to lspci, maybe due to flag support across platforms ? 🤔

ingrinder commented 5 months ago

I thought the same thing too -- but we only use lspci on Linux, where I believe it is only supplied by Martin Mareš's pciutils. The m option was added to it in 1998!

HorlogeSkynet commented 5 months ago

Awesome patch, thanks ! I'll try to merge this soon and release a new version ASAP. We'll postpone ongoing work to a future release this year 😇