Bug 239918 - usbhidctl(1): include item position in report descriptor dump
Summary: usbhidctl(1): include item position in report descriptor dump
Status: Closed FIXED
Alias: None
Product: Base System
Classification: Unclassified
Component: usb (show other bugs)
Version: 12.0-RELEASE
Hardware: Any Any
: --- Affects Only Me
Assignee: Hans Petter Selasky
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-08-16 21:46 UTC by Kevin Zheng
Modified: 2019-09-05 09:36 UTC (History)
1 user (show)

See Also:


Attachments
Patch (986 bytes, patch)
2019-08-16 21:46 UTC, Kevin Zheng
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Kevin Zheng 2019-08-16 21:46:08 UTC
Created attachment 206626 [details]
Patch

Include the item position (h->pos) in the report descriptor dump. This makes the output of `usbhidctl -r` more useful when many items have unassigned usages, such as when a device implements register accesses through USB HID.

For example, before the patch:

Input   rid=0 size=8 count=1 page=Consumer usage=Unassigned, logical range 0..255
Input   rid=0 size=8 count=1 page=Consumer usage=Unassigned, logical range 0..255

Both of these items look the same. After the patch:

Input   rid=0 pos=16 size=8 count=1 page=Consumer usage=Unassigned, logical range 0..255
Input   rid=0 pos=24 size=8 count=1 page=Consumer usage=Unassigned, logical range 0..255

These are obviously different items.
Comment 1 commit-hook freebsd_committer freebsd_triage 2019-08-17 08:30:04 UTC
A commit references this bug:

Author: hselasky
Date: Sat Aug 17 08:29:23 UTC 2019
New revision: 351167
URL: https://svnweb.freebsd.org/changeset/base/351167

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

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

Changes:
  head/usr.bin/usbhidctl/usbhid.c
Comment 2 commit-hook freebsd_committer freebsd_triage 2019-09-05 09:35:29 UTC
A commit references this bug:

Author: hselasky
Date: Thu Sep  5 09:35:06 UTC 2019
New revision: 351844
URL: https://svnweb.freebsd.org/changeset/base/351844

Log:
  MFC r351167:
  Include item position in report descriptor dump in usbhidctl(1).

  Submitted by:	Kevin Zheng <kevinz5000@gmail.com>
  PR:		239918

Changes:
_U  stable/12/
  stable/12/usr.bin/usbhidctl/usbhid.c
Comment 3 commit-hook freebsd_committer freebsd_triage 2019-09-05 09:36:30 UTC
A commit references this bug:

Author: hselasky
Date: Thu Sep  5 09:35:41 UTC 2019
New revision: 351845
URL: https://svnweb.freebsd.org/changeset/base/351845

Log:
  MFC r351167:
  Include item position in report descriptor dump in usbhidctl(1).

  Submitted by:	Kevin Zheng <kevinz5000@gmail.com>
  PR:		239918

Changes:
_U  stable/11/
  stable/11/usr.bin/usbhidctl/usbhid.c