Also use the interface index when generating the report descriptor dump.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25814 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Michael Lotz 2008-06-05 23:29:26 +00:00
parent 9bdf88b686
commit 7d9e7cab36

View File

@ -113,8 +113,9 @@ HIDDevice::MakeHIDDevice(usb_device device,
const usb_device_descriptor *deviceDescriptor
= gUSBModule->get_device_descriptor(device);
char outputFile[128];
sprintf(outputFile, "/tmp/usb_hid_report_descriptor_%04x_%04x.bin",
deviceDescriptor->vendor_id, deviceDescriptor->product_id);
sprintf(outputFile, "/tmp/usb_hid_report_descriptor_%04x_%04x_%lu.bin",
deviceDescriptor->vendor_id, deviceDescriptor->product_id,
interfaceIndex);
int fd = open(outputFile, O_WRONLY | O_CREAT | O_TRUNC, 0644);
if (fd >= 0) {
write(fd, reportDescriptor, descriptorLength);