Linux kernel mirror (for testing)
git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel
os
linux
1// SPDX-License-Identifier: GPL-2.0
2
3//! UAPI Bindings.
4//!
5//! Contains the bindings generated by `bindgen` for UAPI interfaces.
6//!
7//! This crate may be used directly by drivers that need to interact with
8//! userspace APIs.
9
10#![no_std]
11#![allow(
12 clippy::all,
13 clippy::cast_lossless,
14 clippy::ptr_as_ptr,
15 clippy::ref_as_ptr,
16 clippy::undocumented_unsafe_blocks,
17 dead_code,
18 missing_docs,
19 non_camel_case_types,
20 non_upper_case_globals,
21 non_snake_case,
22 improper_ctypes,
23 unreachable_pub,
24 unsafe_op_in_unsafe_fn
25)]
26#![cfg_attr(CONFIG_RUSTC_HAS_UNNECESSARY_TRANSMUTES, allow(unnecessary_transmutes))]
27#![feature(cfi_encoding)]
28
29// Manual definition of blocklisted types.
30type __kernel_size_t = usize;
31type __kernel_ssize_t = isize;
32type __kernel_ptrdiff_t = isize;
33
34use pin_init::MaybeZeroable;
35
36include!(concat!(env!("OBJTREE"), "/rust/uapi/uapi_generated.rs"));