From adfcd17bfcab87462dd6e69a0f5fb1253261502a Mon Sep 17 00:00:00 2001 From: Leander Kohler Date: Fri, 13 Feb 2026 13:30:59 +0100 Subject: [PATCH] vmm: Include invalid UUID string in ParseUuid err On-behalf-of: SAP leander.kohler@sap.com Signed-off-by: Leander Kohler --- arch/src/x86_64/smbios.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/arch/src/x86_64/smbios.rs b/arch/src/x86_64/smbios.rs index ee1499982..b9db0fcb9 100644 --- a/arch/src/x86_64/smbios.rs +++ b/arch/src/x86_64/smbios.rs @@ -33,8 +33,8 @@ pub enum Error { #[error("Failure to write additional data to memory")] WriteData, /// Failure to parse uuid, uuid format may be error - #[error("Failure to parse uuid")] - ParseUuid(#[source] uuid::Error), + #[error("Failure to parse uuid: {1}")] + ParseUuid(#[source] uuid::Error, String), } pub type Result = result::Result; @@ -198,7 +198,7 @@ pub fn setup_smbios( let uuid_number = uuid .map(Uuid::parse_str) .transpose() - .map_err(Error::ParseUuid)? + .map_err(|e| Error::ParseUuid(e, uuid.unwrap().to_string()))? .unwrap_or(Uuid::nil()); let smbios_sysinfo = SmbiosSysInfo { r#type: SYSTEM_INFORMATION,