[−][src]Function gpt::partition::read_partitions
pub fn read_partitions(
path: &Path,
header: &Header,
lb_size: LogicalBlockSize
) -> Result<BTreeMap<u32, Partition>>
Read a GPT partition table.
Example
use gpt::{header, disk, partition}; use std::path::Path; let lb_size = disk::DEFAULT_SECTOR_SIZE; let diskpath = Path::new("/dev/sdz"); let hdr = header::read_header(diskpath, lb_size).unwrap(); let partitions = partition::read_partitions(diskpath, &hdr, lb_size).unwrap(); println!("{:#?}", partitions);