Commit graph

14 commits

Author SHA1 Message Date
Warner Losh 2a63c3be15 Remove $FreeBSD$: one-line .c comment pattern
Remove /^/[*/]\s*\$FreeBSD\$.*\n/
2023-08-16 11:54:29 -06:00
Warner Losh 4d846d260e spdx: The BSD-2-Clause-FreeBSD identifier is obsolete, drop -FreeBSD
The SPDX folks have obsoleted the BSD-2-Clause-FreeBSD identifier. Catch
up to that fact and revert to their recommended match of BSD-2-Clause.

Discussed with:		pfg
MFC After:		3 days
Sponsored by:		Netflix
2023-05-12 10:44:03 -06:00
Hans Petter Selasky 1055793115 Be bug compatible with other operating systems by allowing non-sequential
interface numbering for USB descriptors in userspace. Else certain USB
control requests using the interface number, won't be recognized by the
USB firmware.

Refer to section 9.2.3 in the USB 2.0 specification:
Interfaces are numbered from zero to one less than the number of concurrent interfaces
supported by the configuration.

PR:		251784
MFC after:	1 week
Sponsored by:	Mellanox Technologies // NVIDIA Networking
2020-12-14 11:56:16 +00:00
Pedro F. Giffuni 5e53a4f90f lib: further adoption of SPDX licensing ID tags.
Mainly focus on files that use BSD 2-Clause license, however the tool I
was using mis-identified many licenses so this was mostly a manual - error
prone - task.

The Software Package Data Exchange (SPDX) group provides a specification
to make it easier for automated tools to detect and summarize well known
opensource licenses. We are gradually adopting the specification, noting
that the tags are considered only advisory and do not, in any way,
superceed or replace the license texts.
2017-11-26 02:00:33 +00:00
Pedro F. Giffuni 75f46cf6c8 lib: minor spelling fixes in comments.
No functional change.
2016-05-01 19:37:33 +00:00
Pedro F. Giffuni 5a5c6e994c libusb: Fix minor cast-qual warning.
Fix a warning triggered by the gcc + FORTIFY_SOURCE patches:

In function 'libusb20_parse_config_desc': lib/libusb/libusb20_desc.c:141:
warning: passing argument 1 of 'memcpy' discards qualifiers from pointer
target type

Submitted by:	hselansky
2015-07-20 16:15:56 +00:00
Marcelo Araujo 721d6da7ef Remove unused variables to silence CLANG warnings.
Remove some BLANK lines and unnecessary TABS.

Differential Revision:	D2687
Reviewed by:		rodrigc, hselasky
2015-06-24 01:34:35 +00:00
Hans Petter Selasky 6619413096 - Make the FreeBSD's USB library compile under Linux.
- Fix a compile warning where the return value of a call
to a write() function was ignored.
- Remove redundant include files from userland USB header files.
- Add some now needed include files to various C-files.
2013-03-13 12:23:14 +00:00
Hans Petter Selasky d81535d1f9 Fix some compile warnings.
MFC after:	1 week
2012-04-20 14:29:45 +00:00
Hans Petter Selasky 4c0392e6fd Add definition of some USB 3.0 descriptors to libusb 1.0 and libusb 2.0.
Some header file parts of this patch were taken from a patch submitted
by Maya Erez <merez@codeaurora.org> to the LibUSB developers list.

MFC after:	1 week
2011-11-09 19:03:26 +00:00
Wojciech A. Koszek f3cba95c5b Resort includes to match style(9) a bit more. No functional change
is expected after this commit.

Tested by:	make buildworld
Reviewed by:	hps (patch without .h changes)
2010-02-13 09:45:50 +00:00
Wojciech A. Koszek d426c025be Remove redundand headers and use more standard ones where necessary.
Reviewed by:	hps@
2010-02-11 08:34:41 +00:00
Andrew Thompson ccef4ddf40 - fix refcounting error during data transfer
- fix a memory leak on the USB backend
- fix invalid pointer computations (in one case memory outside the allocated
  area was written in LibUSB v1.0)
- make sure memory is always initialised, also in failing cases
- add missing functions from v1.0.4

PR:		usb/140325
Reported by:	Robert Jenssen
Submitted by:	Hans Petter Selasky
MFC After:	3 days
2009-11-08 20:03:52 +00:00
Andrew Thompson df4b8c2a2d libusb20 is now installed as libusb, remove the version number from the
directory name.
2009-03-09 17:09:46 +00:00
Renamed from lib/libusb20/libusb20_desc.c (Browse further)