Merge pull request #118 from justxuewei/devices

devices: Throw an error if device resources are invalid
This commit is contained in:
Fupan Li
2023-08-01 09:51:34 +08:00
committed by GitHub

View File

@@ -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)?;
}
}