diff options
author | Pascal Rigaux <pixel@mandriva.com> | 2004-02-20 15:55:54 +0000 |
---|---|---|
committer | Pascal Rigaux <pixel@mandriva.com> | 2004-02-20 15:55:54 +0000 |
commit | f51c2854c763b3d5509d0f36d48225131948a865 (patch) | |
tree | db5a363df4cc3eefeae5048abdc98673b2e37df9 /convert | |
parent | f08fee48350a3a081e9ea63dd52b728eef8fe958 (diff) | |
download | ldetect-lst-f51c2854c763b3d5509d0f36d48225131948a865.tar ldetect-lst-f51c2854c763b3d5509d0f36d48225131948a865.tar.gz ldetect-lst-f51c2854c763b3d5509d0f36d48225131948a865.tar.bz2 ldetect-lst-f51c2854c763b3d5509d0f36d48225131948a865.tar.xz ldetect-lst-f51c2854c763b3d5509d0f36d48225131948a865.zip |
display file & line number in the error message
(nice for "unknown card", but not that nice for "no Driver for card xxx", but it will do!)
Diffstat (limited to 'convert')
-rwxr-xr-x | convert/verify_Cards.pl | 25 |
1 files changed, 12 insertions, 13 deletions
diff --git a/convert/verify_Cards.pl b/convert/verify_Cards.pl index 61d786f3..a504c332 100755 --- a/convert/verify_Cards.pl +++ b/convert/verify_Cards.pl @@ -6,19 +6,18 @@ require './merge2pcitable.pl'; $cards = Xconfig::card::readCardsDB("../lst/Cards+"); -@cards = map { - my $drivers = read_pcitable("../lst/$_"); - map { /^Card:(.*)/ } grep { /^Card/ } map { $_->[0] } values %$drivers; -} qw(pcitable usbtable); - -foreach (@cards) { - $nb++; - if (!$cards->{$_}) { - warn "unknown card: $_\n"; - $bad++; - } elsif (!$cards->{$_}{Driver}) { - warn "no Driver: $_\n"; - $bad++; +foreach my $file (qw(pcitable usbtable)) { + my $drivers = read_pcitable("../lst/$file"); + foreach (values %$drivers) { + my ($driver, $name, $line) = @$_; + my ($card) = $driver =~ /^Card:(.*)/ or next; + if (!$cards->{$card}) { + warn "$file:$line: unknown card $name\n"; + $bad++; + } elsif (!$cards->{$card}{Driver}) { + warn "$file:$line: no Driver for card $name\n"; + $bad++; + } } } |