MCPcopy Create free account
hub / github.com/cloud-hypervisor/cloud-hypervisor / parse_igvm

Function parse_igvm

vmm/src/igvm/mod.rs:37–41  ·  view source on GitHub ↗
(igvm_path: &Path)

Source from the content-addressed store, hash-verified

35use zerocopy::FromZeros;
36
37pub fn parse_igvm(igvm_path: &Path) -> Result<IgvmFile, igvm_loader::Error> {
38 let file_contents = std::fs::read(igvm_path).map_err(igvm_loader::Error::Igvm)?;
39 IgvmFile::new_from_binary(&file_contents, Some(IsolationType::Snp))
40 .map_err(igvm_loader::Error::InvalidIgvmFile)
41}
42
43#[derive(Debug, Clone)]
44pub struct IgvmLoadedInfo {

Callers 1

newMethod · 0.85

Calls 1

readFunction · 0.85

Tested by

no test coverage detected