block: streamline error messages

In [0] we agreed on the current format.

[0] https://github.com/cloud-hypervisor/cloud-hypervisor/pull/7066

On-behalf-of: SAP philipp.schuster@sap.com
Signed-off-by: Philipp Schuster <philipp.schuster@cyberus-technology.de>
This commit is contained in:
Philipp Schuster
2026-06-25 13:29:11 +02:00
committed by Bo Chen
parent 9ba653dc16
commit 786d40f549
2 changed files with 2 additions and 2 deletions

View File

@@ -40,7 +40,7 @@ pub enum VhdxHeaderError {
DuplicateBATEntry,
#[error("Metadata region entry is not unique")]
DuplicateMDREntry,
#[error("Checksum doesn't match for")]
#[error("Checksum doesn't match for {0}")]
InvalidChecksum(String),
#[error("Invalid entry count")]
InvalidEntryCount,

View File

@@ -55,7 +55,7 @@ use crate::request::SECTOR_SIZE;
pub enum Error {
#[error("Guest gave us bad memory addresses")]
GuestMemory(#[source] GuestMemoryError),
#[error("Guest gave us offsets that would have overflowed a usize")]
#[error("Guest address {0:?} with sector offset {1} would overflow a usize")]
CheckedOffset(GuestAddress, usize /* sector offset */),
#[error("Guest gave us a write only descriptor that protocol says to read from")]
UnexpectedWriteOnlyDescriptor,