]> git.ipfire.org Git - thirdparty/libvirt.git/commit
qemu: Report system error on failed open()
authorMichal Privoznik <mprivozn@redhat.com>
Wed, 16 Jul 2025 13:28:08 +0000 (15:28 +0200)
committerMichal Privoznik <mprivozn@redhat.com>
Fri, 18 Jul 2025 06:27:36 +0000 (08:27 +0200)
commit12d0fc3cf7ff5e4d0778534a0b2b809761de35a6
tree7d5d6a3f7f5854c290f4bd7b984ee63cf5a50151
parentc1cf7cb3345db2e10d543920b68fba2c9dc8d1d3
qemu: Report system error on failed open()

With a help from coccinelle three places were identified that
call virReportError() after failed open() (in
qemuDomainWriteMasterKeyFile(), qemuDomainMasterKeyReadFile() and
qemuProcessOpenVhostVsock()). The open() syscall does set errno
on failure so switch them to virReportSystemError() which may
shed more light into the reasons for failure.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
src/qemu/qemu_domain.c
src/qemu/qemu_process.c