A pure-Rust library to work with GPT partition tables.
gpt
provides support for manipulating (R/W) GPT headers and partition
tables. It supports raw disk devices as well as disk images.
```rust extern crate gpt; use gpt::header::{Header, readheader}; use gpt::partition::{Partition, readpartitions};
fn inspectdisk() { let lbsize = gpt::disk::DEFAULTSECTORSIZE; let diskpath = std::path::Path::new("/dev/sdz");
let hdr = header::read_header(diskpath, lb_size).unwrap();
println!("Disk header: {:#?}", h);
let pp = read_partitions(diskpath, &hdr, lb_size).unwrap();
println!("Partition layout: {:#?}", pp);
} ```