Page MenuHomeFreeBSD

stand: Make ioctl declaration consistent
ClosedPublic

Authored by imp on Dec 12 2022, 8:19 PM.
Tags
None
Referenced Files
Unknown Object (File)
Apr 26 2024, 9:59 PM
Unknown Object (File)
Apr 26 2024, 8:07 PM
Unknown Object (File)
Apr 26 2024, 8:06 PM
Unknown Object (File)
Apr 26 2024, 6:25 PM
Unknown Object (File)
Mar 11 2024, 7:47 AM
Unknown Object (File)
Mar 8 2024, 1:29 AM
Unknown Object (File)
Mar 8 2024, 1:29 AM
Unknown Object (File)
Mar 7 2024, 10:38 PM
Subscribers

Details

Summary

It typically had two args with an optional third from the userland
declaration in sys/ioccom.h. However, the funciton definition used a
non-optional char * argument. This mismatch is UB behavior (but worked
due to the calling convetions of all our machines).

Instead, add a declaration for ioctl to stand.h, make the third arg
'void *' which is a better match to the ... declaration before. This
prevents the convert int * -> char * errors as well. Make the ioctl
user-space declaration truly user-space specific (omit it in the
stand-alone build).

No functional change intended.

Sponsored by: Netflix

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable