History log of /freebsd-current/usr.bin/usbhidctl/usbhid.c
Revision Date Author Comments
# 2a63c3be 16-Aug-2023 Warner Losh <imp@FreeBSD.org>

Remove $FreeBSD$: one-line .c comment pattern

Remove /^/[*/]\s*\$FreeBSD\$.*\n/


# cccdaf50 07-Jul-2023 Alfonso Gregory <gfunni234@gmail.com>

Mark usage function as __dead2 in programs where it does not return

In most cases, usage does not return, so mark them as __dead2. For the
cases where they do return, they have not been marked __dead2.

Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/735


# b61a5730 10-May-2023 Warner Losh <imp@FreeBSD.org>

spdx: The BSD-2-Clause-NetBSD identifier is obsolete, drop -NetBSD

The SPDX folks have obsoleted the BSD-2-Clause-NetBSD 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


# 5c1d9710 17-Aug-2019 Hans Petter Selasky <hselasky@FreeBSD.org>

Include item position in report descriptor dump in usbhidctl(1).

Submitted by: Kevin Zheng <kevinz5000@gmail.com>
PR: 239918
MFC after: 1 week


# 1de7b4b8 27-Nov-2017 Pedro F. Giffuni <pfg@FreeBSD.org>

various: general adoption of SPDX licensing ID tags.

Mainly focus on files that use BSD 2-Clause license, however the tool I
was using misidentified 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.

No functional change intended.


# e39e854e 16-May-2012 Alexander Motin <mav@FreeBSD.org>

Add support for -z option for reading operations. It allows to not request
current values from device, but only receive changes.


# 69c5bce6 06-Nov-2011 Ed Schouten <ed@FreeBSD.org>

Add missing static keywords to usbhidctl(1)


# 7778ab7e 28-Sep-2011 Alexander Motin <mav@FreeBSD.org>

MFprojects/hid:
Import the rest of HID improvements from the branch:
- improve report descriptor parser in libusbhid to handle several kinds of
reports same time;
- add to the libusbhid API two functions wrapping respective kernel IOCTLs
for reading and writing reports;
- tune uhid IOCTL interface to allow reading and writing arbitrary report,
when multiple supported by the device;
- teach usbhidctl to set output and feature reports;
- make usbhidaction support all the same item names as bhidctl.

Sponsored by: iXsystems, inc.


# 1bee2ec7 30-Jul-2011 Alexander Motin <mav@FreeBSD.org>

MFprojects/hid:
- Fix usbhidctl and usbhidaction to handle HID devices with multiple
report ids, such as multimedia keyboards.
- Add collection type and report id to the `usbhidctl -r` output. They
are important for proper device understanding and debugging.
- Fix usbhidaction tool to properly handle items having report_count
more then 1.

Approved by: re (kib)
MFC after: 2 weeks


# a7d5f7eb 19-Oct-2010 Jamie Gritton <jamie@FreeBSD.org>

A new jail(8) with a configuration file, to replace the work currently done
by /etc/rc.d/jail.


# fe0506d7 09-Mar-2010 Marcel Moolenaar <marcel@FreeBSD.org>

Create the altix project branch. The altix project will add support
for the SGI Altix 350 to FreeBSD/ia64. The hardware used for porting
is a two-module system, consisting of a base compute module and a
CPU expansion module. SGI's NUMAFlex architecture can be an excellent
platform to test CPU affinity and NUMA-aware features in FreeBSD.


# 89f84ab0 16-Feb-2010 Warner Losh <imp@FreeBSD.org>

The NetBSD Foundation has granted permission to remove clause 3 and 4
from their software.

Obtained from: NetBSD


# 1946089b 23-Jun-2009 Xin LI <delphij@FreeBSD.org>

Use getprogname() instead of referencing __progname.


# bf41796c 23-Feb-2009 Andrew Thompson <thompsa@FreeBSD.org>

Build fixups for the new USB stack.


# 7e474656 01-Feb-2009 Alfred Perlstein <alfred@FreeBSD.org>

src/usr.bin/usbhidaction/usbhidaction.c
src/usr.bin/usbhidctl/usbhid.c
src/sys/dev/usb2/include/usb2_hid.h
src/sys/dev/usb2/input/uhid2.c
src/lib/libusbhid/Makefile
src/lib/libusbhid/descr.c
src/lib/libusbhid/descr_compat.c
src/lib/libusbhid/usbhid.3
src/lib/libusbhid/usbhid.h
src/lib/libusbhid/usbvar.h

Patches to make libusbhid and HID userland utilities compatible with
the new USB stack. All HID ioctls should go through the libusbhid
library to ensure compatibility. I have found at least one piece of
software in /usr/ports which needs to get updated before USB HID
devices will work. This is the X joystick input driver.

Reported and tested by:

Daichi GOTO and Masanori OZAWA.

src/sys/dev/usb2/core/usb2_process.c

Correct USB process names.

Reported by:

Andre Guibert de Bruet

src/sys/dev/usb2/serial/uftdi2.c

Integrate changes from old USB stack.

Submitted by: hps


# d7f03759 19-Oct-2008 Ulf Lilleengen <lulf@FreeBSD.org>

- Import the HEAD csup code which is the basis for the cvsmode work.


# f7d681bc 20-Dec-2007 Warner Losh <imp@FreeBSD.org>

usbhidctl appears to not report features and write size correctly

This turns out to be due to an argument botch for hid_report_size.
The PR contained patches to fix the argument botch.

Submitted by: Maurice Castro
PR: usb/118915


# eb29cfdd 22-Nov-2006 Greg Lehey <grog@FreeBSD.org>

usage: Include the - in the x flag.
main: Make -x set the hexdump; there's no obvious reason to toggle it.

Nitpicked by: ru
MFC after: 1 week


# 9a2a66f1 22-Nov-2006 Greg Lehey <grog@FreeBSD.org>

Add option -x to display output values in hex in addition to decimal.


# caf357a2 25-May-2003 Matthew N. Dodd <mdodd@FreeBSD.org>

Remove uninitialized local variable in favor of global.

PR: bin/52685
Submitted by: Alexander Nedotsukov <bland@mail.ru>
Approved by: re (scottl)


# cf0e07e5 08-Apr-2003 Matthew N. Dodd <mdodd@FreeBSD.org>

Sync with NetBSD.

- Bump shared library version on libusbhid.
- Retire libusbhid.h; it is called usbhid.h now.
- hid_start_parse() takes a third argument.
- hid_locate() takes a fifth argument.
- hid_report_size() order of arguments changes.
- Other changes, including formatting and whitespace.

Bump __FreeBSD_version.

This change will break all third party applications that rely on previous
FreeBSD specific behavior.


# d3974088 22-Apr-2002 Dag-Erling Smørgrav <des@FreeBSD.org>

Usage style sweep: spell "usage" with a small 'u'.
Also change one case of blatant __progname abuse (several more remain)
This commit does not touch anything in src/{contrib,crypto,gnu}/.


# e2d8b546 28-Mar-2002 Josef Karthauser <joe@FreeBSD.org>

Use libusbhid.h instead of libusb.h.


# 1a27f4f2 11-Dec-2001 Mark Murray <markm@FreeBSD.org>

WARNS=2 fixes.


# 1a2cdef4 17-Apr-2001 Nick Hibma <n_hibma@FreeBSD.org>

Remove a bogus %s from a printf.

Submitted by: kris


# 1d10fe50 17-Oct-2000 Nick Hibma <n_hibma@FreeBSD.org>

Fix the build break.

The solution isn't perfect, instead of printing the first report, it
will the report no report id, but the proper solution is more complex
than this. We would need to iterate over the report descriptor and
figure out all the report id's before starting to print.


# b2338d53 08-Oct-2000 Kris Kennaway <kris@FreeBSD.org>

Don't overflow in command-line args

Submitted by: Mike Heffner <mheffner@vt.edu>


# 09d308a8 05-Jul-2000 Nick Hibma <n_hibma@FreeBSD.org>

Add the usbhidctl utility, from NetBSD, by Lennart Augusst