]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
rust: kernel: use `core::ffi::CStr` method names
authorTamir Duberstein <tamird@gmail.com>
Fri, 4 Jul 2025 20:14:57 +0000 (16:14 -0400)
committerMiguel Ojeda <ojeda@kernel.org>
Sun, 20 Jul 2025 23:16:36 +0000 (01:16 +0200)
commit1523590203786bf4e1d29b7d08a7100c783f20ba
treef0d9f632f785b5a05456acf9207e53031eaa85f3
parent10a7108d4bd411166a7b4484bda8894dc3f0f04b
rust: kernel: use `core::ffi::CStr` method names

Prepare for `core::ffi::CStr` taking the place of `kernel::str::CStr` by
avoiding methods that only exist on the latter.

Also avoid `Deref<Target=BStr> for CStr` as that impl doesn't exist on
`core::ffi::CStr`.

Link: https://github.com/Rust-for-Linux/linux/issues/1075
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-6-a91524037783@gmail.com
[ Reworded title. - Miguel ]
Signed-off-by: Miguel Ojeda <ojeda@kernel.org>
rust/kernel/error.rs
rust/kernel/str.rs