This repository was archived by the owner on Mar 7, 2021. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +3
-4
lines changed Expand file tree Collapse file tree 2 files changed +3
-4
lines changed Original file line number Diff line number Diff line change @@ -9,7 +9,7 @@ mod allocator;
9
9
pub mod bindings;
10
10
mod c_types;
11
11
pub mod chrdev;
12
- pub mod error;
12
+ mod error;
13
13
pub mod filesystem;
14
14
pub mod printk;
15
15
pub mod sysctl;
Original file line number Diff line number Diff line change @@ -8,7 +8,6 @@ use core::sync::atomic::{AtomicBool, Ordering};
8
8
use serde:: Serialize ;
9
9
use serde_json_core;
10
10
11
- use linux_kernel_module:: error;
12
11
use linux_kernel_module:: sysctl:: Sysctl ;
13
12
use linux_kernel_module:: Mode ;
14
13
@@ -37,8 +36,8 @@ impl linux_kernel_module::chrdev::FileOperations for JsonChrdev {
37
36
c : C . load ( Ordering :: Relaxed ) ,
38
37
} ;
39
38
let mut s =
40
- serde_json_core:: to_vec :: < typenum:: U32 , _ > ( & o) . map_err ( |_| error :: Error :: ENOMEM ) ?;
41
- s. push ( b'\n' ) . map_err ( |_| error :: Error :: ENOMEM ) ?;
39
+ serde_json_core:: to_vec :: < typenum:: U32 , _ > ( & o) . map_err ( |_| linux_kernel_module :: Error :: ENOMEM ) ?;
40
+ s. push ( b'\n' ) . map_err ( |_| linux_kernel_module :: Error :: ENOMEM ) ?;
42
41
let start = min ( offset. try_into ( ) ?, s. len ( ) ) ;
43
42
let end = min ( start + buf. len ( ) , s. len ( ) ) ;
44
43
buf. write ( & s[ start..end] ) ?;
You can’t perform that action at this time.
0 commit comments