Feedback for portable libusb code
Romain Tartière
romain at FreeBSD.org
Mon Jan 29 18:44:48 UTC 2018
Hello!
FreeBSD's libusb allows userland programs to access USB devices in a way
similar to GNU/Linux with it's libusb.
However, there are some differences between these implementations. I
recently diagnosed an issue in sigrok, provided a patch, but the
maintainer is having some questions and I am not sure about the best way
to address them.
If someone with more USB insight could give a look to this GitHub issue,
that would be awesome !
Basically, the usb_get_port_path() calls libusb_open() before (and
libusb_close() after) libusb_get_port_numbers() because this is required
on FreeBSD:
https://github.com/sigrokproject/libsigrok/blob/a9010323ddf4e479663e871386c05db05ea3522e/src/usb.c#L478-L491
However, calling libusb_open() twice fails…
The issue is here:
https://github.com/sigrokproject/libsigrok/pull/6
Thanks!
Romain
--
Romain Tartière <romain at FreeBSD.org> http://people.FreeBSD.org/~romain/
pgp: 8234 9A78 E7C0 B807 0B59 80FF BA4D 1D95 5112 336F (ID: 0x5112336F)
(plain text =non-HTML= PGP/GPG encrypted/signed e-mail much appreciated)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 659 bytes
Desc: not available
URL: <http://lists.freebsd.org/pipermail/freebsd-usb/attachments/20180129/4976d412/attachment.sig>
More information about the freebsd-usb
mailing list