|
|
6ae9ed |
From f2e19ab91dd4c09743bc571862edb23167da607d Mon Sep 17 00:00:00 2001
|
|
|
6ae9ed |
Message-Id: <f2e19ab91dd4c09743bc571862edb23167da607d@dist-git>
|
|
|
6ae9ed |
From: Peter Krempa <pkrempa@redhat.com>
|
|
|
6ae9ed |
Date: Wed, 24 Aug 2016 16:11:39 -0400
|
|
|
6ae9ed |
Subject: [PATCH] qemu: hotplug: Allow marking unplugged devices by alias
|
|
|
6ae9ed |
|
|
|
6ae9ed |
https://bugzilla.redhat.com/show_bug.cgi?id=1097930
|
|
|
6ae9ed |
https://bugzilla.redhat.com/show_bug.cgi?id=1224341
|
|
|
6ae9ed |
|
|
|
6ae9ed |
Add a overlay function that takes the alias directly rather than
|
|
|
6ae9ed |
extracting it from a device info.
|
|
|
6ae9ed |
|
|
|
6ae9ed |
(cherry picked from commit 00990d9f4c1792f08a53a9b584b3547f52bf2b2c)
|
|
|
6ae9ed |
---
|
|
|
6ae9ed |
src/qemu/qemu_hotplug.c | 16 +++++++++++++---
|
|
|
6ae9ed |
1 file changed, 13 insertions(+), 3 deletions(-)
|
|
|
6ae9ed |
|
|
|
6ae9ed |
diff --git a/src/qemu/qemu_hotplug.c b/src/qemu/qemu_hotplug.c
|
|
|
6ae9ed |
index 51ab7c9..a1a9bd1 100644
|
|
|
6ae9ed |
--- a/src/qemu/qemu_hotplug.c
|
|
|
6ae9ed |
+++ b/src/qemu/qemu_hotplug.c
|
|
|
6ae9ed |
@@ -3457,8 +3457,8 @@ qemuDomainRemoveDevice(virQEMUDriverPtr driver,
|
|
|
6ae9ed |
|
|
|
6ae9ed |
|
|
|
6ae9ed |
static void
|
|
|
6ae9ed |
-qemuDomainMarkDeviceForRemoval(virDomainObjPtr vm,
|
|
|
6ae9ed |
- virDomainDeviceInfoPtr info)
|
|
|
6ae9ed |
+qemuDomainMarkDeviceAliasForRemoval(virDomainObjPtr vm,
|
|
|
6ae9ed |
+ const char *alias)
|
|
|
6ae9ed |
{
|
|
|
6ae9ed |
qemuDomainObjPrivatePtr priv = vm->privateData;
|
|
|
6ae9ed |
|
|
|
6ae9ed |
@@ -3467,9 +3467,19 @@ qemuDomainMarkDeviceForRemoval(virDomainObjPtr vm,
|
|
|
6ae9ed |
if (!virQEMUCapsGet(priv->qemuCaps, QEMU_CAPS_DEVICE_DEL_EVENT))
|
|
|
6ae9ed |
return;
|
|
|
6ae9ed |
|
|
|
6ae9ed |
- priv->unplug.alias = info->alias;
|
|
|
6ae9ed |
+ priv->unplug.alias = alias;
|
|
|
6ae9ed |
}
|
|
|
6ae9ed |
|
|
|
6ae9ed |
+
|
|
|
6ae9ed |
+static void
|
|
|
6ae9ed |
+qemuDomainMarkDeviceForRemoval(virDomainObjPtr vm,
|
|
|
6ae9ed |
+ virDomainDeviceInfoPtr info)
|
|
|
6ae9ed |
+
|
|
|
6ae9ed |
+{
|
|
|
6ae9ed |
+ qemuDomainMarkDeviceAliasForRemoval(vm, info->alias);
|
|
|
6ae9ed |
+}
|
|
|
6ae9ed |
+
|
|
|
6ae9ed |
+
|
|
|
6ae9ed |
static void
|
|
|
6ae9ed |
qemuDomainResetDeviceRemoval(virDomainObjPtr vm)
|
|
|
6ae9ed |
{
|
|
|
6ae9ed |
--
|
|
|
6ae9ed |
2.10.0
|
|
|
6ae9ed |
|