summaryrefslogtreecommitdiffstats
path: root/lspcidrake.pl
diff options
context:
space:
mode:
authorThierry Vignaud <tv@mandriva.org>2007-02-12 14:11:52 +0000
committerThierry Vignaud <tv@mandriva.org>2007-02-12 14:11:52 +0000
commit8efb530ae4885a1bfb2567088ed5b824fa015a15 (patch)
tree297b1ef2fb84cdd6e0ca7e5aad97993849c74372 /lspcidrake.pl
parentac475fc9391bfbef6b3f6ecd31afee0cd0ef7613 (diff)
downloadldetect-8efb530ae4885a1bfb2567088ed5b824fa015a15.tar
ldetect-8efb530ae4885a1bfb2567088ed5b824fa015a15.tar.gz
ldetect-8efb530ae4885a1bfb2567088ed5b824fa015a15.tar.bz2
ldetect-8efb530ae4885a1bfb2567088ed5b824fa015a15.tar.xz
ldetect-8efb530ae4885a1bfb2567088ed5b824fa015a15.zip
(read_pciids) rename "class" as "vendor" since it really is
Diffstat (limited to 'lspcidrake.pl')
-rwxr-xr-xlspcidrake.pl8
1 files changed, 4 insertions, 4 deletions
diff --git a/lspcidrake.pl b/lspcidrake.pl
index 9868412..af6a540 100755
--- a/lspcidrake.pl
+++ b/lspcidrake.pl
@@ -12,7 +12,7 @@ if (@ARGV) {
sub read_pciids {
my ($f) = @_;
my %drivers;
- my ($id1, $id2, $class, $line);
+ my ($id1, $id2, $vendor, $line);
foreach (cat_($f)) {
chomp; $line++;
next if /^#/ || /^;/ || /^\s*$/;
@@ -21,15 +21,15 @@ sub read_pciids {
} elsif (my ($subid1, $subid2, $text) = /^\t\t(\S+)\s+(\S+)\s+(.+)/) {
$text =~ s/\t/ /g;
$id1 && $id2 or die "$f:$line: unexpected device\n";
- $drivers{sprintf qq(%04x%04x%04x%04x), hex($id1), hex($id2), hex($subid1), hex($subid2)} = "$class|$text";
+ $drivers{sprintf qq(%04x%04x%04x%04x), hex($id1), hex($id2), hex($subid1), hex($subid2)} = "$vendor|$text";
} elsif (/^\t(\S+)\s+(.+)/) {
($id2, $text) = ($1, $2);
$text =~ s/\t/ /g;
$id1 && $id2 or die "$f:$line: unexpected device\n";
- $drivers{sprintf qq(%04x%04xffffffff), hex($id1), hex($id2)} = "$class|$text";
+ $drivers{sprintf qq(%04x%04xffffffff), hex($id1), hex($id2)} = "$vendor|$text";
} elsif (/^(\S+)\s+(.+)/) {
$id1 = $1;
- $class = $2;
+ $vendor = $2;
} else {
warn "$f:$line: bad line: $_\n";
}