diff options
author | Guillaume Cottenceau <gc@mandriva.com> | 2001-12-14 16:46:10 +0000 |
---|---|---|
committer | Guillaume Cottenceau <gc@mandriva.com> | 2001-12-14 16:46:10 +0000 |
commit | 75b27ff9ef727362a0e930b1a89c6f42d2df39d6 (patch) | |
tree | 6a4c363599fb450422c83ac591a6cf1e8eb4139f /mdk-stage1 | |
parent | a8f0b01aa445b6a63d074d0eeebde9fd274a0305 (diff) | |
download | drakx-75b27ff9ef727362a0e930b1a89c6f42d2df39d6.tar drakx-75b27ff9ef727362a0e930b1a89c6f42d2df39d6.tar.gz drakx-75b27ff9ef727362a0e930b1a89c6f42d2df39d6.tar.bz2 drakx-75b27ff9ef727362a0e930b1a89c6f42d2df39d6.tar.xz drakx-75b27ff9ef727362a0e930b1a89c6f42d2df39d6.zip |
change again way of selection PCI entries :
what's in mar files --> what's given by modules (e.g. just
as update_kernel does)
Diffstat (limited to 'mdk-stage1')
-rwxr-xr-x | mdk-stage1/pci-resource/update-pci-ids.pl | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/mdk-stage1/pci-resource/update-pci-ids.pl b/mdk-stage1/pci-resource/update-pci-ids.pl index 49d4ada9d..d6a723fc6 100755 --- a/mdk-stage1/pci-resource/update-pci-ids.pl +++ b/mdk-stage1/pci-resource/update-pci-ids.pl @@ -1,6 +1,7 @@ #!/usr/bin/perl use MDK::Common; +use lib qw(../../perl-install); -x "../mar/mar" or die "\t*FAILED* Sorry, need ../mar/mar binary\n"; @@ -37,7 +38,6 @@ my %sanity_check = foreach $type (keys %t) { print STDERR "$type (checks: ", join('/', @{$sanity_check{$type}}), ") "; - my @modulez; foreach $floppy (@{$t{$type}}) { foreach $marfile (glob("../../all.modules/*/${floppy}_modules.mar")) { -f $marfile or die "\t*FAILED* Sorry, need $marfile mar file\n"; @@ -47,17 +47,22 @@ foreach $type (keys %t) { grep(/\t$mandatory\.o/, @modz) or die "\t*FAILED* Sanity check should prove that $mandatory.o be part of $marfile\n" } } - push @modulez, @modz; print STDERR "."; } } + my %names_in_stage2 = ( network => [ 'net' ], medias => [ 'scsi', 'disk' ] ); + require modules; + my @modulez; + push @modulez, modules::module_of_type__4update_kernel($_) foreach @{$names_in_stage2{$type}}; + print "#ifndef DISABLE_".uc($type)." struct pci_module_map ${type}_pci_ids[] = { "; - while (my ($k, $v) = each %$drivers) { - grep(/^\t$v->[0]\.o/, @modulez) or next; + foreach my $k (sort keys %$drivers) { + $v = $drivers->{$k}; + member($v->[0], @modulez) or next; $k =~ /^(....)(....)/; printf qq|\t{ 0x%s, 0x%s, "%s", "%s" },\n|, $1, $2, $v->[1], $v->[0]; |