1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 09:28:11 +00:00

Utilities/lspci: Iterate over /sys/bus/pci instead of reading /proc/pci

This opens many opportunities to add more data printed in lspci in a
flexible manner - so instead of reading an ever-expanding JSON encoded
file, we can add more features and let the utility read the directory
entries from sysfs.

This also allows not only filtering data on devices but to easily filter
non-wanted devices when printing the output.
This commit is contained in:
Liav A 2022-02-08 19:28:08 +02:00 committed by Andreas Kling
parent 2a898a7e4a
commit a91da67216
2 changed files with 69 additions and 18 deletions

View file

@ -15,7 +15,7 @@ and devices connected to them. It shows a brief list of devices.
## Files
* `/proc/pci` - source of the PCI devices list.
* `/sys/bus/pci` - source of the PCI devices list.
* `/res/pci.ids` - a database of PCI identifiers used to match available devices to their vendor, device and class names.
## Examples