You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
std::ffi::CStr was moved to core::ffi::CStr in rust 1.64, making it available to the kernel. We have our own version of CStr in kernel::str, since the standard library one wasn't available. Rust 1.77 also added C-string literals c"abc" that automatically terminate strings with \0. The kernel has a c_str! macro for this purpose. We should use the types from the standard library and remove our own versions. The things to do would be
change uses of kernel::str::CStr to core::ffi::CStr and also change c_str!("...") into c"..."
Please take this issue only if you are new to the kernel development process and you would like to use it as a test to submit your first patch to the kernel. Please do not take it if you do not plan to make other contributions to the kernel.
The text was updated successfully, but these errors were encountered:
We try to give good-first-issues to people who do not yet have commits in the kernel. It helps folks getting familiar with the kernel development process. We also try to pick easy/trivial fixes as good-first-issues. AFAIK you already submitted a good-first-issue, so it would be best to leave this up to someone else :)
std::ffi::CStr
was moved tocore::ffi::CStr
in rust 1.64, making it available to the kernel. We have our own version ofCStr
inkernel::str
, since the standard library one wasn't available. Rust 1.77 also added C-string literalsc"abc"
that automatically terminate strings with\0
. The kernel has ac_str!
macro for this purpose. We should use the types from the standard library and remove our own versions. The things to do would bekernel::str::CStr
tocore::ffi::CStr
and also changec_str!("...")
intoc"..."
kernel::str::CStr
and the macroThis requires submitting a proper patch to the LKML and the Rust for Linux mailing list. Please recall to test your changes, to use a proper title for the commit, to sign your commit under the Developer's Certificate of Origin and so on. Please see https://docs.kernel.org/process/submitting-patches.html and https://rust-for-linux.com/contributing for details.
Please take this issue only if you are new to the kernel development process and you would like to use it as a test to submit your first patch to the kernel. Please do not take it if you do not plan to make other contributions to the kernel.
The text was updated successfully, but these errors were encountered: