mirror of
https://github.com/KernelSU-Next/loopdev.git
synced 2026-11-16 22:51:34 +00:00
A rust library to setup and control loopback devices
- Rust 100%
Newer versions of libc use the attribute which is unstable in version 1.8.0 and 1.8.0 is very old now I would rather support newer versions of the included libraries |
History
|
|
|---|---|---|
| losetup | ||
| src | ||
| .gitignore | ||
| .travis.yml | ||
| Cargo.toml | ||
| LICENSE | ||
| README.md | ||
loopdev
Setup and control loop devices.
Provides rust interface with similar functionalty to the linux utility losetup.
Documentation
Examples
use loopdev::LoopControl;
let lc = LoopControl::open().unwrap();
let ld = lc.next_free().unwrap();
println!("{}", ld.get_path().unwrap().display());
ld.attach("test.img", 0).unwrap();
// ...
ld.detach().unwrap();