summaryrefslogtreecommitdiffstats
path: root/convert
diff options
context:
space:
mode:
authorThierry Vignaud <tvignaud@mandriva.org>2004-11-26 17:56:32 +0000
committerThierry Vignaud <tvignaud@mandriva.org>2004-11-26 17:56:32 +0000
commit70519441dc058e2e38253929a6aa776761439682 (patch)
treeac10e774e6741e5a019a05c3a555f9a2f7066d3b /convert
parentf0eeb21638489b24c72f44a898be99566b4d8b83 (diff)
downloadldetect-lst-70519441dc058e2e38253929a6aa776761439682.tar
ldetect-lst-70519441dc058e2e38253929a6aa776761439682.tar.gz
ldetect-lst-70519441dc058e2e38253929a6aa776761439682.tar.bz2
ldetect-lst-70519441dc058e2e38253929a6aa776761439682.tar.xz
ldetect-lst-70519441dc058e2e38253929a6aa776761439682.zip
(merge_entries_with_wildcards) split from merge() the new code that
handle PCI_ANY_ID in kernel's pcimap. rationale: drivers that use PCI_ANY_ID often also check PCI capabalities which we cannot do w/o the card physically present and thus what we found must be reviewed. this is enabled by using the --handle-wildcards option
Diffstat (limited to 'convert')
-rwxr-xr-xconvert/merge2pcitable.pl11
1 files changed, 9 insertions, 2 deletions
diff --git a/convert/merge2pcitable.pl b/convert/merge2pcitable.pl
index 5be96322..dd8ece28 100755
--- a/convert/merge2pcitable.pl
+++ b/convert/merge2pcitable.pl
@@ -7,13 +7,14 @@ my @ignored_modules = (
qw(alsa ignore),
);
-my ($force, $all, $true_all, $keep_subids, $chk_descr);
+my ($force, $all, $true_all, $keep_subids, $chk_descr, $wildcards);
if ($0 =~ /merge2pcitable/)
{
$ARGV[0] eq '-f' and $force = shift;
$ARGV[0] eq '-a' and $all = shift;
$ARGV[0] eq '--keep-subids' and $keep_subids = shift;
+ $ARGV[0] eq '--handle-wildcards' and $wildcards = shift;
my $formats = join '|', grep { $_ } map { /^read_(.*)/ ? $1 : '' } keys %main::;
@@ -273,7 +274,8 @@ sub write_pcitable {
}
}
-sub merge {
+
+sub merge_entries_with_wildcards {
my ($drivers, $new, $classes) = @_;
foreach (keys %$classes) {
my ($vendor, $id, $subvendor, $subid);
@@ -293,6 +295,11 @@ sub merge {
}
}
}
+}
+
+sub merge {
+ my ($drivers, $new, $classes) = @_;
+ merge_entries_with_wildcards($drivers, $new, $classes) if $wildcards;
foreach (keys %$new) {
next if $new->{$_}[0] =~ /parport_pc|i810_ng/;