Re: Modified usb-devices.sh script

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, 18 Jun 2009, Frans Pop wrote:

> Hi Greg, Randy,
> 
> Attached a modified version of the usb-devices.sh script. The change is 
> that I removed almost all the directory changes, which gives some speedup 
> (~5%) and IMHO also simplifies the code.
> 
> Attached both my version and a patch relative to the script as attached in 
> http://article.gmane.org/gmane.linux.usb.general/16828.
> 
> I plan to use a modified version of the script in Debian Installer.
> We currently cat /proc/bus/usb/devices into a hardware-summary file we 
> create for troubleshooting purposes. I prefer using the script over 
> mounting debugfs in the installer.
> I'll mention you both as authors of the script.

Can you add in the Parent and Port fields to the T: line?  They can be 
derived from the device's directory name as follows:

	If the name is "usb*" then Parent and Port are both 0.

	If the name is "A-B" or "A-B.C" or "A-B.C.D" etc. then the
	port number is B or C or D etc. (although the real
	/proc/bus/usb/devices file displays the port number - 1, for
	unknown reasons).  The Parent value is the contents of
	the device's ../devnum attribute.

I've never found much use for the Level or Count fields.  I also don't
see any reason to include the E: line for endpoint 0; the only useful
information it contains is the maxpacket size, and that is already
present on the D: line.

Alan Stern

P.S.: As long as you're making changes, you might as well fix the TBD 
comment near the top.  There's no hope of printing inactive 
configurations, since they aren't represented in sysfs.

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux