File tree 3 files changed +7
-2
lines changed
drivers/char/rust_example
3 files changed +7
-2
lines changed Original file line number Diff line number Diff line change 6
6
name = " rust_example"
7
7
version = " 0.1.0"
8
8
edition = " 2018"
9
+ publish = false
9
10
10
11
[lib ]
11
12
crate-type = [" staticlib" ]
Original file line number Diff line number Diff line change @@ -5,6 +5,7 @@ name = "kernel"
5
5
version = " 0.1.0"
6
6
authors = [" Rust for Linux Contributors" ]
7
7
edition = " 2018"
8
+ publish = false
8
9
9
10
[dependencies ]
10
11
bitflags = " 1"
Original file line number Diff line number Diff line change @@ -53,13 +53,16 @@ macro_rules! kernel_module {
53
53
54
54
// Built-in modules are initialized through an initcall pointer
55
55
//
56
- // TODO: find a proper way to emulate the C macro, including
57
- // dealing with `HAVE_ARCH_PREL32_RELOCATIONS`
56
+ // TODO: find a proper way to emulate the C macro (`module_init`),
57
+ // including dealing with `HAVE_ARCH_PREL32_RELOCATIONS`
58
58
#[ cfg( not( module) ) ]
59
59
#[ link_section = ".initcall6.init" ]
60
60
#[ used]
61
61
pub static __initcall: extern "C" fn ( ) -> $crate:: c_types:: c_int = init_module;
62
62
63
+ // TODO: pass the kernel module name here to generate a unique,
64
+ // helpful symbol name (the name would also useful for the `modinfo`
65
+ // issue below).
63
66
#[ no_mangle]
64
67
pub extern "C" fn init_module( ) -> $crate:: c_types:: c_int {
65
68
match <$module as $crate:: KernelModule >:: init( ) {
You can’t perform that action at this time.
0 commit comments