summaryrefslogtreecommitdiffstats
path: root/convert/verify_Cards.pl
blob: 61d786f30973252fd94d77015e85902536674a8a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#!/usr/bin/perl

use lib qw(/usr/lib/libDrakX);
use Xconfig::card;
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++;
    }
}

exit $bad;