mirror of
https://github.com/torvalds/linux.git
synced 2025-08-15 14:11:42 +02:00
rust: kernel: add fmt
module
`kernel::fmt` is a facade over `core::fmt` that can be used downstream, allowing future changes to the formatting machinery to be contained within the kernel crate without downstream code needing to be modified. Signed-off-by: Tamir Duberstein <tamird@gmail.com> Reviewed-by: Benno Lossin <lossin@kernel.org> Reviewed-by: Alice Ryhl <aliceryhl@google.com> Link: https://lore.kernel.org/r/20250704-core-cstr-prepare-v1-2-a91524037783@gmail.com Signed-off-by: Miguel Ojeda <ojeda@kernel.org>
This commit is contained in:
parent
f411b7eddd
commit
bda947d613
2 changed files with 8 additions and 0 deletions
7
rust/kernel/fmt.rs
Normal file
7
rust/kernel/fmt.rs
Normal file
|
@ -0,0 +1,7 @@
|
|||
// SPDX-License-Identifier: GPL-2.0
|
||||
|
||||
//! Formatting utilities.
|
||||
//!
|
||||
//! This module is intended to be used in place of `core::fmt` in kernel code.
|
||||
|
||||
pub use core::fmt::{Arguments, Debug, Display, Error, Formatter, Result, Write};
|
|
@ -78,6 +78,7 @@ pub mod error;
|
|||
pub mod faux;
|
||||
#[cfg(CONFIG_RUST_FW_LOADER_ABSTRACTIONS)]
|
||||
pub mod firmware;
|
||||
pub mod fmt;
|
||||
pub mod fs;
|
||||
pub mod init;
|
||||
pub mod io;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue