get descriptor size
This commit is contained in:
parent
6ff312f95f
commit
4b07473fe9
1 changed files with 6 additions and 0 deletions
|
|
@ -43,6 +43,12 @@ static int dev_hidraw_new_from_fd(int fd, dev_hidraw_t **const out_dev) {
|
|||
}
|
||||
|
||||
res = ioctl((*out_dev)->fd, HIDIOCGRDESC, &(*out_dev)->rdesc);
|
||||
if (res < 0) {
|
||||
perror("Error getting Report Descriptor");
|
||||
goto dev_hidraw_new_from_fd_err;
|
||||
}
|
||||
|
||||
res = ioctl((*out_dev)->fd, HIDIOCGRDESCSIZE, &(*out_dev)->rdesc.size);
|
||||
if (res < 0) {
|
||||
perror("Error getting Report Descriptor");
|
||||
goto dev_hidraw_new_from_fd_err;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue