landley / toybox

toybox
http://landley.net/toybox
BSD Zero Clause License
2.43k stars 338 forks source link

lspci: cant read pci.ids #386

Open apprehensions opened 2 years ago

apprehensions commented 2 years ago
$ lspci 
...
00:01.0 Class 0604: Device 8086:1901 (rev 07)
...
$ lspci -i $PWD/pci.ids             
...
00:01.0 PCI bridge: Intel Corporation 6th-10th Gen Core Processor PCIe Controller (x16) (rev 07)
...
$ toybox lspci -i $PWD/pci.ids
...
00:01.0 :   (rev 07)
...

i am using https://raw.githubusercontent.com/pciutils/pciutils/master/pci.ids

landley commented 2 years ago

Hmmm... Ah, darn it. The -i option isn't wired up, it's always searching out of the path. (Oops.)

landley commented 2 years ago

Try commit 804abb28994f

apprehensions commented 2 years ago

compressed doesn't work (gz), plain text does but gives such such weird results:

Bus 001 Device 007: ID 1038:12b3 AMP, Inc 
Bus 001 Device 010: ID 8087:0aaa  
Bus 001 Device 006: ID 0b05:18a3  
Bus 001 Device 001: ID 1d6b:0002  
Bus 001 Device 008: ID 2ea8:2203  
Bus 001 Device 002: ID 1532:008a ECHELON Corp 
Bus 001 Device 005: ID 0781:5591  
Bus 002 Device 001: ID 1d6b:0003  
Bus 001 Device 004: ID 05e3:0610  
Bus 001 Device 009: ID 1e71:2007  
Bus 001 Device 003: ID 6964:0075  

as a user of my system, i can highly confirm that no device of mine is from ECHELEON corp, lspci from the pciutils parses the same file with better results.

enh-google commented 3 months ago

"works for me"? the only difference i see on my machines between toybox lspci and pciutils is that the latter sorts its output, whereas toybox looks random.