mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2026-08-05 02:19:16 +00:00
misc: block: 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
06a868cb85
commit
aebbd1aecd
@@ -26,19 +26,19 @@ mod vhdx_metadata;
|
||||
#[sorted]
|
||||
#[derive(Error, Debug)]
|
||||
pub enum VhdxError {
|
||||
#[error("Not a VHDx file: {0}")]
|
||||
#[error("Not a VHDx file")]
|
||||
NotVhdx(#[source] VhdxHeaderError),
|
||||
#[error("Failed to parse VHDx header: {0}")]
|
||||
#[error("Failed to parse VHDx header")]
|
||||
ParseVhdxHeader(#[source] VhdxHeaderError),
|
||||
#[error("Failed to parse VHDx metadata: {0}")]
|
||||
#[error("Failed to parse VHDx metadata")]
|
||||
ParseVhdxMetadata(#[source] VhdxMetadataError),
|
||||
#[error("Failed to parse VHDx region entries: {0}")]
|
||||
#[error("Failed to parse VHDx region entries")]
|
||||
ParseVhdxRegionEntry(#[source] VhdxHeaderError),
|
||||
#[error("Failed reading metadata: {0}")]
|
||||
#[error("Failed reading metadata")]
|
||||
ReadBatEntry(#[source] VhdxBatError),
|
||||
#[error("Failed reading sector from disk: {0}")]
|
||||
#[error("Failed reading sector from disk")]
|
||||
ReadFailed(#[source] VhdxIoError),
|
||||
#[error("Failed writing to sector on disk: {0}")]
|
||||
#[error("Failed writing to sector on disk")]
|
||||
WriteFailed(#[source] VhdxIoError),
|
||||
}
|
||||
|
||||
|
||||
@@ -33,9 +33,9 @@ pub enum VhdxBatError {
|
||||
InvalidBatEntry,
|
||||
#[error("Invalid BAT entry count")]
|
||||
InvalidEntryCount,
|
||||
#[error("Failed to read BAT entry: {0}")]
|
||||
#[error("Failed to read BAT entry")]
|
||||
ReadBat(#[source] io::Error),
|
||||
#[error("Failed to write BAT entry: {0}")]
|
||||
#[error("Failed to write BAT entry")]
|
||||
WriteBat(#[source] io::Error),
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user