Crates.io | liblmod |
lib.rs | liblmod |
version | 0.2.0 |
source | src |
created_at | 2022-07-12 09:52:24.392068 |
updated_at | 2022-10-16 14:49:30.540198 |
description | Library for loading Linux kernel modules |
homepage | https://github.com/zapomnij/liblmod |
repository | https://github.com/zapomnij/liblmod |
max_upload_size | |
id | 624303 |
size | 9,875 |
extern crate liblmod;
fn main() -> std::io::Result<()> {
println!("Unloading module kvm");
liblmod::rmmod("kvm".to_string(), liblmod::Flags::Force)?;
println!("Loading module kvm");
liblmod::modprobe("kvm".to_string(), "".to_string(), liblmod::Selection::Current)
}
Crate is licensed to MIT/X11 license.