diff options
author | Tzafrir Cohen <tzafrir.cohen@xorcom.com> | 2011-08-25 10:32:17 +0000 |
---|---|---|
committer | Tzafrir Cohen <tzafrir.cohen@xorcom.com> | 2011-08-25 10:32:17 +0000 |
commit | 4c1f7449f7fe1c3b30578393a422b40f5c6f1601 (patch) | |
tree | 9473f9bc805d1a0ae87d384bec75abd3c5780d03 /xpp | |
parent | bdd3e1bf12ca53fba20e8679434ef8bc0f5f4c60 (diff) |
dahdi-perl: Also get USB loaded driver from usbfs
Signed-off-by: Oron Peled <oron.peled@xorcom.com>
Signed-off-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com>
git-svn-id: http://svn.asterisk.org/svn/dahdi/tools/trunk@10153 a0bf4364-ded3-4de4-8d8a-66a801d63aff
Diffstat (limited to 'xpp')
-rw-r--r-- | xpp/perl_modules/Dahdi/Hardware/USB.pm | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/xpp/perl_modules/Dahdi/Hardware/USB.pm b/xpp/perl_modules/Dahdi/Hardware/USB.pm index 60df56b..80a2ed6 100644 --- a/xpp/perl_modules/Dahdi/Hardware/USB.pm +++ b/xpp/perl_modules/Dahdi/Hardware/USB.pm @@ -183,6 +183,7 @@ sub scan_devices($) { my @lines = split(/\n/); my ($tline) = grep(/^T/, @lines); my ($pline) = grep(/^P/, @lines); + my ($dline) = grep(/^I/, @lines); my ($sline) = grep(/^S:.*SerialNumber=/, @lines); my ($busnum,$devnum) = ($tline =~ /Bus=(\w+)\W.*Dev#=\s*(\w+)\W/); my $devname = sprintf("%03d/%03d", $busnum, $devnum); @@ -193,6 +194,10 @@ sub scan_devices($) { $serial = $1; #$serial =~ s/[[:^print:]]/_/g; } + my $loaded; + if ($dline =~ /Driver=(\w+)/) { + $loaded = $1; + } my $model = $usb_ids{"$vendor:$product"}; next unless defined $model; my $d = Dahdi::Hardware::USB->new( @@ -203,6 +208,7 @@ sub scan_devices($) { SERIAL => $serial, DESCRIPTION => $model->{DESCRIPTION}, DRIVER => $model->{DRIVER}, + LOADED => $loaded, ); push(@devices, $d); } |