There's no need to skip over ENOENT error in
qemuCgroupAllowDevicesPaths(). The path must exists when
qemuCgroupAllowDevicePath() is called because of virFileExists()
check done right above.
Signed-off-by: Michal Privoznik <mprivozn(a)redhat.com>
---
src/qemu/qemu_cgroup.c | 6 +-----
1 file changed, 1 insertion(+), 5 deletions(-)
diff --git a/src/qemu/qemu_cgroup.c b/src/qemu/qemu_cgroup.c
index 51702b52e1..d6f27a5a4d 100644
--- a/src/qemu/qemu_cgroup.c
+++ b/src/qemu/qemu_cgroup.c
@@ -76,16 +76,12 @@ qemuCgroupAllowDevicesPaths(virDomainObj *vm,
size_t i;
for (i = 0; deviceACL[i] != NULL; i++) {
- int rv;
-
if (!virFileExists(deviceACL[i])) {
VIR_DEBUG("Ignoring non-existent device %s", deviceACL[i]);
continue;
}
- rv = qemuCgroupAllowDevicePath(vm, deviceACL[i], perms, ignoreEacces);
- if (rv < 0 &&
- !virLastErrorIsSystemErrno(ENOENT))
+ if (qemuCgroupAllowDevicePath(vm, deviceACL[i], perms, ignoreEacces) < 0)
return -1;
}
--
2.35.1