mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2025-02-07 04:07:21 +00:00
net_util: Fix error type
The type of error wasn't properly reflecting the issue. Signed-off-by: Sebastien Boeuf <sebastien.boeuf@intel.com>
This commit is contained in:
parent
0249e8641a
commit
f151a8602c
@ -21,8 +21,8 @@ pub enum Error {
|
||||
GuestMemory(GuestMemoryError),
|
||||
/// No control header descriptor
|
||||
NoControlHeaderDescriptor,
|
||||
/// No queue pairs number.
|
||||
NoQueuePairsDescriptor,
|
||||
/// Missing the data descriptor in the chain.
|
||||
NoDataDescriptor,
|
||||
/// No status descriptor
|
||||
NoStatusDescriptor,
|
||||
/// Failed adding used index
|
||||
@ -65,7 +65,7 @@ impl CtrlQueue {
|
||||
.memory()
|
||||
.read_obj(ctrl_desc.addr())
|
||||
.map_err(Error::GuestMemory)?;
|
||||
let data_desc = desc_chain.next().ok_or(Error::NoQueuePairsDescriptor)?;
|
||||
let data_desc = desc_chain.next().ok_or(Error::NoDataDescriptor)?;
|
||||
let status_desc = desc_chain.next().ok_or(Error::NoStatusDescriptor)?;
|
||||
|
||||
let ok = match u32::from(ctrl_hdr.class) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user