Function nix::kmod::finit_module
source · pub fn finit_module<Fd: AsFd>(
fd: Fd,
param_values: &CStr,
flags: ModuleInitFlags,
) -> Result<()>
Expand description
Loads a kernel module from a given file descriptor.
§Example
use std::fs::File;
use std::ffi::CString;
use nix::kmod::{finit_module, ModuleInitFlags};
let f = File::open("mymod.ko").unwrap();
finit_module(&f, &CString::new("").unwrap(), ModuleInitFlags::empty()).unwrap();
See man init_module(2)
for more information.