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

Method write_incompatible_features

block/src/qcow/header.rs:515–524  ·  view source on GitHub ↗

Write only the incompatible_features field to the file at its fixed offset.

(&self, file: &mut F)

Source from the content-addressed store, hash-verified

513
514 /// Write only the incompatible_features field to the file at its fixed offset.
515 fn write_incompatible_features<F: Seek + Write>(&self, file: &mut F) -> BlockResult<()> {
516 if self.version != 3 {
517 return Ok(());
518 }
519 file.seek(SeekFrom::Start(V2_BARE_HEADER_SIZE as u64))
520 .map_err(|e| BlockError::new(BlockErrorKind::Io, Error::WritingHeader(e)))?;
521 u64::write_be(file, self.incompatible_features)
522 .map_err(|e| BlockError::new(BlockErrorKind::Io, Error::WritingHeader(e)))?;
523 Ok(())
524 }
525
526 /// Set or clear the dirty bit for QCOW2 v3 images.
527 ///

Callers 2

set_dirty_bitMethod · 0.80
set_corrupt_bitMethod · 0.80

Calls 2

newFunction · 0.85
seekMethod · 0.45

Tested by

no test coverage detected