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

Function get_image_info

cloud-hypervisor/tests/common/utils.rs:984–989  ·  view source on GitHub ↗
(path: &std::path::Path)

Source from the content-addressed store, hash-verified

982}
983
984fn get_image_info(path: &std::path::Path) -> Option<serde_json::Value> {
985 let output = run_qemu_img(path, &["info", "-U", "--output=json"], None);
986
987 output.status.success().then_some(())?;
988 serde_json::from_slice(&output.stdout).ok()
989}
990
991fn get_qcow2_v3_info(path: &Path) -> Result<Option<serde_json::Value>, String> {
992 let info = get_image_info(path)

Callers 2

compute_backing_checksumFunction · 0.85
get_qcow2_v3_infoFunction · 0.85

Calls 2

run_qemu_imgFunction · 0.85
okMethod · 0.80

Tested by

no test coverage detected