c1c534
From 4f65cfb51fcef877737edeb75f4a06a9988e592e Mon Sep 17 00:00:00 2001
c1c534
Message-Id: <4f65cfb51fcef877737edeb75f4a06a9988e592e@dist-git>
c1c534
From: =?UTF-8?q?J=C3=A1n=20Tomko?= <jtomko@redhat.com>
c1c534
Date: Thu, 14 Dec 2017 17:01:33 +0100
c1c534
Subject: [PATCH] qemu: remove input device after receiving the event
c1c534
MIME-Version: 1.0
c1c534
Content-Type: text/plain; charset=UTF-8
c1c534
Content-Transfer-Encoding: 8bit
c1c534
c1c534
Also call qemuDomainRemoveInputDevice if we receive the
c1c534
event after the Detach API ends.
c1c534
c1c534
Commit 67486bb failed to include this.
c1c534
c1c534
https://bugzilla.redhat.com/show_bug.cgi?id=1524837
c1c534
Signed-off-by: Ján Tomko <jtomko@redhat.com>
c1c534
Reviewed-by: Erik Skultety <eskultet@redhat.com>
c1c534
(cherry picked from commit 8d51042ef873d2a868d505f0eff32346ba041a95)
c1c534
Signed-off-by: Ján Tomko <jtomko@redhat.com>
c1c534
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
c1c534
---
c1c534
 src/qemu/qemu_hotplug.c | 5 ++++-
c1c534
 1 file changed, 4 insertions(+), 1 deletion(-)
c1c534
c1c534
diff --git a/src/qemu/qemu_hotplug.c b/src/qemu/qemu_hotplug.c
c1c534
index eab9ad794a..f1056627f2 100644
c1c534
--- a/src/qemu/qemu_hotplug.c
c1c534
+++ b/src/qemu/qemu_hotplug.c
c1c534
@@ -4368,10 +4368,13 @@ qemuDomainRemoveDevice(virQEMUDriverPtr driver,
c1c534
         ret = qemuDomainRemoveShmemDevice(driver, vm, dev->data.shmem);
c1c534
         break;
c1c534
 
c1c534
+    case VIR_DOMAIN_DEVICE_INPUT:
c1c534
+        ret = qemuDomainRemoveInputDevice(vm, dev->data.input);
c1c534
+        break;
c1c534
+
c1c534
     case VIR_DOMAIN_DEVICE_NONE:
c1c534
     case VIR_DOMAIN_DEVICE_LEASE:
c1c534
     case VIR_DOMAIN_DEVICE_FS:
c1c534
-    case VIR_DOMAIN_DEVICE_INPUT:
c1c534
     case VIR_DOMAIN_DEVICE_SOUND:
c1c534
     case VIR_DOMAIN_DEVICE_VIDEO:
c1c534
     case VIR_DOMAIN_DEVICE_WATCHDOG:
c1c534
-- 
c1c534
2.15.1
c1c534