MCPcopy Index your code
hub / github.com/cloud-hypervisor/cloud-hypervisor / remove

Method remove

vm-device/src/bus.rs:184–196  ·  view source on GitHub ↗

Removes the device at the given address space range.

(&self, base: u64, len: u64)

Source from the content-addressed store, hash-verified

182
183 /// Removes the device at the given address space range.
184 pub fn remove(&self, base: u64, len: u64) -> Result<()> {
185 if len == 0 {
186 return Err(Error::ZeroSizedRange);
187 }
188
189 let bus_range = BusRange { base, len };
190
191 if self.devices.write().unwrap().remove(&bus_range).is_none() {
192 return Err(Error::MissingAddressRange);
193 }
194
195 Ok(())
196 }
197
198 /// Removes all entries referencing the given device.
199 pub fn remove_by_device(&self, device: &dyn BusDeviceSync) -> Result<()> {

Callers 10

spawnMethod · 0.45
cleanupMethod · 0.45
dropMethod · 0.45
remove_by_deviceMethod · 0.45
update_rangeMethod · 0.45
freeMethod · 0.45
insertMethod · 0.45

Calls 1

writeMethod · 0.45

Tested by

no test coverage detected