Page MenuHomeFreeBSD

stand: Make ioctl declaration consistent
ClosedPublic

Authored by imp on Dec 12 2022, 8:19 PM.
Tags
None
Referenced Files
F172713538: D37680.id114078.diff
Sun, Sep 20, 11:44 AM
Unknown Object (File)
Tue, Sep 15, 9:28 PM
Unknown Object (File)
Tue, Sep 15, 8:45 PM
Unknown Object (File)
Mon, Sep 14, 7:53 PM
Unknown Object (File)
Sun, Sep 13, 1:43 AM
Unknown Object (File)
Fri, Sep 11, 4:53 AM
Unknown Object (File)
Wed, Sep 9, 9:26 PM
Unknown Object (File)
Sun, Sep 6, 6:18 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 Skipped
Unit
Tests Skipped
Build Status
Buildable 48700
Build 45586: arc lint + arc unit