Charles Lepple
2013-Apr-26 02:28 UTC
[Nut-upsdev] [nut] usbhid-ups: trailing spaces in nut-scanner output not ignored when trying to find ups (#26)
On Apr 25, 2013, at 9:42 AM, Christian Wiese wrote:> I created a pull request #27 which is fixing the issue. > > # nut-scanner -qNU > [nutdev1] > driver = "usbhid-ups" > port = "auto" > vendorid = "051D" > productid = "0002" > product = "Back-UPS ES 700G FW:871.O2 .I USB FW:O2" > serial = "5B1243T01934" > vendor = "APC" > bus = "002"My main concern: why are spaces getting added in the first place? Is this coming from a strange version of libusb? (A quick look at the nut-scanner source code didn't show any obvious reasons.) Ref: https://github.com/networkupstools/nut/issues/26#issuecomment-17007355
Charles Lepple
2013-Apr-30 12:11 UTC
[Nut-upsdev] [nut] usbhid-ups: trailing spaces in nut-scanner output not ignored when trying to find ups (#26)
On Apr 29, 2013, at 9:21 AM, Christian Wiese wrote:> I doubt that it is a "strange version of libusb". I am using libusb 1.0.9 which was build from vanilla sources without any additional patches.Hmm. Just for completeness, which version of libusb-compat?> What if libusb doesn't take care at all if there a trailing spaces when reading device information taking the gathered infos as they are?That's what is confusing me. Spaces are apparently not treated specially anywhere in libusb-1.0, libusb-compat, or NUT. USB descriptors tend to have explicit lengths, too. I'm concerned this is masking some off-by-one error. On the other hand, I don't want to be too pedantic about this. I'm fine with merging this for now, possibly with a note in the documentation in case someone in the future figures out what is really going on. @aquette or @balooloo : are either of you working on nut-scanner? Ref: https://github.com/networkupstools/nut/issues/26#issuecomment-17166035
Seemingly Similar Threads
- Fw: Cannot Authenticate via LDAP
- minor tick marks for plots (PR#13616)
- Fw: share a folder rw, but not deletable?
- usbhid-ups: Failed to open device, skipping. (Permission denied)
- snmp-ups driver for APC smartUPS No supported device detected. Nut-scanner finds the device