On 09/14/2007 06:57:48 PM, Xiaofan Chen wrote:
On 9/15/07, Karl O. Pinc <[EMAIL PROTECTED]> wrote:
> Apparently libusb silently ignores at least some permission
> errors, and there is nothing in the API which allows such
> errors to be reported back to applications.  As a result
> applications, like lsusb, which report on usb devices must be
> run as root lest some devices be silently omitted from
> the report.

Sorry about my ignorance about your problem but
I thought your problem has already fully answered by
Greg KH.

I'm pretty ignorant about it myself.  What I understood
from the linux-usb-devel mailing list conversation was:

 The problem only occurs when something sets
 permissions improperly in /dev/bus/usb/.   Which is,
 of course, exactly when it matters whether
 error messages are produced or errors silently ignored.

 The kernel is exposing all the necessary information:

 libusb is not presently designed to deliver the necessary
 information to applications.  It will break the existing
 API to deliver the necessary information to the application.

 A new version of libusb is being worked on.

So, I'm writing the libusb people so that they are aware
of the problem and can make the necessary changes
when they decide to release a new API.  I don't really
have any questions, except perhaps whether the
designers consider this a feature rather than a design flaw
and never plan to fix it.

I may have mis-understood and so be contacting the
wrong people.  If so I apologize.

Maybe another solution is that you can ask the lsusb user
not to use libusb or write your own lsusb like application.

I think the work-around is to always run lsusb as root.
A corollary would be to document the problem in the lsusb
man page.

I did contact the Debian lsusb maintainer and he was unwilling
to rewrite lsusb so that it did not use libusb.  It did not
occur to me to contact the upstream maintainers so I'll cc
them here.  FYI, the Debian bug # is 440763, found at:
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=440763

All I want to do is report the problem to the people who have
the power to fix it.  I surely must have done that at this point
(there's no one left who's not been contacted!)
so I'll stop now.

Thanks for everyone's patience.

Karl <[EMAIL PROTECTED]>
Free Software:  "You don't pay back, you pay forward."
                 -- Robert A. Heinlein


Reply via email to