summaryrefslogtreecommitdiffstats
path: root/perl-install/share/verify_modules.pl
diff options
context:
space:
mode:
authorMystery Man <unknown@mandriva.org>2002-06-13 16:15:36 +0000
committerMystery Man <unknown@mandriva.org>2002-06-13 16:15:36 +0000
commitf6b1f4a66cef635a90213504ebebe8387f43a595 (patch)
tree30ddcf857393f7ae6ab825816285d7eb429ecc75 /perl-install/share/verify_modules.pl
parentf55dff2ba8cd925679728455a9a8b47654d14a44 (diff)
downloaddrakx-f6b1f4a66cef635a90213504ebebe8387f43a595.tar
drakx-f6b1f4a66cef635a90213504ebebe8387f43a595.tar.gz
drakx-f6b1f4a66cef635a90213504ebebe8387f43a595.tar.bz2
drakx-f6b1f4a66cef635a90213504ebebe8387f43a595.tar.xz
drakx-f6b1f4a66cef635a90213504ebebe8387f43a595.zip
This commit was manufactured by cvs2svn to create tag 'V1_1_7_99mdk'.V1_1_7_99mdk
Diffstat (limited to 'perl-install/share/verify_modules.pl')
-rwxr-xr-xperl-install/share/verify_modules.pl102
1 files changed, 0 insertions, 102 deletions
diff --git a/perl-install/share/verify_modules.pl b/perl-install/share/verify_modules.pl
deleted file mode 100755
index 52b6ae8fc..000000000
--- a/perl-install/share/verify_modules.pl
+++ /dev/null
@@ -1,102 +0,0 @@
-#!/usr/bin/perl
-
-use lib "..";
-use common;
-use modules;
-
-my $all = $ARGV[0] eq '-a';
-
-my %modules = map {
- chomp;
- my @l = split "\t";
- my $mod = $l[-2];
- $mod =~ s/"(.*)"/$1/;
- if_(!/^\s*#/ && $mod !~ /:/ && $mod ne 'unknown', $mod => $l[-1])
-} map { cat_("/usr/share/ldetect-lst/$_") } 'pcitable', 'usbtable';
-
-my %l;
-my $kernel = $all ? '/lib/modules' : '../../kernel';
-foreach (`find $kernel -name "*.o" -o -name "*.o.gz"`) {
- s|.*/lib/modules/.*?/||;
- s|kernel/drivers/||;
- m|(.*)/(.*)\.o(\.gz)?$|;
- $l{$2} = $1;
-}
-
-foreach (keys %modules) {
- my $ktype = $l{$_};
- my $dtype = $modules::drivers{$_};
- if (!$ktype && !$dtype) {
- print "unused module $_ (descr $modules{$_}) (not in modules.pm nor in the kernel)\n";
- } elsif (!$dtype) {
- $missing{$_} = $ktype;
- } elsif (!$ktype) {
- $unused{$_} = $dtype->{type}
- if !member($dtype->{type}, 'sound');
- }
-}
-
-foreach (sort keys %missing) {
- print "missing $_ in modules.pm (type $missing{$_}, descr $modules{$_})\n";
-}
-foreach (sort keys %unused) {
- print "unused module $_ (type $unused{$_}) (not in the kernel)\n";
-}
-
-__END__
-my %m = %l;
-my (%missing, %missing2);
-while (my ($k, $v) = each %pci_probing::pcitable::ids) {
- next if $v->[1] =~ /^(unknown$|ignore$|Card:|Server:|Bad:)/;
-
- $l{$v->[1]} or $missing{$v->[1]} = 1;
- $modules::drivers{$v->[1]} or push @{$missing2{$v->[1]}}, $v->[0];
- delete $m{$v->[1]};
-}
-print "W: unused entry in modules.pm $_\n"
- foreach grep { !$l{$_} && !$missing{$_} #- will be reported below
- } keys %modules::drivers;
-
-print qq|W: missing entry in modules.pm for $l{$_} "$_"\n| foreach grep { !$modules::drivers{$_} } keys %l;
-
-my %known; @known{qw(net scsi misc)} = ();
-if ($ARGV[0] eq "-v") {
- print "W: has no pci entry: $_ \n" foreach grep { exists $known{$m{$_}} } keys %m;
-}
-
-print "E: missing module $_\n"
- foreach grep { $modules::drivers{$_}{type} ne "sound" #- don't care about sound modules
- } keys %missing;
-
-foreach (keys %missing2) {
- print qq|E: missing entry in modules.pm for $l{$_} "$_"|;
- print qq| => "|, join("<>", @{$missing2{$_}}), '"';
- print "\n";
-}
-
-#exit;
-
-my %devices_c = (
- net => "checkEthernetDev, DRIVER_NET, DRIVER_MINOR_ETHERNET",
- scsi => "checkSCSIDev, DRIVER_SCSI, DRIVER_MINOR_NONE",
- disk => "checkSCSIDev, DRIVER_SCSI, DRIVER_MINOR_NONE",
- pcmcia => "NULL, DRIVER_PCMCIA, DRIVER_MINOR_NONE",
- paride => "NULL, DRIVER_PARIDE, DRIVER_MINOR_NONE",
- cdrom => "NULL, DRIVER_CDROM, DRIVER_MINOR_NONE",
-);
-my $devices_c = join "|", keys %devices_c;
-
-my %drivers = %modules::drivers;
-$drivers{$_}{type} =~ /$devices_c/ or delete $drivers{$_} foreach keys %drivers;
-foreach (cat_("../../install/devices.c")) {
- if (/static struct driver drivers/ .. /^};/) {
- /\s*{\s*"[^"]*"\s*,\s*"(.*)"/ or next;
- delete $drivers{$1} or print qq|W: unused entry in devices.c $1\n|;
- }
-}
-foreach (sort { $drivers{$a}{type} cmp $drivers{$b}{type} } keys %drivers) {
- my ($m, $v) = ($_, $drivers{$_});
- /^(8390|sunrpc|lockd|dummy|st)$/ and next;
-
- print qq|E: missing entry in devices.c { "$v->{text}", "$m", 0, $devices_c{$v->{type}} }\n|;
-}