On Tue, 25 Oct 2005, Glenn Maynard wrote:

> On Tue, Oct 25, 2005 at 10:44:16AM -0700, Greg KH wrote:
> > I saw that you mentioned that we don't need the address, as it's in the
> > directory name, but I would argue that we should have it anyway, as it's
> > hard for some shell languages to parse out the address from the
> > directory name.
> 
> It's also much cleaner, from a user standpoint, to treat a sysfs directory
> as a set of named properties with a path, than special path-specific unnamed
> properties only accessible by parsing the path.  "get_property(path, 
> 'bAddress')"
> is better than string parsing in just about all languages.

I feel argumentative this morning, so here goes...

>  "get_property(path, 'bAddress')"
> is better than string parsing in just about all languages.

"Better" is a matter of opinion.  "get_property" requires more computer
resources (transfer from user mode to kernel mode and back to perform the
I/O).

Besides, you've ignored a fundamental point.  Where did "path" come from 
in the first place?  In any reasonable scenario, you will have something 
like this:

        path="${intf_path}/ep_${address}"

So then how is "get_property(path, 'bAddress')" any better than simply 
"address"?

Alan Stern



-------------------------------------------------------
This SF.Net email is sponsored by the JBoss Inc.
Get Certified Today * Register for a JBoss Training Course
Free Certification Exam for All Training Attendees Through End of 2005
Visit http://www.jboss.com/services/certification for more information
_______________________________________________
[email protected]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Reply via email to