=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/usbhidctl/usbhid.c,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- src/usr.bin/usbhidctl/usbhid.c 2001/12/30 07:10:42 1.2 +++ src/usr.bin/usbhidctl/usbhid.c 2002/05/02 20:12:07 1.3 @@ -1,4 +1,4 @@ -/* $OpenBSD: usbhid.c,v 1.2 2001/12/30 07:10:42 pvalchev Exp $ */ +/* $OpenBSD: usbhid.c,v 1.3 2002/05/02 20:12:07 nate Exp $ */ /* $NetBSD: usbhid.c,v 1.17 2001/03/28 03:17:42 simonb Exp $ */ /* @@ -274,7 +274,7 @@ * report in the variable-sized data field. */ report->buffer = malloc(sizeof(*report->buffer) - - sizeof(report->buffer->data) + + sizeof(report->buffer->ucr_data) + report->size); if (report->buffer == NULL) err(1, NULL); @@ -300,7 +300,7 @@ if (report->size == 0) return; - report->buffer->report = reptoparam[repindex].uhid_report; + report->buffer->ucr_report = reptoparam[repindex].uhid_report; if (ioctl(hidfd, USB_GET_REPORT, report->buffer) < 0) err(1, "USB_GET_REPORT"); } @@ -310,7 +310,7 @@ setreport(struct Sreport *report, int hidfd, int repindex) { if (report->status == srs_dirty) { - report->buffer->report = reptoparam[repindex].uhid_report; + report->buffer->ucr_report = reptoparam[repindex].uhid_report; if (ioctl(hidfd, USB_SET_REPORT, report->buffer) < 0) err(1, "USB_SET_REPORT(%s)", @@ -440,7 +440,7 @@ errx(1, "Input report descriptor invalid length"); dlen = inreport.size; - dbuf = inreport.buffer->data; + dbuf = inreport.buffer->ucr_data; for (;;) { ssize_t readlen; @@ -482,7 +482,7 @@ if (matchvar != NULL) matchvar->opfunc(&hitem, matchvar, colls, collind, - inreport.buffer->data); + inreport.buffer->ucr_data); } hid_end_parse(hdata); printf("\n"); @@ -560,7 +560,7 @@ getreport(repptr, hidfd, rd, repindex); bufdata = (repptr == NULL || repptr->buffer == NULL) ? - NULL : repptr->buffer->data; + NULL : repptr->buffer->ucr_data; if (matchvar->opfunc(&hitem, matchvar, colls, collind, bufdata))