Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 29 Jan 2018 19:44:45 +0100
From:      Romain =?iso-8859-1?Q?Tarti=E8re?= <romain@FreeBSD.org>
To:        usb@freebsd.org
Subject:   Feedback for portable libusb code
Message-ID:  <20180129184445.GB7783@blogreen.org>

next in thread | raw e-mail | index | archive | help

--wzJLGUyc3ArbnUjN
Content-Type: text/plain; charset=utf-8
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

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/a9010323ddf4e479663e871386c=
05db05ea3522e/src/usb.c#L478-L491

However, calling libusb_open() twice fails=E2=80=A6

The issue is here:
https://github.com/sigrokproject/libsigrok/pull/6

Thanks!

Romain

--=20
Romain Tarti=C3=A8re <romain@FreeBSD.org>  http://people.FreeBSD.org/~romai=
n/
pgp: 8234 9A78 E7C0 B807 0B59  80FF BA4D 1D95 5112 336F (ID: 0x5112336F)
(plain text =3Dnon-HTML=3D PGP/GPG encrypted/signed e-mail much appreciated)

--wzJLGUyc3ArbnUjN
Content-Type: application/pgp-signature; name="signature.asc"

-----BEGIN PGP SIGNATURE-----

iQGzBAEBCAAdFiEEgjSaeOfAuAcLWYD/uk0dlVESM28FAlpva50ACgkQuk0dlVES
M2+umgv+PCb/H76Wnkv10/hfBCBkzeJdjJ2p/7l9ku2nDwruryjonH6s1AN4l9Ee
E3yXEhvhr8xMA9A9z1i/ViV5VgdQAPJk/vYgMSrZoIec1uqFfWtpnUnIVKrMz/YS
y2Gf2oR52vqkw3pGIC4zerUcFRGywpyJ5aAUkbTjoM2vx0GoKxrvG/11RaIDffRn
eKUzRQDUPcQZv4gS1XcebOQ57nnCwXt2Frv+Y+firBcJlbC6Jki+rjM1J41IB9r5
GUnYXW/Meut8YhHtpVYFGUxbeG0q88fGMU9qdRcn/Dj2VZ2P7/iV2ht+EC/mK36L
/Niq8gR+jfS9vliOJWLS1czHtVMCDx62iZTNwsqEZrQkcpmt+l+yKPcNN+xWtt9Q
pEhHaQJJuykWySUxfnDAG9wHNoxzrm0181Q1mEjODujnSGAoddDw/uBnmns8ygPB
pMbFNo9QZUnMDGb2BCNJVenDj+MKpA117VzoM7xMeaJvG2I186gVRe9OX7nnPMIu
u/CLQcSm
=QZn+
-----END PGP SIGNATURE-----

--wzJLGUyc3ArbnUjN--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20180129184445.GB7783>