2 unstable releases
| 0.2.0 | Oct 12, 2025 |
|---|---|
| 0.1.1 | Sep 21, 2024 |
#958 in Unix APIs
319 downloads per month
5KB
82 lines
blkpg
A Rust library to call Linux blkpg ioctls.
Note: only the BLKPG_RESIZE_PARTITION operation is implemented.
Example
use std::fs::File;
use std::io::Error;
use blkpg::resize_partition;
fn main() -> Result<(), Error> {
let f = File::options()
.read(true)
.write(true)
.open("/dev/nvme0n1")?;
resize_partition(&f, 2, 456, 789, 512)?;
Ok(())
}
Dependencies
~1.5–5.5MB
~131K SLoC