[Pkg-voip-commits] [dahdi-tools] 42/285: dahdi-perl: Also get USB loaded driver from usbfs
tzafrir at debian.org
tzafrir at debian.org
Thu Jul 7 19:18:26 UTC 2016
This is an automated email from the git hooks/post-receive script.
tzafrir pushed a commit to branch master
in repository dahdi-tools.
commit b23f3ca5a99e74b3daaa6b8d03e24c0c293e2feb
Author: Oron Peled <oron.peled at xorcom.com>
Date: Thu Aug 25 10:32:17 2011 +0000
dahdi-perl: Also get USB loaded driver from usbfs
Signed-off-by: Oron Peled <oron.peled at xorcom.com>
Signed-off-by: Tzafrir Cohen <tzafrir.cohen at xorcom.com>
git-svn-id: http://svn.astersk.org/svn/dahdi/tools/trunk@10153 17933a7a-c749-41c5-a318-cba88f637d49
---
xpp/perl_modules/Dahdi/Hardware/USB.pm | 6 ++++++
1 file changed, 6 insertions(+)
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);
}
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-voip/dahdi-tools.git
More information about the Pkg-voip-commits
mailing list