summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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-]+$/;