This repository was archived by the owner on Mar 7, 2021. It is now read-only.
File tree 5 files changed +8
-14
lines changed
5 files changed +8
-14
lines changed Original file line number Diff line number Diff line change @@ -5,8 +5,7 @@ extern crate alloc;
5
5
use alloc:: borrow:: ToOwned ;
6
6
use alloc:: string:: String ;
7
7
8
- #[ macro_use]
9
- extern crate linux_kernel_module;
8
+ use linux_kernel_module;
10
9
11
10
struct HelloWorldModule {
12
11
message : String ,
@@ -28,7 +27,7 @@ impl Drop for HelloWorldModule {
28
27
}
29
28
}
30
29
31
- kernel_module ! (
30
+ linux_kernel_module :: kernel_module!(
32
31
HelloWorldModule ,
33
32
author: "Alex Gaynor and Geoffrey Thomas" ,
34
33
description: "An extremely simple kernel module" ,
Original file line number Diff line number Diff line change 3
3
4
4
#[ macro_use]
5
5
extern crate alloc;
6
- #[ macro_use]
7
6
extern crate bitflags;
8
7
9
8
use core:: panic:: PanicInfo ;
@@ -14,7 +13,6 @@ mod c_types;
14
13
pub mod chrdev;
15
14
mod error;
16
15
pub mod filesystem;
17
- #[ macro_use]
18
16
pub mod printk;
19
17
pub mod sysctl;
20
18
mod types;
Original file line number Diff line number Diff line change 1
1
#![ no_std]
2
2
#![ feature( const_str_as_bytes) ]
3
3
4
- #[ macro_use]
5
- extern crate linux_kernel_module;
4
+ use linux_kernel_module;
6
5
7
6
struct ChrdevTestModule {
8
7
_dev : linux_kernel_module:: chrdev:: DeviceNumberRegion ,
@@ -19,7 +18,7 @@ impl linux_kernel_module::KernelModule for ChrdevTestModule {
19
18
}
20
19
}
21
20
22
- kernel_module ! (
21
+ linux_kernel_module :: kernel_module!(
23
22
ChrdevTestModule ,
24
23
author: "Alex Gaynor and Geoffrey Thomas" ,
25
24
description: "A module for testing character devices" ,
Original file line number Diff line number Diff line change 1
1
#![ no_std]
2
2
#![ feature( const_str_as_bytes) ]
3
3
4
- #[ macro_use]
5
- extern crate linux_kernel_module;
4
+ use linux_kernel_module;
6
5
7
6
struct PrintkTestModule ;
8
7
@@ -16,7 +15,7 @@ impl linux_kernel_module::KernelModule for PrintkTestModule {
16
15
}
17
16
}
18
17
19
- kernel_module ! (
18
+ linux_kernel_module :: kernel_module!(
20
19
PrintkTestModule ,
21
20
author: "Alex Gaynor and Geoffrey Thomas" ,
22
21
description: "A module for testing println!()" ,
Original file line number Diff line number Diff line change 3
3
4
4
use core:: sync:: atomic:: AtomicBool ;
5
5
6
- #[ macro_use]
7
- extern crate linux_kernel_module;
6
+ use linux_kernel_module;
8
7
9
8
use linux_kernel_module:: sysctl:: Sysctl ;
10
9
use linux_kernel_module:: Mode ;
@@ -33,7 +32,7 @@ impl linux_kernel_module::KernelModule for SysctlTestModule {
33
32
}
34
33
}
35
34
36
- kernel_module ! (
35
+ linux_kernel_module :: kernel_module!(
37
36
SysctlTestModule ,
38
37
author: "Alex Gaynor and Geoffrey Thomas" ,
39
38
description: "A module for testing sysctls" ,
You can’t perform that action at this time.
0 commit comments