the database on sourceforge has about 3x the devices listed.
here's a little before-and-after
before:
3.0.0: net 02.00.00 14c1/0008 9 0:d800000c 16777216 1:00000000 16
2:d9000004 1048576 3:00000000 16
Myricom Inc.
4.0.0: net 02.00.00 8086/1096 11 0:d9120000 131072 1:d9100000 131072
2:00002001 32
Intel Corporation
4.0.1: net 02.00.00 8086/1096 10 0:d9160000 131072 1:d9140000 131072
2:00002021 32
Intel Corporation
7.1.0: vid 03.00.00 1002/515e 11 0:d0000008 134217728 1:00003001 256
2:d9300000 65536
ATI Radeon ES1000 Radeon ES1000
after:
3.0.0: net 02.00.00 14c1/0008 9 0:d800000c 16777216 1:00000000 16
2:d9000004 1048576 3:00000000 16
MYRICOM Inc. Myri-10G Dual-Protocol NIC
4.0.0: net 02.00.00 8086/1096 11 0:d9120000 131072 1:d9100000 131072
2:00002001 32
Intel Corporation 80003ES2LAN Gigabit Ethernet Controller
(Copper)
4.0.1: net 02.00.00 8086/1096 10 0:d9160000 131072 1:d9140000 131072
2:00002021 32
Intel Corporation 80003ES2LAN Gigabit Ethernet Controller
(Copper)
7.1.0: vid 03.00.00 1002/515e 11 0:d0000008 134217728 1:00003001 256
2:d9300000 65536
ATI Technologies Inc ES1000
instructions. replace /rc/bin/pci with the attached. replace
/lib/pci with the following, make executable and execute.
#!/bin/rc
{
sed '/^$/q' pci
hget http://pciids.sourceforge.net/v2.2/pci.ids |
sed 's:(^ *[0-9a-f][0-9a-f][0-9a-f][0-9a-f])[ ]+:\1 :g'
} >npci && mv npci pci
exit 0
- erik
#!/bin/rc
# pci [-v] - dump pci configuration
rfork e
fn verbose {
if (! test -f /lib/pci)
echo pci: no /lib/pci >[1=2]
awk '
function lower(s) {
gsub(/A/, "a", s)
gsub(/B/, "b", s)
gsub(/C/, "c", s)
gsub(/D/, "d", s)
gsub(/E/, "e", s)
gsub(/F/, "f", s)
return s
}
BEGIN{
file="/lib/pci"
FS="\t"
while(getline <file > 0){
if(/^[#;]/) continue
if(/^[0-9A-Fa-f]/){
vid=lower($1)
vendor[vid] = $2
}
if(/^ [0-9A-Fa-f]/){
did=lower($2)
id[vid "/" did] = $3
}
}
FS = " "
}
{
print $0
vid = $4
sub(/\/.*/, "", vid)
if(vid in vendor){
s = vendor[vid]
if($4 in id)
s = s " " id[$4]
print "\t" s
}
}
' | dd -conv sync >[2=]
}
filter=cat
if(~ $1 -v){
filter=verbose
}
builtin cd '#$/pci' && grep . *ctl | sed '
s/ctl:/: /
s/: 01/: disk 01/
s/: 02/: net 02/
s/: 03/: vid 03/
s/: 06/: brg 06/
s/: 0c\.03/: usb 0c.03/
s/: 0c\.05/: smb 0c.05/
s/: ([0-9])/: --- \1/
' | $filter