[svn-commits] tzafrir: branch tools/tzafrir/perl-sysstate r7825 - /tools/team/tzafrir/perl-...
SVN commits to the Digium repositories
svn-commits at lists.digium.com
Sun Jan 10 08:41:41 CST 2010
Author: tzafrir
Date: Sun Jan 10 08:41:38 2010
New Revision: 7825
URL: http://svnview.digium.com/svn/dahdi?view=rev&rev=7825
Log:
A better test for the Astribank transport directory
* On some kernels there's no 'usb_endpoint' under the USB device's SysFS
node. Use 'idVendor' which is far less likely to fail.
* Actively resolve the symlink 'transport' to its name (e.g. '1-2').
Modified:
tools/team/tzafrir/perl-sysstate/xpp/perl_modules/Dahdi/Hardware/USB.pm
Modified: tools/team/tzafrir/perl-sysstate/xpp/perl_modules/Dahdi/Hardware/USB.pm
URL: http://svnview.digium.com/svn/dahdi/tools/team/tzafrir/perl-sysstate/xpp/perl_modules/Dahdi/Hardware/USB.pm?view=diff&rev=7825&r1=7824&r2=7825
==============================================================================
--- tools/team/tzafrir/perl-sysstate/xpp/perl_modules/Dahdi/Hardware/USB.pm (original)
+++ tools/team/tzafrir/perl-sysstate/xpp/perl_modules/Dahdi/Hardware/USB.pm Sun Jan 10 08:41:38 2010
@@ -93,8 +93,9 @@
} else {
warn "Bad USB transportdir='$transportdir' usbdev='$usbdev'\n";
}
- } elsif(-d "$transportdir/usb_endpoint") {
- $transportdir =~ m|/(\d+)-\d+$|;
+ } elsif(-f "$transportdir/idVendor" ) {
+ my $transport_link = readlink($transportdir);
+ $transport_link =~ m|/(\d+)-\d+$|;
$busnum = $1;
$devnum = readval("$transportdir/devnum");
}
More information about the svn-commits
mailing list