-
Notifications
You must be signed in to change notification settings - Fork 161
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Properly support ioctl
that takes the last argument as an integer not a pointer
#1051
Comments
During my design of this trait the intention was to involve an int-to-pointer cast here. Those are relatively rare in the ecosystem, so it should be somewhat awkward to use as a way of making sure that's what you really want. Although, if it's common I think it would be good to add something similar to |
The issue is not whether it's rare, but that for these |
Fixing low-hanging-fruit issue bytecodealliance#1051. Signed-off-by: John Nunley <[email protected]>
Fixing low-hanging-fruit issue bytecodealliance#1051. Signed-off-by: John Nunley <[email protected]>
Fixing low-hanging-fruit issue bytecodealliance#1051. Signed-off-by: John Nunley <[email protected]>
Fixing low-hanging-fruit issue bytecodealliance#1051. Signed-off-by: John Nunley <[email protected]>
Fixing low-hanging-fruit issue bytecodealliance#1051. Signed-off-by: John Nunley <[email protected]>
Fixing low-hanging-fruit issue bytecodealliance#1051. Signed-off-by: John Nunley <[email protected]>
Fixing low-hanging-fruit issue #1051. Signed-off-by: John Nunley <[email protected]>
Fixing low-hanging-fruit issue #1051. Signed-off-by: John Nunley <[email protected]>
Fixing low-hanging-fruit issue #1051. Signed-off-by: John Nunley <[email protected]>
Fixing low-hanging-fruit issue #1051. Signed-off-by: John Nunley <[email protected]>
The ioctl
TUNSETOFFLOAD
takes anunsigned int
as input rather thanunsigned int*
, so currently none of the standardIoctl
type work and must be worked-around via an awkward int-to-pointer cast.Proof of concept
As of Linux v6.8 at least the following ioctls take the integer input directly rather than through a pointer:
BTRFS_BALANCE_CTL_{PAUSE,CANCEL}
)ARPHRD_*
)On
nix
these are supported viaioctl_write_int
, in contrast toioctl_write_ptr
that corresponds torustix::ioctl::Setter
.The text was updated successfully, but these errors were encountered: