mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2026-08-05 02:19:16 +00:00
block: vhdx: Remove catch all in physical_size boundary
Vhdx::physical_size() can only return Error::GetFileMetadata. Replace the catch-all arm with unreachable!() so future error variants are not silently mapped to a generic Io classification. Signed-off-by: Anatol Belski <anbelski@linux.microsoft.com>
This commit is contained in:
committed by
Rob Bradford
parent
da64acb775
commit
4416a582c8
@@ -53,7 +53,7 @@ impl disk_file::PhysicalSize for VhdxDiskSync {
|
|||||||
Error::GetFileMetadata(io) => {
|
Error::GetFileMetadata(io) => {
|
||||||
BlockError::new(BlockErrorKind::Io, Error::GetFileMetadata(io))
|
BlockError::new(BlockErrorKind::Io, Error::GetFileMetadata(io))
|
||||||
}
|
}
|
||||||
_ => BlockError::new(BlockErrorKind::Io, e),
|
_ => unreachable!("unexpected error from Vhdx::physical_size(): {e}"),
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user