2 unstable releases
0.2.0 | Oct 16, 2022 |
---|---|
0.1.1 | Jul 12, 2022 |
#696 in Unix APIs
189 downloads per month
9KB
178 lines
liblmod - Library for loading Linux kernel modules
Features:
- modprobe
- rmmod
Example code:
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)
}
License
Crate is licensed to MIT/X11 license.
lib.rs
:
liblmod - Library for loading Linux kernel modules
Features:
- Loading modules (modprobe)
- Unloading modules (rmmod)
Example code:
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)
}