diff options
author | Martin Pieuchot <mpi@cvs.openbsd.org> | 2014-06-04 12:13:31 +0000 |
---|---|---|
committer | Martin Pieuchot <mpi@cvs.openbsd.org> | 2014-06-04 12:13:31 +0000 |
commit | 81ae60936dfb6960c4df338520368bb495a3d863 (patch) | |
tree | d6f6d386b1206ced234a75b7caeff5e569f453cb /lib/libusbhid | |
parent | bea43fe30c4a4a0cd8183b64372892a47619d311 (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.c | 6 |
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 */ |