diff options
author | sheldonh <sheldonh@FreeBSD.org> | 2001-12-01 13:08:20 +0000 |
---|---|---|
committer | sheldonh <sheldonh@FreeBSD.org> | 2001-12-01 13:08:20 +0000 |
commit | 7abf74ba201ab6c7ccc8ea3c40c0a6ce9ac2048f (patch) | |
tree | 1d46b6b0a73e7af238d9ac9b989de997c0365ce7 /tools/tools | |
parent | 91903d036d9c96b55563a3ecb11525b5a3ddbf37 (diff) | |
download | FreeBSD-src-7abf74ba201ab6c7ccc8ea3c40c0a6ce9ac2048f.zip FreeBSD-src-7abf74ba201ab6c7ccc8ea3c40c0a6ce9ac2048f.tar.gz |
Correct misattribution of the Hart list, which I had mistakenly
attributed to Heckenbach.
Diffstat (limited to 'tools/tools')
-rw-r--r-- | tools/tools/pciid/mk_pci_vendors.pl | 35 |
1 files changed, 22 insertions, 13 deletions
diff --git a/tools/tools/pciid/mk_pci_vendors.pl b/tools/tools/pciid/mk_pci_vendors.pl index 0868046..1a812b3 100644 --- a/tools/tools/pciid/mk_pci_vendors.pl +++ b/tools/tools/pciid/mk_pci_vendors.pl @@ -27,17 +27,17 @@ # # usage: mk_pci_vendors [-lq] [-p pcidevs.txt] [-v vendors.txt] # -# Generate src/share/misc/pci_vendors from the Heckenbach and Boemler -# lists, currently available at: +# Generate src/share/misc/pci_vendors from the Hart and Boemler lists, +# currently available at: # # Boemler: http://www.yourvote.com/pci/ -# Heckenbach: http://members.hyperlink.com.au/~chart/pci.htm +# Hart: http://members.hyperlink.com.au/~chart/pci.htm # # -l Where an entry is found in both input lists, use the entry with # the longest description. The default is for the Boemler file to -# override the Heckenback file. +# override the Hart file. # -q Do not print diagnostics. -# -p Specify the pathname of the Heckenbach file. (Default ./pcidevs.txt) +# -p Specify the pathname of the Hart file. (Default ./pcidevs.txt) # -v Specify the pathname of the Boemler file. (Default ./vendors.txt) # use strict; @@ -60,6 +60,7 @@ my $W_NOCONTEST = 0; my $W_VENDORS = 1; my $W_PCIDEVS = 2; +sub clean_descr($); sub vendors_parse($\$\$); sub pcidevs_parse($\$\$); @@ -123,7 +124,7 @@ while ($line = <PCIDEVS>) { if (not $opts{q} and $winner != $W_NOCONTEST) { $existing = $vendors{$id}->[$V_DESCR]; print STDERR "$PROGNAME: ", - $winner == $W_VENDORS ? "Boemler" : "Heckenbach", + $winner == $W_VENDORS ? "Boemler" : "Hart", " vendor wins: $id\t$existing\n"; } } elsif ($rv == $IS_DEVICE) { @@ -145,7 +146,7 @@ while ($line = <PCIDEVS>) { if (not $opts{q} and $winner != $W_NOCONTEST) { $existing = ${$vendors{$cur_vendor}->[$V_DEVSL]}{$id}; print STDERR "$PROGNAME: ", - $winner == $W_VENDORS ? "Boemler" : "Heckenbach", + $winner == $W_VENDORS ? "Boemler" : "Hart", " device wins: $id\t$existing\n"; } } @@ -191,10 +192,10 @@ sub vendors_parse($\$\$) my ($line, $id_ref, $descr_ref) = @_; if ($line =~ /^([A-Fa-f0-9]{4})\t([^\t].+?)\s*$/) { - ($$id_ref, $$descr_ref) = (uc($1), $2); + ($$id_ref, $$descr_ref) = (uc($1), clean_descr($2)); return $IS_VENDOR; } elsif ($line =~ /^\t([A-Fa-f0-9]{4})\t([^\t].+?)\s*$/) { - ($$id_ref, $$descr_ref) = (uc($1), $2); + ($$id_ref, $$descr_ref) = (uc($1), clean_descr($2)); return $IS_DEVICE; } elsif (not $opts{q} and $line !~ /^\s*$/ and $line !~ /^;/) { @@ -205,7 +206,7 @@ sub vendors_parse($\$\$) return 0; } -# Parse a line from the Heckenbach file and place the ID and description +# Parse a line from the Hart file and place the ID and description # in the scalars referenced by $id_ref and $descr_ref. # # On success, returns $IS_VENDOR if the line represents a vendor entity @@ -216,17 +217,25 @@ sub vendors_parse($\$\$) sub pcidevs_parse($\$\$) { my ($line, $id_ref, $descr_ref) = @_; + my $descr; if ($line =~ /^V\t([A-Fa-f0-9]{4})\t([^\t].+?)\s*$/) { - ($$id_ref, $$descr_ref) = (uc($1), $2); + ($$id_ref, $$descr_ref) = (uc($1), clean_descr($2)); return $IS_VENDOR; } elsif ($line =~ /^D\t([A-Fa-f0-9]{4})\t([^\t].+?)\s*$/) { - ($$id_ref, $$descr_ref) = (uc($1), $2); + ($$id_ref, $$descr_ref) = (uc($1), clean_descr($2)); return $IS_DEVICE; } elsif (not $opts{q} and $line !~ /^\s*$/ and $line !~ /^[;ORSX]/) { - print STDERR "$PROGNAME: ignored Heckenbach: $line\n"; + print STDERR "$PROGNAME: ignored Hart: $line\n"; } return 0; } + +sub clean_descr($) +{ + my ($descr) = @_; + + return $descr; +} |