misc: net_util: streamline error Display::fmt()

The changes were mostly automatically applied using the Python
script mentioned in the first commit of this series.

Signed-off-by: Philipp Schuster <philipp.schuster@cyberus-technology.de>
On-behalf-of: SAP philipp.schuster@sap.com
This commit is contained in:
Philipp Schuster
2025-05-21 12:32:04 +02:00
committed by Rob Bradford
parent 72c8178335
commit 67896333e3
4 changed files with 24 additions and 24 deletions

View File

@@ -353,27 +353,27 @@ pub struct NetCounters {
pub enum NetQueuePairError {
#[error("No memory configured")]
NoMemoryConfigured,
#[error("Error registering listener: {0}")]
#[error("Error registering listener")]
RegisterListener(#[source] io::Error),
#[error("Error unregistering listener: {0}")]
#[error("Error unregistering listener")]
UnregisterListener(#[source] io::Error),
#[error("Error writing to the TAP device: {0}")]
#[error("Error writing to the TAP device")]
WriteTap(#[source] io::Error),
#[error("Error reading from the TAP device: {0}")]
#[error("Error reading from the TAP device")]
ReadTap(#[source] io::Error),
#[error("Error related to guest memory: {0}")]
#[error("Error related to guest memory")]
GuestMemory(#[source] vm_memory::GuestMemoryError),
#[error("Returned an error while iterating through the queue: {0}")]
#[error("Returned an error while iterating through the queue")]
QueueIteratorFailed(#[source] virtio_queue::Error),
#[error("Descriptor chain is too short")]
DescriptorChainTooShort,
#[error("Descriptor chain does not contain valid descriptors")]
DescriptorChainInvalid,
#[error("Failed to determine if queue needed notification: {0}")]
#[error("Failed to determine if queue needed notification")]
QueueNeedsNotification(#[source] virtio_queue::Error),
#[error("Failed to enable notification on the queue: {0}")]
#[error("Failed to enable notification on the queue")]
QueueEnableNotification(#[source] virtio_queue::Error),
#[error("Failed to add used index to the queue: {0}")]
#[error("Failed to add used index to the queue")]
QueueAddUsed(#[source] virtio_queue::Error),
#[error("Descriptor with invalid virtio-net header")]
DescriptorInvalidHeader,