The code just does not match the comment above which says we should
claim success. And it makes sense since a removal from qemu was
requested and qemu could not find the device. Without this patch such
codepath would lead to libvirt not removing the device from the XML and
no error being set, but the API would still return an error value.
Signed-off-by: Martin Kletzander <mkletzan(a)redhat.com>
---
src/qemu/qemu_hotplug.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/src/qemu/qemu_hotplug.c b/src/qemu/qemu_hotplug.c
index f856e26c1877..d23da0a553c0 100644
--- a/src/qemu/qemu_hotplug.c
+++ b/src/qemu/qemu_hotplug.c
@@ -136,6 +136,7 @@ qemuDomainDeleteDevice(virDomainObj *vm,
* domain XML is queried right after detach API the
* device would still be there. */
VIR_DEBUG("Detaching of device %s failed and no event arrived",
alias);
+ rc = 0;
}
}
--
2.47.0