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

Method add_preserved_fds

vmm/src/config.rs:3562–3572  ·  view source on GitHub ↗

# Safety To use this safely, the caller must guarantee that the input fds are all valid.

(&mut self, mut fds: Vec<i32>)

Source from the content-addressed store, hash-verified

3560 /// To use this safely, the caller must guarantee that the input
3561 /// fds are all valid.
3562 pub unsafe fn add_preserved_fds(&mut self, mut fds: Vec<i32>) {
3563 if fds.is_empty() {
3564 return;
3565 }
3566
3567 if let Some(preserved_fds) = &self.preserved_fds {
3568 fds.append(&mut preserved_fds.clone());
3569 }
3570
3571 self.preserved_fds = Some(fds);
3572 }
3573
3574 #[cfg(feature = "tdx")]
3575 pub fn is_tdx_enabled(&self) -> bool {

Callers 2

test_config_validationFunction · 0.80

Calls 2

is_emptyMethod · 0.45
cloneMethod · 0.45

Tested by 1

test_config_validationFunction · 0.64