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

Function basic_file

block/src/qcow/mod.rs:2422–2428  ·  view source on GitHub ↗
(header: &[u8])

Source from the content-addressed store, hash-verified

2420 }
2421
2422 fn basic_file(header: &[u8]) -> RawFile {
2423 let mut disk_file: RawFile = RawFile::new(TempFile::new().unwrap().into_file(), false);
2424 disk_file.write_all(header).unwrap();
2425 disk_file.set_len(0x1_0000_0000).unwrap();
2426 disk_file.rewind().unwrap();
2427 disk_file
2428 }
2429
2430 fn with_basic_file<F>(header: &[u8], mut testfn: F)
2431 where

Callers 4

with_basic_fileFunction · 0.85

Calls 2

newFunction · 0.85
set_lenMethod · 0.45

Tested by 3