On Wed, 31 May 2000, Thomas Sailer wrote:
>Johan Verrept wrote:
>
>> Which does not mean it's desirable.
>
>Not necessarily.
>
>However, many userland tools already parse ASCII files in /proc.
>
I certainly didn't mean to start all this with my question, and I don't
mean to make anything worse. However, I offer my opinion on this :
I personally like the ASCII 'devices' file; it provides all the info
needed to create a full topology. However, I would rather not read the
whole file again when a connect/disconnect is received...
So, I was asking if each of the bus#/dev# could return their section of
the 'devices' file. Like a read (on my system, for example) on
/proc/bus/usb/001/001 would (could) return
T: Bus=01 Lev=00 Prnt=00 Port=00 Cnt=00 Dev#= 1 Spd=12 MxCh= 2
B: Alloc= 0/900 us ( 0%), #Int= 0, #Iso= 0
D: Ver= 1.00 Cls=09(hub ) Sub=00 Prot=00 MxPS= 8 #Cfgs= 1
P: Vendor=0000 ProdID=0000 Rev= 0.00
S: Product=USB UHCI Root Hub
S: SerialNumber=ff00
C:* #Ifs= 1 Cfg#= 1 Atr=40 MxPwr= 0mA
I: If#= 0 Alt= 0 #EPs= 1 Cls=09(hub ) Sub=00 Prot=00 Driver=hub
E: Ad=81(I) Atr=03(Int.) MxPS= 8 Ivl=255ms
and a read on another specific device could return its ASCII info.
Then, when one device is connected, just one device's info is read, not
all devices' info.
This is accomplished with the binary descriptors too, but that lacks
topology info. Returning the binary descriptors is the same as manually
asking the device for its descriptors, just saving the client some
trouble, no?
IMHO, the machine-readable ASCII add functionality (topology info) and is
readable by a user.
--
Dan Streetman
[EMAIL PROTECTED]
---------------------
186,272 miles per second:
It isn't just a good idea, it's the law!
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]