Skip to content

Commit

Permalink
Fix a bug of validate cdi device type
Browse files Browse the repository at this point in the history
Signed-off-by: nightmeng <[email protected]>
  • Loading branch information
nightmeng authored and lilianrong committed Nov 13, 2024
1 parent fba5677 commit 029a198
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/container_edits.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 029a198

Please sign in to comment.