Closed mbway closed 11 months ago
This repository will no longer get any updates as the code here is now part of tuxedo-drivers https://gitlab.com/tuxedocomputers/development/packages/tuxedo-drivers.
Please open a merge request or issue in the new project on GitLab if you contribution or bug report still applies.
I'm not that experienced with writing Linux drivers so this could be completely wrong, but I think that the ioctl definitions in
tuxedo_io_ioctl.h
have incorrect arguments (which results in the ioctl numbers being different from what is expected).source
So I think that if you want to return an integer from an
ioctl
then the third argument should beint32_t
notint32_t*
and if you want to return a string it should bechar[SIZE]
notchar*
because the latter does not allow for bounds-checking.I found an examples of arrays and returning integers in the FAT filesystem driver
and the SPI driver
If
tuxedo-control-center
is the only consumer of the driver then this isn't a major problem because both parties understand what is required but if I'm correct about these arguments then fixing them may be required to upstream the driver.perhaps the best way to fix the ioctl numbers is to change the definitions in
tuxedo_io_ioctl.h
but have the driver also respond toR_MOD_VERSION
as it is currently defined because conforming users of the driver should be checking that the module is the version that they expect.