From 7a886d3d1d12d0898f6f6a1c7e13f10e1422f203 Mon Sep 17 00:00:00 2001 From: Guillaume Cottenceau Date: Thu, 11 Jan 2001 12:47:16 +0000 Subject: remove nasty messages when mar or marfiles not available to perform consistency check --- mdk-stage1/pci-resource/update-pci-ids.pl | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'mdk-stage1/pci-resource/update-pci-ids.pl') diff --git a/mdk-stage1/pci-resource/update-pci-ids.pl b/mdk-stage1/pci-resource/update-pci-ids.pl index 5227295d7..2750d8aac 100755 --- a/mdk-stage1/pci-resource/update-pci-ids.pl +++ b/mdk-stage1/pci-resource/update-pci-ids.pl @@ -22,8 +22,11 @@ struct pci_module_map { my %t = (scsi => 'scsi', eth => 'net'); -$modulez{'eth'} = [ `../mar/mar -l ../../modules/network_modules.mar` ]; -$modulez{'scsi'} = [ `../mar/mar -l ../../modules/hd_modules.mar` ]; +if (-x "../mar/mar" && -f "../../modules/network_modules.mar" && -f "../../modules/hd_modules.mar") { + $modulez{'eth'} = [ `../mar/mar -l ../../modules/network_modules.mar` ]; + $modulez{'scsi'} = [ `../mar/mar -l ../../modules/hd_modules.mar` ]; + $check_marfiles = 1; +} foreach $type (keys %t) { @@ -44,7 +47,9 @@ struct pci_module_map ${type}_pci_ids[] = { $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 (defined($check_marfiles)) { + ($absent{$v->[0]} = 1) if (!grep(/^$v->[0]\.o\s/, @{$modulez{$type}})); + } } if (%absent) { print STDERR "\tmissing for $type: "; foreach (keys %absent) { print STDERR "$_ " } print STDERR "\n"; }; -- cgit v1.2.1