Skip to content

Commit 029a198

Browse files
nightmenglilianrong
authored and
lilianrong
committed
Fix a bug of validate cdi device type
Signed-off-by: nightmeng <[email protected]>
1 parent fba5677 commit 029a198

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/container_edits.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -278,7 +278,7 @@ impl Validate for DeviceNode {
278278
}
279279

280280
if let Some(typ) = &self.node.r#type {
281-
if valid_typs.contains(&typ.as_str()) {
281+
if !valid_typs.contains(&typ.as_str()) {
282282
return Err(anyhow!(
283283
"device {:?}: invalid type {:?}",
284284
self.node.path,

0 commit comments

Comments
 (0)