hello again... * Alan Stern <[EMAIL PROTECTED]> [2004-05-31 11:19 +0200]: > On Fri, 28 May 2004, Sebastian Henschel wrote: > > > i am currently porting usbview (http://usbview.sf.net) to GTK2 and > > sysfs. you can grab the current pre-version from > > http://kodeaffe.de/usbview-2.0pre2.tar.gz. > > > > while doing this, i realized that there is some information missing > > under /sys/bus/usb/devices/ what was available under > > /proc/bus/usb/devices. the following pieces are missing: > > What do you mean, "was available"? It's still there.
sorry, of course it is still available. i believe, i used past tense because i was still in the thinking about what i had done: look into proc; then look into sys; think: hey, something _was_ to be found in proc. :) > > topology: portNumber, count > > The port # is available as the last part of the directory name, the part > following the final '-' or '.'. really? a directory named "1-1" in sysfs should mean bus# 1 and port# 1? but this devices shows port# 0 in proc. i have a directory here in sysfs named 1-1:1.0 . comparing that with other items in sysfs and the info given in proc, it more looks like bus# 1, count, config#, iface# is there any documentation about this in <kernelsrc>/Documentation/usb/? or on linux-usb.sf.net? > > device: maxPacketSize > > bandwidth: all information (allocated, total, percent, interrupt, isoc) > > interface: drivername (would it be smart to parse /sys/bus/usb/drivers/?) > > endpoint: all information (address, attributes, maxpacketsize, interval, > > direction, type) > > alternate settings > > > > > > is it somewhat planned to include these? > > I don't know what anybody else is planning, but I don't have any plans to > change the way this works. so the current "way this works" is, that this info is unavailable in sysfs? > > i do not know about the > > inner workings of sysfs, but is this information perhaps device- or > > driver-dependent? > > Of course it's device-dependent! Obviously things like maxPacketSize and > endpoint addresses will be different for different devices. However it is > not driver-dependent (other than the driver name). sorry, i did not express myself cleanly. what i wanted to write was: in order to make that info available under sysfs, must every driver be programmed to do so (which would be more error-prone but might have other advantages) or is there a generic way for the usb-sysfs base code to retrieve that info? with base code, i mean the code used by all drivers or base classes or stuff included by usb.h or whatever the right nomenclature is. > > should this question be posed in linux-usb-devel? > > Yes it should; the USB users don't control the direction of future > changes. But you'd probably get about the same answer as I'm giving you. > In general, the feeling probably is that /proc/bus/usb/devices is there > for a reason, so you should use it. but some day, /proc/bus/usb/devices will go away and be replaced by /sys/bus/usb/devices/, when sysfs has matured enough... or not? if not, it seems i did not get the right idea of sysfs yet. why duplicating all that info from proc, then? thanks, sebastian -- ::: .O. ::: ..O ::: OOO ::: lynx -source http://www.kodeaffe.de/shensche.pub | gpg --import
signature.asc
Description: Digital signature
