usbhidctl appears to not report features and write size correctly

This turns out to be due to an argument botch for hid_report_size.
The PR contained patches to fix the argument botch.

Submitted by: Maurice Castro
PR: usb/118915
This commit is contained in:
Warner Losh 2007-12-21 03:40:36 +00:00
parent 9742373a92
commit f7d681bc5d
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=174826

View File

@ -155,13 +155,13 @@ dumpitems(report_desc_t r)
}
}
hid_end_parse(d);
size = hid_report_size(r, 0, hid_input);
size = hid_report_size(r, hid_input, 0);
printf("Total input size %d bytes\n", size);
size = hid_report_size(r, 0, hid_output);
size = hid_report_size(r, hid_output, 0);
printf("Total output size %d bytes\n", size);
size = hid_report_size(r, 0, hid_feature);
size = hid_report_size(r, hid_feature, 0);
printf("Total feature size %d bytes\n", size);
}
@ -228,7 +228,7 @@ dumpdata(int f, report_desc_t rd, int loop)
}
hid_end_parse(d);
rev(&hids);
dlen = hid_report_size(rd, 0, hid_input);
dlen = hid_report_size(rd, hid_input, 0);
dbuf = malloc(dlen);
if (!loop)
if (ioctl(f, USB_SET_IMMED, &one) < 0) {