File Index
Files and directories
Sign in
FILE

lib.rs

File preview with syntax highlighting.

linux-6.19.14/rust/uapi/lib.rs RUST
 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// See <https://github.com/rust-lang/rust-bindgen/issues/1651>.
12#![cfg_attr(test, allow(deref_nullptr))]
13#![cfg_attr(test, allow(unaligned_references))]
14#![cfg_attr(test, allow(unsafe_op_in_unsafe_fn))]
15#![allow(
16    clippy::all,
17    clippy::cast_lossless,
18    clippy::ptr_as_ptr,
19    clippy::ref_as_ptr,
20    clippy::undocumented_unsafe_blocks,
21    dead_code,
22    missing_docs,
23    non_camel_case_types,
24    non_upper_case_globals,
25    non_snake_case,
26    improper_ctypes,
27    unreachable_pub,
28    unsafe_op_in_unsafe_fn
29)]
30#![cfg_attr(CONFIG_RUSTC_HAS_UNNECESSARY_TRANSMUTES, allow(unnecessary_transmutes))]
31
32// Manual definition of blocklisted types.
33type __kernel_size_t = usize;
34type __kernel_ssize_t = isize;
35type __kernel_ptrdiff_t = isize;
36
37use pin_init::MaybeZeroable;
38
39include!(concat!(env!("OBJTREE"), "/rust/uapi/uapi_generated.rs"));
~/ Read-only file preview.