From a7fea44fe38b61a65ebc2d840c4c6c9e1bd8431d Mon Sep 17 00:00:00 2001 From: Pascal Bach Date: Fri, 20 Jul 2018 21:59:16 +0200 Subject: Add wrapper for linux kernel module loading - init_module and finit_module to load kernel modules - delete_module to unload kernel modules Signed-off-by: Pascal Bach --- src/lib.rs | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'src/lib.rs') diff --git a/src/lib.rs b/src/lib.rs index ed96a8e1..48426594 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -43,7 +43,11 @@ pub mod fcntl; target_os = "netbsd", target_os = "openbsd"))] pub mod ifaddrs; -#[cfg(any(target_os = "linux", target_os = "android"))] +#[cfg(any(target_os = "android", + target_os = "linux"))] +pub mod kmod; +#[cfg(any(target_os = "android", + target_os = "linux"))] pub mod mount; #[cfg(any(target_os = "dragonfly", target_os = "freebsd", @@ -57,7 +61,8 @@ pub mod net; pub mod poll; #[deny(missing_docs)] pub mod pty; -#[cfg(any(target_os = "linux", target_os = "android"))] +#[cfg(any(target_os = "android", + target_os = "linux"))] pub mod sched; pub mod sys; // This can be implemented for other platforms as soon as libc -- cgit v1.2.3