(&mut self, mut fs_cfg: FsConfig)
| 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, |
no test coverage detected