mirror of
https://github.com/kata-containers/cgroups-rs.git
synced 2026-08-05 02:13:23 +00:00
Merge pull request #118 from justxuewei/devices
devices: Throw an error if device resources are invalid
This commit is contained in:
@@ -171,9 +171,9 @@ impl ControllerInternal for DevicesController {
|
||||
|
||||
for i in &res.devices {
|
||||
if i.allow {
|
||||
let _ = self.allow_device(i.devtype, i.major, i.minor, &i.access);
|
||||
self.allow_device(i.devtype, i.major, i.minor, &i.access)?;
|
||||
} else {
|
||||
let _ = self.deny_device(i.devtype, i.major, i.minor, &i.access);
|
||||
self.deny_device(i.devtype, i.major, i.minor, &i.access)?;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user