https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=289242

            Bug ID: 289242
           Summary: usbconfig needs to be run as su // or does not return
                    error (libusb20)
           Product: Base System
           Version: CURRENT
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Some People
          Priority: ---
         Component: usb
          Assignee: [email protected]
          Reporter: [email protected]
                CC: [email protected]

When usbconfig is run as user it gives a generic warning:

% usbconfig 
No device match or lack of permissions.
% echo $?
0

There are multiple problems with that:
(a) apparently a user cannot dump the list of devices like one can for pciconf
-l
(b) usbconfig (if lacking permissions) returns 0 (no error) so other scripts
cannot easily detect this; flush_command() is void; parsing the output line for
this specific message helps but is broken by desin
(c) I cannot see an easy way to detect if it is a permission problem (rather
than no matches) to do an early exit.

Solving (a) would solve some of the problem (at least for listing; the use case
I am currently after) but not the general problem as a user might still not be
allowed to do:

% usbconfig -d 0.2 reset
No device match or lack of permissions.
% echo $?
0

So having a way to say: no such device vs. permission denied + non-zero exit
code in either case would still be better.

-- 
You are receiving this mail because:
You are the assignee for the bug.

Reply via email to