From: Sascha Wildner Date: Mon, 10 Mar 2014 20:46:26 +0000 (+0100) Subject: Sync the new USB stack's usbhidctl(1) with FreeBSD. X-Git-Tag: v3.9.0~376 X-Git-Url: https://gitweb.dragonflybsd.org/~tuxillo/dragonfly.git/commitdiff_plain/691fcb8396a0f8969100c0e83cc50951d196b138 Sync the new USB stack's usbhidctl(1) with FreeBSD. --- diff --git a/usr.bin/u4bhidctl/Makefile b/usr.bin/u4bhidctl/Makefile index 4a82c1cca1..da381434b9 100644 --- a/usr.bin/u4bhidctl/Makefile +++ b/usr.bin/u4bhidctl/Makefile @@ -1,12 +1,9 @@ # $NetBSD: Makefile,v 1.4 1999/05/11 21:02:25 augustss Exp $ -# $FreeBSD: src/usr.bin/usbhidctl/Makefile,v 1.2.2.1 2002/04/03 16:48:25 joe Exp $ - -.include +# $FreeBSD: head/usr.bin/usbhidctl/Makefile 94744 2002-04-15 09:33:34Z ru $ PROG= usbhidctl SRCS= usbhid.c - -LDADD+= -lusbhid -DPADD+= ${LIBUSBHID} +DPADD= ${LIBUSBHID} +LDADD= -lusbhid .include diff --git a/usr.bin/u4bhidctl/usbhid.c b/usr.bin/u4bhidctl/usbhid.c index e8083ea50e..c1f4c1d986 100644 --- a/usr.bin/u4bhidctl/usbhid.c +++ b/usr.bin/u4bhidctl/usbhid.c @@ -1,5 +1,5 @@ /* $NetBSD: usbhid.c,v 1.14 2000/07/03 02:51:37 matt Exp $ */ -/* $FreeBSD$ */ +/* $FreeBSD: head/usr.bin/usbhidctl/usbhid.c 235519 2012-05-16 20:30:20Z mav $ */ /* * Copyright (c) 1998 The NetBSD Foundation, Inc. @@ -182,11 +182,11 @@ usage(void) fprintf(stderr, "usage: %s -f device " - "[-l] [-n] [-r] [-t tablefile] [-v] [-x] name ...\n", + "[-l] [-n] [-r] [-t tablefile] [-v] [-x] [-z] name ...\n", getprogname()); fprintf(stderr, " %s -f device " - "[-l] [-n] [-r] [-t tablefile] [-v] [-x] -a\n", + "[-l] [-n] [-r] [-t tablefile] [-v] [-x] [-z] -a\n", getprogname()); fprintf(stderr, " %s -f device " @@ -304,7 +304,7 @@ dumpdata(int f, report_desc_t rd, int loop) u_char *dbuf; enum hid_kind kind; - kind = 0; + kind = zflag ? 3 : 0; rid = -1; use_rid = !!hid_get_report_id(f); do { @@ -443,7 +443,7 @@ int main(int argc, char **argv) { report_desc_t r; - char *table = NULL; + char *table = 0; char devnam[100], *dev = NULL; int f; int all = 0; diff --git a/usr.bin/u4bhidctl/usbhidctl.1 b/usr.bin/u4bhidctl/usbhidctl.1 index 5681189078..25a212474c 100644 --- a/usr.bin/u4bhidctl/usbhidctl.1 +++ b/usr.bin/u4bhidctl/usbhidctl.1 @@ -1,5 +1,5 @@ .\" $NetBSD: usbhidctl.1,v 1.8 1999/05/11 21:03:58 augustss Exp $ -.\" $FreeBSD$ +.\" $FreeBSD: head/usr.bin/usbhidctl/usbhidctl.1 250582 2013-05-12 22:22:12Z joel $ .\" .\" Copyright (c) 1998 The NetBSD Foundation, Inc. .\" All rights reserved. @@ -28,7 +28,7 @@ .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE .\" POSSIBILITY OF SUCH DAMAGE. .\" -.Dd August 01, 2011 +.Dd August 1, 2011 .Dt USBHIDCTL 1 .Os .Sh NAME @@ -47,6 +47,7 @@ .Op Fl l .Op Fl v .Op Fl x +.Op Fl z .Fl a .Nm .Fl f Ar device @@ -55,6 +56,7 @@ .Op Fl n .Op Fl v .Op Fl x +.Op Fl z .Ar item ... .Nm .Fl f Ar device @@ -99,9 +101,8 @@ Only 'output' and 'feature' kinds can be set with this option. .It Fl x Dump data in hexadecimal as well as decimal. .It Fl z -Reset reports to zero before processing -.Fl w -arguments. If not specified, current values will be requested from device. +Reset reports to zero before processing other arguments. +If not specified, current values will be requested from device. .El .Sh SYNTAX .Nm @@ -135,8 +136,10 @@ supports isolating each item by appending a .Sq Cm \&# . character and a decimal item instance number, starting at zero. .Sh FILES -.Pa /usr/share/misc/usb_hid_usages +.Bl -tag -width 30n +.It Pa /usr/share/misc/usb_hid_usages The default HID usage table. +.El .Sh SEE ALSO .Xr usbhid 3 , .Xr uhid 4 ,