linux - Pass param to USB ioctl -
i have problem read/write data usb mass storage device, 'device or resource busy' error below command:
ioctl(usbfd, usbdevfs_claiminterface, &interface_num)
so need release interface before. don't know how can pass interface_num correctly command:
ioctl(usbfd, usbdevfs_releaseinterface, &interface_num),
if it's not defined, there function found interface number. please me! thanks.
the documentation states:
usbdevfs_releaseinterface
this used release claim usbfs made on interface, either implicitly or because of
usbdevfs_claiminterface
call, before file descriptor closed. ioctl parameter integer holding number of interface (binterfacenumber
descriptor); file modification time not updated request.
but seems here "parameter integer" still means pointer integer should passed, you're showing. if have descriptor, can find interface number.
Comments
Post a Comment