From a108cf750ee287e26cc80cd713764eccb84160a4 Mon Sep 17 00:00:00 2001 From: Anssi Hannula Date: Fri, 3 May 2013 16:45:28 +0000 Subject: merge2pcitable.pl: fix missing NVIDIA pci ids with recent driver versions --- convert/merge2pcitable.pl | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) (limited to 'convert') 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-]+$/; -- cgit v1.2.1