summaryrefslogtreecommitdiffstats
path: root/convert/verify_MonitorsDB
blob: 9da8ec6f95ea98a424efb2f1aaae7b0cb02a1087 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#!/usr/bin/perl

use lib qw(/usr/lib/libDrakX);
use Xconfig::monitor;

my $monitors_db = Xconfig::monitor::readMonitorsDB("../lst/MonitorsDB");
foreach (@$monitors_db) {
    if ($_->{EISA_ID} =~ /^\w{3}[0-9a-f]{4}$/i) {
	# perfect!
    } elsif ($_->{EISA_ID} =~ /^([a-z]{3})([0-9a-f]{0,3})$/i) {
	# we can correct this
	printf "$_->{EISA_ID} should be %s%04x\n", $1, hex($2);
    } else {
	print "bad EISA_ID $_->{EISA_ID}\n";
    }
}