mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2025-01-30 16:35:31 +00:00
virtio-devices: rng: Fix error message
The RNG device never reads from the guest memory it reads from a file and writes to the guest memory. Signed-off-by: Rob Bradford <robert.bradford@intel.com>
This commit is contained in:
parent
cf995451a2
commit
31ca22d4b6
@ -42,8 +42,8 @@ enum Error {
|
||||
DescriptorChainTooShort,
|
||||
#[error("Invalid descriptor")]
|
||||
InvalidDescriptor,
|
||||
#[error("Failed read from guest memory: {0}")]
|
||||
GuestMemoryRead(vm_memory::guest_memory::Error),
|
||||
#[error("Failed to write to guest memory: {0}")]
|
||||
GuestMemoryWrite(vm_memory::guest_memory::Error),
|
||||
#[error("Failed adding used index: {0}")]
|
||||
QueueAddUsed(virtio_queue::Error),
|
||||
}
|
||||
@ -81,7 +81,7 @@ impl RngEpollHandler {
|
||||
&mut self.random_file,
|
||||
desc.len() as usize,
|
||||
)
|
||||
.map_err(Error::GuestMemoryRead)?;
|
||||
.map_err(Error::GuestMemoryWrite)?;
|
||||
|
||||
queue
|
||||
.add_used(desc_chain.memory(), desc_chain.head_index(), len as u32)
|
||||
|
Loading…
x
Reference in New Issue
Block a user