summaryrefslogtreecommitdiff
path: root/rust/kernel/lib.rs
diff options
context:
space:
mode:
authorAsahi Lina <lina@asahilina.net>2023-04-03 18:33:53 +0900
committerMiguel Ojeda <ojeda@kernel.org>2023-04-22 01:46:45 +0200
commitea76e08f4d901a450619831a255e9e0a4c0ed162 (patch)
treeda9bf4ca1eab8f9e0c9ac659dd7af3d50f88509e /rust/kernel/lib.rs
parent4e1746656839ab1e88d76eec4d2fa0b41d585604 (diff)
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: Asahi 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: Miguel Ojeda <ojeda@kernel.org>
Diffstat (limited to 'rust/kernel/lib.rs')
-rw-r--r--rust/kernel/lib.rs1
1 files changed, 1 insertions, 0 deletions
diff --git a/rust/kernel/lib.rs b/rust/kernel/lib.rs
index dd3b0d69fdd1..676995d4e460 100644
--- a/rust/kernel/lib.rs
+++ b/rust/kernel/lib.rs
@@ -37,6 +37,7 @@ mod allocator;
mod build_assert;
pub mod error;
pub mod init;
+pub mod ioctl;
pub mod prelude;
pub mod print;
mod static_assert;