summaryrefslogtreecommitdiffstats
path: root/convert
diff options
context:
space:
mode:
authorAnssi Hannula <anssi@mageia.org>2013-05-03 16:45:28 +0000
committerAnssi Hannula <anssi@mageia.org>2013-05-03 16:45:28 +0000
commita108cf750ee287e26cc80cd713764eccb84160a4 (patch)
tree83759807c9a30ff2769a9a4a22a8e6fd5d2893fb /convert
parent19e3add60b8635a37dafa27e948e742593ae4772 (diff)
downloadldetect-lst-a108cf750ee287e26cc80cd713764eccb84160a4.tar
ldetect-lst-a108cf750ee287e26cc80cd713764eccb84160a4.tar.gz
ldetect-lst-a108cf750ee287e26cc80cd713764eccb84160a4.tar.bz2
ldetect-lst-a108cf750ee287e26cc80cd713764eccb84160a4.tar.xz
ldetect-lst-a108cf750ee287e26cc80cd713764eccb84160a4.zip
merge2pcitable.pl: fix missing NVIDIA pci ids with recent driver versions
Diffstat (limited to 'convert')
-rwxr-xr-xconvert/merge2pcitable.pl17
1 files changed, 10 insertions, 7 deletions
diff --git a/convert/merge2pcitable.pl b/convert/merge2pcitable.pl
index 7d870a3d..3965b1a0 100755
--- a/convert/merge2pcitable.pl
+++ b/convert/merge2pcitable.pl
@@ -379,18 +379,21 @@ sub read_begent_pcids_htm {
sub read_nvidia_readme {
my ($f) = @_;
my %drivers;
- my $section;
+ my $section = "nothingyet";
my $card = $ENV{NVIDIA_CARD} || "NVIDIA_UNKNOWN";
foreach (cat_($f)) {
chomp;
- last if $section > 3;
- if (!($section % 2)) {
- next unless /^\s+NVIDIA GPU product\s+Device PCI ID/;
- $section++;
+ if ($section eq "nothingyet" || $section eq "midspace") {
+ if (/^\s+NVIDIA GPU product\s+Device PCI ID/) {
+ $section = "data";
+ } elsif ($section eq "midspace" && /legacy/) {
+ last;
+ }
next;
}
- if (/^\s*$/) {
- $section++;
+
+ if ($section eq "data" && /^\s*$/) {
+ $section = "midspace";
next;
}
next if /^\s+-+[\s-]+$/;