Skip to content
Commit ea76e08f authored by Asahi Lina's avatar Asahi Lina Committed by Miguel Ojeda
Browse files

rust: ioctl: Add ioctl number manipulation functions



Add simple 1:1 wrappers of the C ioctl number manipulation functions.
Since these are macros we cannot bindgen them directly, and since they
should be usable in const context we cannot use helper wrappers, so
we'll have to reimplement them in Rust. Thankfully, the C headers do
declare defines for the relevant bitfield positions, so we don't need
to duplicate that.

Signed-off-by: default avatarAsahi Lina <lina@asahilina.net>
Link: https://lore.kernel.org/r/20230329-rust-uapi-v2-2-bca5fb4d4a12@asahilina.net


[ Moved the `#![allow(non_snake_case)]` to the usual place. ]
Signed-off-by: default avatarMiguel Ojeda <ojeda@kernel.org>
parent 4e174665
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment