]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
stand: Make ioctl declaration consistent
authorWarner Losh <imp@FreeBSD.org>
Tue, 13 Dec 2022 04:46:05 +0000 (21:46 -0700)
committerWarner Losh <imp@FreeBSD.org>
Tue, 24 Jan 2023 21:49:44 +0000 (14:49 -0700)
commit887eddca598afeb678d06cb997961c248da47c6e
treecbdbcbdf62edc32d7f7a2aa63b3f3bfe7345e9ca
parente68bfa6252a501cf962760b313cbc3baefb6d407
stand: Make ioctl declaration consistent

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
Reviewed by: emaste
Differential Revision: https://reviews.freebsd.org/D37680

(cherry picked from commit 2e1e68cbaee3e74a89e9b63fdb180974a2bf4292)
stand/libsa/ioctl.c
stand/libsa/stand.h
sys/sys/ioccom.h