Closed luisgerhorst closed 5 years ago
I went ahead and did #201 to make cstr!()
usable in const
contexts, that should solve the problems and get this PR ready for us to land!
Ok, should be possible to use cstr!()
from a const context now.
Thank's! I changed the code to use the new cstr!
and rebased everything onto the current master. Should I squash everything into the first commit?
No squash required, we can do that when we merge on github. Will review after I finish eating my 🌮s!
Thanks for contributing these! We hope you'll stick around and keep contributing!
Do so by checking whether loading the module makes the name of the filesystem (
testfs
) appear in/proc/filesystems
.Fixes https://github.com/fishinabarrel/linux-kernel-module-rust/issues/93.
If someone can make a suggestion on how to remove the two
unsafe
blocks I would be happy to implement it. I tried to find a way to remove theunsafe
block for theCStr
but I don't think it's possible. I'm very new to Rust thought, so prove me wrong. There exists aconst_cstr
crate that offers aconst_cstr!
macro, maybe do something similar?