mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-23 13:05:27 +00:00
qemu_cgroup: Don't ignore ENOENT in qemuCgroupAllowDevicesPaths()
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>
This commit is contained in:
parent
23d4684640
commit
bad581466e
@ -76,16 +76,12 @@ qemuCgroupAllowDevicesPaths(virDomainObj *vm,
|
|||||||
size_t i;
|
size_t i;
|
||||||
|
|
||||||
for (i = 0; deviceACL[i] != NULL; i++) {
|
for (i = 0; deviceACL[i] != NULL; i++) {
|
||||||
int rv;
|
|
||||||
|
|
||||||
if (!virFileExists(deviceACL[i])) {
|
if (!virFileExists(deviceACL[i])) {
|
||||||
VIR_DEBUG("Ignoring non-existent device %s", deviceACL[i]);
|
VIR_DEBUG("Ignoring non-existent device %s", deviceACL[i]);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
rv = qemuCgroupAllowDevicePath(vm, deviceACL[i], perms, ignoreEacces);
|
if (qemuCgroupAllowDevicePath(vm, deviceACL[i], perms, ignoreEacces) < 0)
|
||||||
if (rv < 0 &&
|
|
||||||
!virLastErrorIsSystemErrno(ENOENT))
|
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user