Fix problem in BUSBInterface::OtherDescriptorAt(). It will now correctly return available
non-standard descriptors. This makes listusb useful again with usb audio & video devices... git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29275 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
c586ab3746
commit
3a367aec99
@ -127,7 +127,7 @@ status_t
|
||||
BUSBInterface::OtherDescriptorAt(uint32 index, usb_descriptor *descriptor,
|
||||
size_t length) const
|
||||
{
|
||||
if (length > 0 && descriptor == NULL)
|
||||
if (length <= 0 && descriptor == NULL)
|
||||
return B_BAD_VALUE;
|
||||
|
||||
usb_raw_command command;
|
||||
@ -137,7 +137,7 @@ BUSBInterface::OtherDescriptorAt(uint32 index, usb_descriptor *descriptor,
|
||||
command.generic_etc.alternate_index = fAlternate;
|
||||
command.generic_etc.generic_index = index;
|
||||
command.generic_etc.length = length;
|
||||
if (ioctl(fRawFD, B_USB_RAW_COMMAND_GET_GENERIC_DESCRIPTOR, &command,
|
||||
if (ioctl(fRawFD, B_USB_RAW_COMMAND_GET_GENERIC_DESCRIPTOR_ETC, &command,
|
||||
sizeof(command)) || command.generic.status != B_USB_RAW_STATUS_SUCCESS)
|
||||
return B_ERROR;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user