summaryrefslogtreecommitdiff
path: root/lib/libusbhid
diff options
context:
space:
mode:
authorMartin Pieuchot <mpi@cvs.openbsd.org>2014-06-04 12:13:31 +0000
committerMartin Pieuchot <mpi@cvs.openbsd.org>2014-06-04 12:13:31 +0000
commit81ae60936dfb6960c4df338520368bb495a3d863 (patch)
treed6f6d386b1206ced234a75b7caeff5e569f453cb /lib/libusbhid
parentbea43fe30c4a4a0cd8183b64372892a47619d311 (diff)
Do not skip or add a byte for the report ID when manipulating data.
This is not compatible to our current schema where one kernel device is attached per report ID of every USB HID device since the drivers already strip the data buffers. Fix a parsing issue reported by henning@
Diffstat (limited to 'lib/libusbhid')
-rw-r--r--lib/libusbhid/data.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/libusbhid/data.c b/lib/libusbhid/data.c
index 38f5ea6fb50..f1b78bddf7f 100644
--- a/lib/libusbhid/data.c
+++ b/lib/libusbhid/data.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: data.c,v 1.7 2014/05/12 17:03:28 mpi Exp $ */
+/* $OpenBSD: data.c,v 1.8 2014/06/04 12:13:30 mpi Exp $ */
/* $NetBSD: data.c,v 1.1 2001/12/28 17:45:26 augustss Exp $ */
/*
@@ -41,9 +41,11 @@ hid_get_data(const void *p, const hid_item_t *h)
buf = p;
+#if 0
/* Skip report ID byte. */
if (h->report_ID > 0)
buf++;
+#endif
hpos = h->pos; /* bit position of data */
hsize = h->report_size; /* bit length of data */
@@ -86,9 +88,11 @@ hid_set_data(void *p, const hid_item_t *h, int32_t data)
buf = p;
+#if 0
/* Set report ID byte. */
if (h->report_ID > 0)
*buf++ = h->report_ID & 0xff;
+#endif
hpos = h->pos; /* bit position of data */
hsize = h->report_size; /* bit length of data */