[Nut-upsdev] directing users towards documentation on udev and

Peter Selinger selinger at mathstat.dal.ca
Thu Dec 7 21:29:22 CET 2006


I find the documentation of libusb lacking in many respects. One is
that the possible return codes and errors are not documented, so one
would have to read the source code for every supported platform to
figure out what the possible errors are. 

Certainly checking for EPERM should not cause any problems, especially
if the error message is something like "Operation not permitted -
please check that the permissions of your USB device are set up
correctly. See XYZ for more information". 

That's certainly better than just "Operation not permitted". 

-- Peter

Charles Lepple wrote:
> 
> A lot of recent posts on problems with newhidups, tripplite_usb, etc.
> have been related to permission errors, and I don't think the current
> error messages really point users in the right direction:
> 
> failed to claim USB device, trying 2 more time(s)...
> detaching kernel driver from USB device...
> failed to detach kernel driver from USB device...
> trying again to claim USB device...
> failed to claim USB device, trying 1 more time(s)...
> detaching kernel driver from USB device...
> failed to detach kernel driver from USB device...
> trying again to claim USB device...
> failed to claim USB device, trying 0 more time(s)...
> detaching kernel driver from USB device...
> failed to detach kernel driver from USB device...
> trying again to claim USB device...
> Unable to get HID descriptor (error sending control message: Operation not
> permitted)
> 
> drivers/libusb.c (trunk, r613), line 233, has the last error message.
> 
> We could test for the return code (or errno) being equal to EPERM, but
> will that do the wrong thing on *BSD? For that matter, do any of the
> BSD USB stacks have restrictive permissions associated with their USB
> device nodes?
> 
> (We should be OK on OS X, since there seem to be no permission
> problems, and libusb's internal darwin_to_errno() can't return EPERM
> anyway.)
> 
> In any case, if it looks like the problem is related to permissions,
> we should mention the hotplug/udev documentation.
> 
> Any thoughts on this?
> 
> -- 
> - Charles Lepple
> 
> _______________________________________________
> Nut-upsdev mailing list
> Nut-upsdev at lists.alioth.debian.org
> http://lists.alioth.debian.org/mailman/listinfo/nut-upsdev
> 




More information about the Nut-upsdev mailing list