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

Function write_string

arch/src/x86_64/smbios.rs:154–164  ·  view source on GitHub ↗
(
    mem: &GuestMemoryMmap,
    val: &str,
    mut curptr: GuestAddress,
)

Source from the content-addressed store, hash-verified

152}
153
154fn write_string(
155 mem: &GuestMemoryMmap,
156 val: &str,
157 mut curptr: GuestAddress,
158) -> Result<GuestAddress> {
159 for c in val.as_bytes().iter() {
160 curptr = write_and_incr(mem, *c, curptr)?;
161 }
162 curptr = write_and_incr(mem, 0u8, curptr)?;
163 Ok(curptr)
164}
165
166pub fn setup_smbios(
167 mem: &GuestMemoryMmap,

Callers 1

setup_smbiosFunction · 0.85

Calls 3

write_and_incrFunction · 0.85
iterMethod · 0.80
as_bytesMethod · 0.80

Tested by

no test coverage detected