diff options
author | Pascal Rigaux <pixel@mandriva.com> | 2001-04-04 12:09:30 +0000 |
---|---|---|
committer | Pascal Rigaux <pixel@mandriva.com> | 2001-04-04 12:09:30 +0000 |
commit | 45f6a9c5330116162f68403ffa01cd758b8aa162 (patch) | |
tree | 8ba17daec9794961ed8325f84f8d78e84dd85ad1 | |
parent | 91243092bc60bf68a16bca98b1952d41f63a8f88 (diff) | |
download | ldetect-lst-45f6a9c5330116162f68403ffa01cd758b8aa162.tar ldetect-lst-45f6a9c5330116162f68403ffa01cd758b8aa162.tar.gz ldetect-lst-45f6a9c5330116162f68403ffa01cd758b8aa162.tar.bz2 ldetect-lst-45f6a9c5330116162f68403ffa01cd758b8aa162.tar.xz ldetect-lst-45f6a9c5330116162f68403ffa01cd758b8aa162.zip |
add merge with modules.usbmap
-rwxr-xr-x | convert/merge2pcitable.pl | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/convert/merge2pcitable.pl b/convert/merge2pcitable.pl index 354720cc..071b58da 100755 --- a/convert/merge2pcitable.pl +++ b/convert/merge2pcitable.pl @@ -89,6 +89,20 @@ sub read_kernel_pcimap { \%drivers; } +sub read_kernel_usbmap { + my ($f) = @_; + my %drivers; + open F, $f or die "read_kernel_usbmap: can't open $f\n"; + foreach (<F>) { + chomp; + next if /^#/ || /^\s*$/; + my ($module, $flag, $id1, $id2) = split; + hex($flag) == 3 or next; + $drivers{join '', map { /(....)$/ } $id1, $id2, "ffff", "ffff"} = [ $module, '' ]; + } + \%drivers; +} + sub read_pciids { my ($f) = @_; my %drivers; |