summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2002-07-05 11:31:44 +0000
committerPascal Rigaux <pixel@mandriva.com>2002-07-05 11:31:44 +0000
commit75a4eaeeb3e8534aa8f8fcf83230e1462e7c662c (patch)
treebd99f30f5027fa69c197c7cd689b24b13972632f
parent2d67895882e96b2ff137a458441dc9b93bc454c3 (diff)
downloaddrakx-backup-do-not-use-75a4eaeeb3e8534aa8f8fcf83230e1462e7c662c.tar
drakx-backup-do-not-use-75a4eaeeb3e8534aa8f8fcf83230e1462e7c662c.tar.gz
drakx-backup-do-not-use-75a4eaeeb3e8534aa8f8fcf83230e1462e7c662c.tar.bz2
drakx-backup-do-not-use-75a4eaeeb3e8534aa8f8fcf83230e1462e7c662c.tar.xz
drakx-backup-do-not-use-75a4eaeeb3e8534aa8f8fcf83230e1462e7c662c.zip
make it work with "use strict"
-rwxr-xr-xmdk-stage1/pci-resource/update-pci-ids.pl11
1 files changed, 5 insertions, 6 deletions
diff --git a/mdk-stage1/pci-resource/update-pci-ids.pl b/mdk-stage1/pci-resource/update-pci-ids.pl
index 09bb6f02e..73f1d151b 100755
--- a/mdk-stage1/pci-resource/update-pci-ids.pl
+++ b/mdk-stage1/pci-resource/update-pci-ids.pl
@@ -1,9 +1,10 @@
#!/usr/bin/perl
+use strict;
use MDK::Common;
require '/usr/bin/merge2pcitable.pl';
-my $drivers = read_pcitable("/usr/share/ldetect-lst/pcitable");
+my $pci = read_pcitable("/usr/share/ldetect-lst/pcitable");
print '
#define PCI_REVISION_ID 0x08 /* Revision ID */
@@ -22,15 +23,15 @@ my %t = (
medias => 'disk/scsi|hardware_raid',
);
-foreach $type (keys %t) {
+foreach my $type (keys %t) {
my @modules = chomp_(`perl ../../kernel/modules.pl pci_modules4stage1:"$t{$type}"`);
print "#ifndef DISABLE_".uc($type)."
struct pci_module_map ${type}_pci_ids[] = {
";
- foreach my $k (sort keys %$drivers) {
- $v = $drivers->{$k};
+ foreach my $k (sort keys %$pci) {
+ my $v = $pci->{$k};
member($v->[0], @modules) or next;
$k =~ /^(....)(....)/;
printf qq|\t{ 0x%s, 0x%s, "%s", "%s" },\n|,
@@ -42,6 +43,4 @@ int ${type}_num_ids = sizeof(${type}_pci_ids) / sizeof(struct pci_module_map);
#endif
";
-
- print STDERR "\n";
}