]> git.ipfire.org Git - thirdparty/libvirt.git/commit
qemu: Do not erase duplicate devices from namespace if error occurs
authorKristina Hanicova <khanicov@redhat.com>
Wed, 14 Jul 2021 14:46:54 +0000 (16:46 +0200)
committerMichal Privoznik <mprivozn@redhat.com>
Thu, 15 Jul 2021 10:00:24 +0000 (12:00 +0200)
commitc39757f700f4a50de6bd9e2bc751cf2da8dc104f
tree98f837afd4d59f8c328db36d2abe458e176a75d7
parentcbcde4df3b0f52db86c51d56ab3f5c527df99b19
qemu: Do not erase duplicate devices from namespace if error occurs

If the attempt to attach a device failed, we erased the
unattached device from the namespace. This resulted in erasing an
already attached device in case of a duplicate. We need to check
for existing file in the namespace in order to determine erasing
it in case of a failure.

Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1780508

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