|
|
99cbc7 |
From a2f60e6e90112f4bf4a8c2e68d76f472c88b7074 Mon Sep 17 00:00:00 2001
|
|
|
99cbc7 |
Message-Id: <a2f60e6e90112f4bf4a8c2e68d76f472c88b7074@dist-git>
|
|
|
99cbc7 |
From: Michal Privoznik <mprivozn@redhat.com>
|
|
|
99cbc7 |
Date: Thu, 11 Apr 2019 15:14:22 -0400
|
|
|
99cbc7 |
Subject: [PATCH] qemu_hotplug: Assume chardev alias always exists in
|
|
|
99cbc7 |
qemuDomainDetachChrDevice
|
|
|
99cbc7 |
|
|
|
99cbc7 |
The @tmpChr is looked up in domain definition based on user
|
|
|
99cbc7 |
provided chardev XML. Therefore, the alias must have been
|
|
|
99cbc7 |
allocated already when domain was started up.
|
|
|
99cbc7 |
|
|
|
99cbc7 |
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
|
|
|
99cbc7 |
Reviewed-by: John Ferlan <jferlan@redhat.com>
|
|
|
99cbc7 |
(cherry picked from commit 5657e22212c54651a9e098ceb79c5522d55e0114)
|
|
|
99cbc7 |
|
|
|
99cbc7 |
Partially-Resolves: https://bugzilla.redhat.com/1658198
|
|
|
99cbc7 |
Signed-off-by: Laine Stump <laine@redhat.com>
|
|
|
99cbc7 |
Signed-off-by: Laine Stump <laine@laine.org>
|
|
|
99cbc7 |
Message-Id: <20190411191453.24055-11-laine@redhat.com>
|
|
|
99cbc7 |
Acked-by: Michal Privoznik <mprivozn@redhat.com>
|
|
|
99cbc7 |
---
|
|
|
99cbc7 |
src/qemu/qemu_hotplug.c | 5 -----
|
|
|
99cbc7 |
1 file changed, 5 deletions(-)
|
|
|
99cbc7 |
|
|
|
99cbc7 |
diff --git a/src/qemu/qemu_hotplug.c b/src/qemu/qemu_hotplug.c
|
|
|
99cbc7 |
index d4444bbb5d..36840f977e 100644
|
|
|
99cbc7 |
--- a/src/qemu/qemu_hotplug.c
|
|
|
99cbc7 |
+++ b/src/qemu/qemu_hotplug.c
|
|
|
99cbc7 |
@@ -5607,11 +5607,6 @@ int qemuDomainDetachChrDevice(virQEMUDriverPtr driver,
|
|
|
99cbc7 |
guestfwd = tmpChr->deviceType == VIR_DOMAIN_CHR_DEVICE_TYPE_CHANNEL &&
|
|
|
99cbc7 |
tmpChr->targetType == VIR_DOMAIN_CHR_CHANNEL_TARGET_TYPE_GUESTFWD;
|
|
|
99cbc7 |
|
|
|
99cbc7 |
- if (!tmpChr->info.alias && qemuAssignDeviceChrAlias(vmdef, tmpChr, -1) < 0)
|
|
|
99cbc7 |
- goto cleanup;
|
|
|
99cbc7 |
-
|
|
|
99cbc7 |
- sa_assert(tmpChr->info.alias);
|
|
|
99cbc7 |
-
|
|
|
99cbc7 |
if (!async && !guestfwd)
|
|
|
99cbc7 |
qemuDomainMarkDeviceForRemoval(vm, &tmpChr->info);
|
|
|
99cbc7 |
|
|
|
99cbc7 |
--
|
|
|
99cbc7 |
2.21.0
|
|
|
99cbc7 |
|