r3138 - trunk/src/host/usbpath
werner at sita.openmoko.org
werner at sita.openmoko.org
Wed Oct 10 03:56:26 CEST 2007
Author: werner
Date: 2007-10-10 03:56:15 +0200 (Wed, 10 Oct 2007)
New Revision: 3138
Added:
trunk/src/host/usbpath/lsusbpath
Modified:
trunk/src/host/usbpath/README
Log:
lsusbpath: wrapper for lsusb to also print path names
README: added description of lsusbpath
Modified: trunk/src/host/usbpath/README
===================================================================
--- trunk/src/host/usbpath/README 2007-10-09 17:30:14 UTC (rev 3137)
+++ trunk/src/host/usbpath/README 2007-10-10 01:56:15 UTC (rev 3138)
@@ -28,6 +28,10 @@
1/19
+lsusbpath is a wrapper for lsusb that converts bus and device numbers in
+lsusb output to paths, and prints them in addition to the numbers.
+
+
Compilation and installation
----------------------------
Added: trunk/src/host/usbpath/lsusbpath
===================================================================
--- trunk/src/host/usbpath/lsusbpath 2007-10-09 17:30:14 UTC (rev 3137)
+++ trunk/src/host/usbpath/lsusbpath 2007-10-10 01:56:15 UTC (rev 3138)
@@ -0,0 +1,12 @@
+#!/usr/bin/perl
+open(PIPE, "-|", "lsusb", @ARGV) || die "popen $ARGV[0]: $!";
+while (<PIPE>) {
+ if (/Bus (\d+) Device (\d+):/) {
+ $path = `usbpath "$1/$2"`;
+ chop $path;
+ print "Path $path $_";
+ }
+ else {
+ print;
+ }
+}
Property changes on: trunk/src/host/usbpath/lsusbpath
___________________________________________________________________
Name: svn:executable
+ *
More information about the commitlog
mailing list