diff options
author | Francois Pons <fpons@mandriva.com> | 2002-03-14 16:57:02 +0000 |
---|---|---|
committer | Francois Pons <fpons@mandriva.com> | 2002-03-14 16:57:02 +0000 |
commit | fdf8ac49ec1e2361de23fb800f8e173b8bda7949 (patch) | |
tree | ef90c0fb45691d33367c5ea7a67a8c580efcfcec /convert/merge2pcitable.pl | |
parent | 9b72baccab1182646bebf03518c7d637c26285be (diff) | |
download | ldetect-lst-fdf8ac49ec1e2361de23fb800f8e173b8bda7949.tar ldetect-lst-fdf8ac49ec1e2361de23fb800f8e173b8bda7949.tar.gz ldetect-lst-fdf8ac49ec1e2361de23fb800f8e173b8bda7949.tar.bz2 ldetect-lst-fdf8ac49ec1e2361de23fb800f8e173b8bda7949.tar.xz ldetect-lst-fdf8ac49ec1e2361de23fb800f8e173b8bda7949.zip |
added check for verifying if a missing quote has been put on module or
description.
Diffstat (limited to 'convert/merge2pcitable.pl')
-rwxr-xr-x | convert/merge2pcitable.pl | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/convert/merge2pcitable.pl b/convert/merge2pcitable.pl index 61fd6ffb..bd93be24 100755 --- a/convert/merge2pcitable.pl +++ b/convert/merge2pcitable.pl @@ -45,8 +45,13 @@ sub to_string { sub read_pcitable { my ($f) = @_; my %drivers; - my $rm_quote = sub { s/^"//; s/"$//; $_ }; my $line = 0; + my $rm_quote_silent = sub { s/^"//; s/"$//; $_ }; + my $rm_quote = sub { + s/^"// or print STDERR "missing left quote at line $line\n"; + s/"$// or print STDERR "missing right quote at line $line\n"; + $_; + }; foreach (cat_($f)) { chomp; $line++; next if /^#/ || /^\s*$/; @@ -57,7 +62,7 @@ sub read_pcitable { my ($module, $text) = @l; my $class = $text =~ /(.*?)|/; - my $id1_ = $rm_quote->($id1); + my $id1_ = $rm_quote_silent->($id1); if ($class{$id1_}) { print STDERR "$f $line: class $id1_ named both $class and $class{$id1_}, taking $class{$id1_}\n"; $class{$id1_} ||= $1; @@ -65,11 +70,11 @@ sub read_pcitable { } $module =~ s/\.o$//; - $module = "unknown" if dummy_module($module); - $module = "unknown" if $id1 == 0x1011 && (0x0024 <= $id2 && $id2 <= 0x0025); + $module = '"unknown"' if dummy_module($module); + $module = '"unknown"' if $id1 == 0x1011 && (0x0024 <= $id2 && $id2 <= 0x0025); # known errors in redhat's pcitable # these are pci to pci bridge - $module = "yenta_socket" if $module =~ /i82365/; + $module = '"yenta_socket"' if $module =~ /i82365/; my $id = join '', map { s/^0x//; length == 4 or print STDERR "$f $line: bad number $_\n"; |