mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2026-08-05 02:19:16 +00:00
Temporary From impl that classifies each qcow::Error variant into the appropriate BlockErrorKind. This enables an incremental migration of qcow functions from qcow::Result to BlockResult, where each subsequent commit replaces bare ? sites with explicit BlockError::new calls until this impl can be removed. The mapping assigns InvalidFormat for structural header violations, UnsupportedFeature for version and feature mismatches, CorruptImage for internal inconsistencies, Overflow for nesting depth and Io for everything else. Signed-off-by: Anatol Belski <anbelski@linux.microsoft.com>