summaryrefslogtreecommitdiffstats
path: root/convert/merge2pcitable.pl
diff options
context:
space:
mode:
authorThierry Vignaud <tvignaud@mandriva.org>2004-11-17 14:58:46 +0000
committerThierry Vignaud <tvignaud@mandriva.org>2004-11-17 14:58:46 +0000
commitde2198f85701d8c557cfd56718a486a6b07b419c (patch)
treec1e552a82405b9bfe5d4083c83ad48555643d9e1 /convert/merge2pcitable.pl
parent857b6b4b7c21c282cb693ab436ae6c792be11340 (diff)
downloadldetect-lst-de2198f85701d8c557cfd56718a486a6b07b419c.tar
ldetect-lst-de2198f85701d8c557cfd56718a486a6b07b419c.tar.gz
ldetect-lst-de2198f85701d8c557cfd56718a486a6b07b419c.tar.bz2
ldetect-lst-de2198f85701d8c557cfd56718a486a6b07b419c.tar.xz
ldetect-lst-de2198f85701d8c557cfd56718a486a6b07b419c.zip
add support for new rh's pcitable format from FC3's hwdata
Diffstat (limited to 'convert/merge2pcitable.pl')
-rwxr-xr-xconvert/merge2pcitable.pl8
1 files changed, 7 insertions, 1 deletions
diff --git a/convert/merge2pcitable.pl b/convert/merge2pcitable.pl
index a7f7588d..ed304d72 100755
--- a/convert/merge2pcitable.pl
+++ b/convert/merge2pcitable.pl
@@ -44,10 +44,15 @@ sub to_string {
join "\t", $id1, $id2, if_("$subid1 $subid2" ne "0xffff 0xffff", $subid1, $subid2), $module, $text;
}
+sub read_rhpcitable {
+ my ($f, $strict) = @_;
+ read_pcitable($f, $strict, 1);
+}
+
# works for RedHat's pcitable old and new format, + mdk format (alike RedHat's old one)
# (the new format has ending .o's and double quotes are removed)
sub read_pcitable {
- my ($f, $strict) = @_;
+ my ($f, $strict, $newer_rh_format) = @_;
my %drivers;
my %class;
my $line = 0;
@@ -69,6 +74,7 @@ sub read_pcitable {
}
if (my ($id1, $id2, @l) = split /\t+/) {
+ push @l, '""' if $newer_rh_format;
my ($subid1, $subid2) = ('ffff', 'ffff');
($subid1, $subid2, @l) = @l if @l == 4;
@l == 2 or die "$f:$line: bad number of fields " . (int @l) . " (in $_)\n";