On Sat, 28 Oct 2023 at 13:17, Alice Ryhl <alice@xxxxxxx> wrote: > > On 10/18/23 14:25, Wedson Almeida Filho wrote:> +kernel::module_fs! { > > + type: RoFs, > > + name: "rust_rofs", > > + author: "Rust for Linux Contributors", > > + description: "Rust read-only file system sample", > > + license: "GPL", > > +} > > + > > +struct RoFs; > > +impl fs::FileSystem for RoFs { > > + const NAME: &'static CStr = c_str!("rust-fs"); > > +} > > Why use two different names here? I actually wanted the same name, but the string in the module macros don't accept dashes (they need to be identifiers). I discussed this with Miguel a couple of years ago but we decided to wait and see before doing anything. Since then I noticed that Rust automatically converts dashes to underscores in crate names so that they can be used as identifiers in the language. So I guess there's a precedent if we decide to do something similar. For now I'll change rust-fs to rust_rofs as the fs name.