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

Method add_fs

vmm/src/vm.rs:2300–2322  ·  view source on GitHub ↗
(&mut self, mut fs_cfg: FsConfig)

Source from the content-addressed store, hash-verified

2298 }
2299
2300 pub fn add_fs(&mut self, mut fs_cfg: FsConfig) -> Result<PciDeviceInfo> {
2301 let pci_device_info = self
2302 .device_manager
2303 .lock()
2304 .unwrap()
2305 .add_fs(&mut fs_cfg)
2306 .map_err(Error::DeviceManager)?;
2307
2308 // Update VmConfig by adding the new device. This is important to
2309 // ensure the device would be created in case of a reboot.
2310 {
2311 let mut config = self.config.lock().unwrap();
2312 add_to_config(&mut config.fs, fs_cfg);
2313 }
2314
2315 self.device_manager
2316 .lock()
2317 .unwrap()
2318 .notify_hotplug(AcpiNotificationFlags::PCI_DEVICES_CHANGED)
2319 .map_err(Error::DeviceManager)?;
2320
2321 Ok(pci_device_info)
2322 }
2323
2324 pub fn add_generic_vhost_user(
2325 &mut self,

Callers 1

vm_add_fsMethod · 0.45

Calls 2

add_to_configFunction · 0.85
notify_hotplugMethod · 0.80

Tested by

no test coverage detected