summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOlivier Blin <oblin@mandriva.com>2007-08-02 18:06:27 +0000
committerOlivier Blin <oblin@mandriva.com>2007-08-02 18:06:27 +0000
commit50d1dd3209ea1eaf8a51539c040f9abd618e8b53 (patch)
treebc9011846b946e84c51deaae9beaf53d6b4ca140
parentce67d8b66cb77da4e7864938396d32312ccc135c (diff)
downloadldetect-lst-50d1dd3209ea1eaf8a51539c040f9abd618e8b53.tar
ldetect-lst-50d1dd3209ea1eaf8a51539c040f9abd618e8b53.tar.gz
ldetect-lst-50d1dd3209ea1eaf8a51539c040f9abd618e8b53.tar.bz2
ldetect-lst-50d1dd3209ea1eaf8a51539c040f9abd618e8b53.tar.xz
ldetect-lst-50d1dd3209ea1eaf8a51539c040f9abd618e8b53.zip
allow to force specific modules only
-rwxr-xr-xconvert/merge2pcitable.pl12
1 files changed, 8 insertions, 4 deletions
diff --git a/convert/merge2pcitable.pl b/convert/merge2pcitable.pl
index 1f0e09ce..9c6e3fee 100755
--- a/convert/merge2pcitable.pl
+++ b/convert/merge2pcitable.pl
@@ -7,18 +7,22 @@ my @ignored_modules = (
qw(alsa ignore),
);
-my ($force, $all, $true_all, $keep_subids, $chk_descr, $wildcards);
+my ($force, @force_modules, $all, $true_all, $keep_subids, $chk_descr, $wildcards);
if ($0 =~ /merge2pcitable/)
{
- $ARGV[0] eq '-f' and $force = shift;
+ if ($ARGV[0] =~ /^-f=?(.*)$/) {
+ shift;
+ @force_modules = split(/,/, $1);
+ $force = !@force_modules;
+ }
$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::;
- @ARGV == 3 or die "usage: $0 [-f] [-a] $formats <in_file> <mdk_pcitable>\n";
+ @ARGV == 3 or die "usage: $0 [-f[=module1,...]] [-a] $formats <in_file> <mdk_pcitable>\n";
my ($format, $in, $pcitable) = @ARGV;
@@ -347,7 +351,7 @@ sub merge {
next if $new->{$_}[0] =~ /parport_pc|i810_ng/;
if ($drivers->{$_}) {
if ($new->{$_}[0] ne "unknown") {
- if ($drivers->{$_}[0] eq "unknown" || $force) {
+ if ($drivers->{$_}[0] eq "unknown" || $force || member($new->{$_}[0], @force_modules)) {
$drivers->{$_}[0] = $new->{$_}[0];
} elsif ($drivers->{$_}[0] ne $new->{$_}[0]) {
my $different = 1;