mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2024-08-23 00:11:16 +00:00
virtio-devices: net: Remove write_config implementation
The spec specifies that all fields are read-only from the driver. Signed-off-by: Rob Bradford <robert.bradford@intel.com>
This commit is contained in:
parent
e3dc620146
commit
f1e940df8d
@ -427,18 +427,6 @@ impl VirtioDevice for Net {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fn write_config(&mut self, offset: u64, data: &[u8]) {
|
|
||||||
let config_slice = self.config.as_mut_slice();
|
|
||||||
let data_len = data.len() as u64;
|
|
||||||
let config_len = config_slice.len() as u64;
|
|
||||||
if offset + data_len > config_len {
|
|
||||||
error!("Failed to write config space");
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
let (_, right) = config_slice.split_at_mut(offset as usize);
|
|
||||||
right.copy_from_slice(&data[..]);
|
|
||||||
}
|
|
||||||
|
|
||||||
fn activate(
|
fn activate(
|
||||||
&mut self,
|
&mut self,
|
||||||
mem: GuestMemoryAtomic<GuestMemoryMmap>,
|
mem: GuestMemoryAtomic<GuestMemoryMmap>,
|
||||||
|
Loading…
Reference in New Issue
Block a user