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@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
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;
}