Function gpt::header::read_header
source · pub fn read_header(
path: impl AsRef<Path>,
sector_size: LogicalBlockSize,
) -> Result<Header>
Expand description
Read a GPT header from a given path.
§Example
use gpt::header::read_header;
let lb_size = gpt::disk::DEFAULT_SECTOR_SIZE;
let diskpath = std::path::Path::new("/dev/sdz");
let h = read_header(diskpath, lb_size).unwrap();