From 45f6a9c5330116162f68403ffa01cd758b8aa162 Mon Sep 17 00:00:00 2001 From: Pascal Rigaux Date: Wed, 4 Apr 2001 12:09:30 +0000 Subject: add merge with modules.usbmap --- convert/merge2pcitable.pl | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'convert') 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 () { + 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; -- cgit v1.2.1