From 029a198bef605e445e50e0f35d1f02b811b6c0d9 Mon Sep 17 00:00:00 2001 From: lilianrong Date: Mon, 11 Nov 2024 15:56:02 +0800 Subject: [PATCH] Fix a bug of validate cdi device type Signed-off-by: nightmeng --- src/container_edits.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/container_edits.rs b/src/container_edits.rs index 6ab09db..bd420fd 100644 --- a/src/container_edits.rs +++ b/src/container_edits.rs @@ -278,7 +278,7 @@ impl Validate for DeviceNode { } if let Some(typ) = &self.node.r#type { - if valid_typs.contains(&typ.as_str()) { + if !valid_typs.contains(&typ.as_str()) { return Err(anyhow!( "device {:?}: invalid type {:?}", self.node.path,