]> xenbits.xensource.com Git - libvirt.git/commit
qemu: Return -EINVAL to keep qemuDomainOpenFile() consistent
authorKristina Hanicova <khanicov@redhat.com>
Fri, 21 May 2021 11:41:30 +0000 (13:41 +0200)
committerMichal Privoznik <mprivozn@redhat.com>
Fri, 21 May 2021 12:38:09 +0000 (14:38 +0200)
commitb6b6725c95b3e9fbdc5d1683f00355bf0d13f0a0
tree5e3c799312a26071c3d2974d6364c628904bfd07
parentbcdaa91a27b5b2d103535270a6a287efe6cd8bfb
qemu: Return -EINVAL to keep qemuDomainOpenFile() consistent

The description of the function says that the return value is a
file descriptor on success and negative errno on failure which is
not true. If the 'if' case with check on security labels fails,
the return value is -1 not -errno. The solution is to return
'-EINVAL' instead.

Signed-off-by: Kristina Hanicova <khanicov@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
src/qemu/qemu_domain.c