summaryrefslogtreecommitdiffstats
path: root/usr.bin/usbhidctl/usbhid.c
diff options
context:
space:
mode:
authormav <mav@FreeBSD.org>2012-05-16 20:30:20 +0000
committermav <mav@FreeBSD.org>2012-05-16 20:30:20 +0000
commitb796f78b0a7d50009f0d55592c47c9f1ec312bc0 (patch)
tree0553b9c232f1104d26e7f6aae667e2adc8eb6253 /usr.bin/usbhidctl/usbhid.c
parent3135fa1ca0fbfec6b2f6dfc4fe0ebddf4b44c8b7 (diff)
downloadFreeBSD-src-b796f78b0a7d50009f0d55592c47c9f1ec312bc0.zip
FreeBSD-src-b796f78b0a7d50009f0d55592c47c9f1ec312bc0.tar.gz
Add support for -z option for reading operations. It allows to not request
current values from device, but only receive changes.
Diffstat (limited to 'usr.bin/usbhidctl/usbhid.c')
-rw-r--r--usr.bin/usbhidctl/usbhid.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/usr.bin/usbhidctl/usbhid.c b/usr.bin/usbhidctl/usbhid.c
index 2a28e3e..06a79c8 100644
--- a/usr.bin/usbhidctl/usbhid.c
+++ b/usr.bin/usbhidctl/usbhid.c
@@ -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 {
OpenPOWER on IntegriCloud