diff options
author | Guillaume Cottenceau <gc@mandriva.com> | 2001-01-02 23:32:50 +0000 |
---|---|---|
committer | Guillaume Cottenceau <gc@mandriva.com> | 2001-01-02 23:32:50 +0000 |
commit | 206de487dc1dda8cf884101947b0cd1ac5c0e40c (patch) | |
tree | 598080a3c67c9c155f83b6fc2ce847af448d7eca | |
parent | 6fc74b08e8a042b0a47c1388f90ab64c0ba70b0e (diff) | |
download | drakx-backup-do-not-use-206de487dc1dda8cf884101947b0cd1ac5c0e40c.tar drakx-backup-do-not-use-206de487dc1dda8cf884101947b0cd1ac5c0e40c.tar.gz drakx-backup-do-not-use-206de487dc1dda8cf884101947b0cd1ac5c0e40c.tar.bz2 drakx-backup-do-not-use-206de487dc1dda8cf884101947b0cd1ac5c0e40c.tar.xz drakx-backup-do-not-use-206de487dc1dda8cf884101947b0cd1ac5c0e40c.zip |
vacances:
- honour kernel-2.4 modules location when globbing for finding modules by type
- verify against ../../modules/*.mar stuff to print out warnings if we miss some modules
-rwxr-xr-x | mdk-stage1/pci-resource/update-pci-ids.pl | 20 |
1 files changed, 14 insertions, 6 deletions
diff --git a/mdk-stage1/pci-resource/update-pci-ids.pl b/mdk-stage1/pci-resource/update-pci-ids.pl index 06a8beda5..06dd302e9 100755 --- a/mdk-stage1/pci-resource/update-pci-ids.pl +++ b/mdk-stage1/pci-resource/update-pci-ids.pl @@ -22,28 +22,36 @@ struct pci_module_map { my %t = (scsi => 'scsi', eth => 'net'); -foreach (keys %t) { - print "#ifndef DISABLE_NETWORK\n" if ($_ eq 'eth'); - print "#ifndef DISABLE_MEDIAS\n" if ($_ eq 'scsi'); +$modulez{'eth'} = [ `../mar/mar -l ../../modules/network_modules.mar` ]; +$modulez{'scsi'} = [ `../mar/mar -l ../../modules/hd_modules.mar` ]; + + +foreach $type (keys %t) { + print "#ifndef DISABLE_NETWORK\n" if ($type eq 'eth'); + print "#ifndef DISABLE_MEDIAS\n" if ($type eq 'scsi'); print " -struct pci_module_map ${_}_pci_ids[] = { +struct pci_module_map ${type}_pci_ids[] = { "; my %l; - foreach (glob("../../kernel*/lib/modules/*/$t{$_}/*.o")) { + foreach (glob("../../kernel*/lib/modules/*/kernel/drivers/$t{$type}/*.o")) { m|([^/]*)\.o$|; $l{$1} = 1; } + my %absent; while (my ($k, $v) = each %$drivers) { $l{$v->[0]} or next; $k =~ /^(....)(....)/; printf qq|\t{0x%s , 0x%s , ( "%s" ), ( "%s" )} ,\n|, $1, $2, $v->[1], $v->[0]; + ($absent{$v->[0]} = 1) if (!grep(/^$v->[0]\.o\s/, @{$modulez{$type}})); } + if (%absent) { print STDERR "missing for $type: "; foreach (keys %absent) { print STDERR "$_ " } print STDERR "\n"; }; + print " }; -int ${_}_num_ids=sizeof(${_}_pci_ids)/sizeof(struct pci_module_map); +int ${type}_num_ids=sizeof(${type}_pci_ids)/sizeof(struct pci_module_map); "; print "#endif\n"; |