mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2026-08-05 02:19:16 +00:00
misc: virtio-devices: 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:
committed by
Rob Bradford
parent
3541cebbf1
commit
8e2973fe7c
@@ -32,10 +32,10 @@ pub enum Error {
|
||||
#[error("TX buffer full")]
|
||||
TxBufFull,
|
||||
/// An I/O error occurred, when attempting to flush the connection TX buffer.
|
||||
#[error("Error flushing TX buffer: {0}")]
|
||||
#[error("Error flushing TX buffer")]
|
||||
TxBufFlush(#[source] std::io::Error),
|
||||
/// An I/O error occurred, when attempting to write data to the host-side stream.
|
||||
#[error("Error writing to host side stream: {0}")]
|
||||
#[error("Error writing to host side stream")]
|
||||
StreamWrite(#[source] std::io::Error),
|
||||
}
|
||||
|
||||
|
||||
@@ -31,34 +31,34 @@ mod defs {
|
||||
#[derive(Error, Debug)]
|
||||
pub enum Error {
|
||||
/// Error converting from UTF-8
|
||||
#[error("Error converting from UTF-8: {0}")]
|
||||
#[error("Error converting from UTF-8")]
|
||||
ConvertFromUtf8(#[source] std::str::Utf8Error),
|
||||
/// Error registering a new epoll-listening FD.
|
||||
#[error("Error registering a new epoll-listening FD: {0}")]
|
||||
#[error("Error registering a new epoll-listening FD")]
|
||||
EpollAdd(#[source] std::io::Error),
|
||||
/// Error creating an epoll FD.
|
||||
#[error("Error creating an epoll FD: {0}")]
|
||||
#[error("Error creating an epoll FD")]
|
||||
EpollFdCreate(#[source] std::io::Error),
|
||||
/// The host made an invalid vsock port connection request.
|
||||
#[error("The host made an invalid vsock port connection request")]
|
||||
InvalidPortRequest,
|
||||
/// Error parsing integer.
|
||||
#[error("Error parsing integer: {0}")]
|
||||
#[error("Error parsing integer")]
|
||||
ParseInteger(#[source] std::num::ParseIntError),
|
||||
/// Error reading stream port.
|
||||
#[error("Error reading stream port: {0}")]
|
||||
#[error("Error reading stream port")]
|
||||
ReadStreamPort(#[source] Box<Error>),
|
||||
/// Error accepting a new connection from the host-side Unix socket.
|
||||
#[error("Error accepting a new connection from the host-side Unix socket: {0}")]
|
||||
#[error("Error accepting a new connection from the host-side Unix socket")]
|
||||
UnixAccept(#[source] std::io::Error),
|
||||
/// Error binding to the host-side Unix socket.
|
||||
#[error("Error binding to the host-side Unix socket: {0}")]
|
||||
#[error("Error binding to the host-side Unix socket")]
|
||||
UnixBind(#[source] std::io::Error),
|
||||
/// Error connecting to a host-side Unix socket.
|
||||
#[error("Error connecting to a host-side Unix socket: {0}")]
|
||||
#[error("Error connecting to a host-side Unix socket")]
|
||||
UnixConnect(#[source] std::io::Error),
|
||||
/// Error reading from host-side Unix socket.
|
||||
#[error("Error reading from host-side Unix socket: {0}")]
|
||||
#[error("Error reading from host-side Unix socket")]
|
||||
UnixRead(#[source] std::io::Error),
|
||||
/// Muxer connection limit reached.
|
||||
#[error("Muxer connection limit reached")]
|
||||
|
||||
Reference in New Issue
Block a user