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
@@ -42,85 +42,85 @@ pub use self::vu_common_ctrl::VhostUserConfig;
|
||||
|
||||
#[derive(Error, Debug)]
|
||||
pub enum Error {
|
||||
#[error("Failed accepting connection: {0}")]
|
||||
#[error("Failed accepting connection")]
|
||||
AcceptConnection(#[source] io::Error),
|
||||
#[error("Invalid available address")]
|
||||
AvailAddress,
|
||||
#[error("Queue number is not correct")]
|
||||
BadQueueNum,
|
||||
#[error("Failed binding vhost-user socket: {0}")]
|
||||
#[error("Failed binding vhost-user socket")]
|
||||
BindSocket(#[source] io::Error),
|
||||
#[error("Creating kill eventfd failed: {0}")]
|
||||
#[error("Creating kill eventfd failed")]
|
||||
CreateKillEventFd(#[source] io::Error),
|
||||
#[error("Cloning kill eventfd failed: {0}")]
|
||||
#[error("Cloning kill eventfd failed")]
|
||||
CloneKillEventFd(#[source] io::Error),
|
||||
#[error("Invalid descriptor table address")]
|
||||
DescriptorTableAddress,
|
||||
#[error("Signal used queue failed: {0}")]
|
||||
#[error("Signal used queue failed")]
|
||||
FailedSignalingUsedQueue(#[source] io::Error),
|
||||
#[error("Failed to read vhost eventfd: {0}")]
|
||||
#[error("Failed to read vhost eventfd")]
|
||||
MemoryRegions(#[source] MmapError),
|
||||
#[error("Failed removing socket path: {0}")]
|
||||
#[error("Failed removing socket path")]
|
||||
RemoveSocketPath(#[source] io::Error),
|
||||
#[error("Failed to create frontend: {0}")]
|
||||
#[error("Failed to create frontend")]
|
||||
VhostUserCreateFrontend(#[source] VhostError),
|
||||
#[error("Failed to open vhost device: {0}")]
|
||||
#[error("Failed to open vhost device")]
|
||||
VhostUserOpen(#[source] VhostError),
|
||||
#[error("Connection to socket failed")]
|
||||
VhostUserConnect,
|
||||
#[error("Get features failed: {0}")]
|
||||
#[error("Get features failed")]
|
||||
VhostUserGetFeatures(#[source] VhostError),
|
||||
#[error("Get queue max number failed: {0}")]
|
||||
#[error("Get queue max number failed")]
|
||||
VhostUserGetQueueMaxNum(#[source] VhostError),
|
||||
#[error("Get protocol features failed: {0}")]
|
||||
#[error("Get protocol features failed")]
|
||||
VhostUserGetProtocolFeatures(#[source] VhostError),
|
||||
#[error("Get vring base failed: {0}")]
|
||||
#[error("Get vring base failed")]
|
||||
VhostUserGetVringBase(#[source] VhostError),
|
||||
#[error("Vhost-user Backend not support vhost-user protocol")]
|
||||
VhostUserProtocolNotSupport,
|
||||
#[error("Set owner failed: {0}")]
|
||||
#[error("Set owner failed")]
|
||||
VhostUserSetOwner(#[source] VhostError),
|
||||
#[error("Reset owner failed: {0}")]
|
||||
#[error("Reset owner failed")]
|
||||
VhostUserResetOwner(#[source] VhostError),
|
||||
#[error("Set features failed: {0}")]
|
||||
#[error("Set features failed")]
|
||||
VhostUserSetFeatures(#[source] VhostError),
|
||||
#[error("Set protocol features failed: {0}")]
|
||||
#[error("Set protocol features failed")]
|
||||
VhostUserSetProtocolFeatures(#[source] VhostError),
|
||||
#[error("Set mem table failed: {0}")]
|
||||
#[error("Set mem table failed")]
|
||||
VhostUserSetMemTable(#[source] VhostError),
|
||||
#[error("Set vring num failed: {0}")]
|
||||
#[error("Set vring num failed")]
|
||||
VhostUserSetVringNum(#[source] VhostError),
|
||||
#[error("Set vring addr failed: {0}")]
|
||||
#[error("Set vring addr failed")]
|
||||
VhostUserSetVringAddr(#[source] VhostError),
|
||||
#[error("Set vring base failed: {0}")]
|
||||
#[error("Set vring base failed")]
|
||||
VhostUserSetVringBase(#[source] VhostError),
|
||||
#[error("Set vring call failed: {0}")]
|
||||
#[error("Set vring call failed")]
|
||||
VhostUserSetVringCall(#[source] VhostError),
|
||||
#[error("Set vring kick failed: {0}")]
|
||||
#[error("Set vring kick failed")]
|
||||
VhostUserSetVringKick(#[source] VhostError),
|
||||
#[error("Set vring enable failed: {0}")]
|
||||
#[error("Set vring enable failed")]
|
||||
VhostUserSetVringEnable(#[source] VhostError),
|
||||
#[error("Failed to create vhost eventfd: {0}")]
|
||||
#[error("Failed to create vhost eventfd")]
|
||||
VhostIrqCreate(#[source] io::Error),
|
||||
#[error("Failed to read vhost eventfd: {0}")]
|
||||
#[error("Failed to read vhost eventfd")]
|
||||
VhostIrqRead(#[source] io::Error),
|
||||
#[error("Failed to read vhost eventfd: {0}")]
|
||||
#[error("Failed to read vhost eventfd")]
|
||||
VhostUserMemoryRegion(#[source] MmapError),
|
||||
#[error("Failed to create the frontend request handler from backend: {0}")]
|
||||
#[error("Failed to create the frontend request handler from backend")]
|
||||
FrontendReqHandlerCreation(#[source] vhost::vhost_user::Error),
|
||||
#[error("Set backend request fd failed: {0}")]
|
||||
#[error("Set backend request fd failed")]
|
||||
VhostUserSetBackendRequestFd(#[source] vhost::Error),
|
||||
#[error("Add memory region failed: {0}")]
|
||||
#[error("Add memory region failed")]
|
||||
VhostUserAddMemReg(#[source] VhostError),
|
||||
#[error("Failed getting the configuration: {0}")]
|
||||
#[error("Failed getting the configuration")]
|
||||
VhostUserGetConfig(#[source] VhostError),
|
||||
#[error("Failed setting the configuration: {0}")]
|
||||
#[error("Failed setting the configuration")]
|
||||
VhostUserSetConfig(#[source] VhostError),
|
||||
#[error("Failed getting inflight shm log: {0}")]
|
||||
#[error("Failed getting inflight shm log")]
|
||||
VhostUserGetInflight(#[source] VhostError),
|
||||
#[error("Failed setting inflight shm log: {0}")]
|
||||
#[error("Failed setting inflight shm log")]
|
||||
VhostUserSetInflight(#[source] VhostError),
|
||||
#[error("Failed setting the log base: {0}")]
|
||||
#[error("Failed setting the log base")]
|
||||
VhostUserSetLogBase(#[source] VhostError),
|
||||
#[error("Invalid used address")]
|
||||
UsedAddress,
|
||||
@@ -130,17 +130,17 @@ pub enum Error {
|
||||
MissingRegionFd,
|
||||
#[error("Missing IrqFd")]
|
||||
MissingIrqFd,
|
||||
#[error("Failed getting the available index: {0}")]
|
||||
#[error("Failed getting the available index")]
|
||||
GetAvailableIndex(#[source] QueueError),
|
||||
#[error("Migration is not supported by this vhost-user device")]
|
||||
MigrationNotSupported,
|
||||
#[error("Failed creating memfd: {0}")]
|
||||
#[error("Failed creating memfd")]
|
||||
MemfdCreate(#[source] io::Error),
|
||||
#[error("Failed truncating the file size to the expected size: {0}")]
|
||||
#[error("Failed truncating the file size to the expected size")]
|
||||
SetFileSize(#[source] io::Error),
|
||||
#[error("Failed to set the seals on the file: {0}")]
|
||||
#[error("Failed to set the seals on the file")]
|
||||
SetSeals(#[source] io::Error),
|
||||
#[error("Failed creating new mmap region: {0}")]
|
||||
#[error("Failed creating new mmap region")]
|
||||
NewMmapRegion(#[source] MmapRegionError),
|
||||
#[error("Could not find the shm log region")]
|
||||
MissingShmLogRegion,
|
||||
|
||||
Reference in New Issue
Block a user