[PATCH 25/27] qemu: hotplug: Allow marking unplugged devices by alias

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Add a overlay function that takes the alias directly rather than
extracting it from a device info.
---
 src/qemu/qemu_hotplug.c | 16 +++++++++++++---
 1 file changed, 13 insertions(+), 3 deletions(-)

diff --git a/src/qemu/qemu_hotplug.c b/src/qemu/qemu_hotplug.c
index 00e4a75..31ef22f 100644
--- a/src/qemu/qemu_hotplug.c
+++ b/src/qemu/qemu_hotplug.c
@@ -3529,8 +3529,8 @@ qemuDomainRemoveDevice(virQEMUDriverPtr driver,


 static void
-qemuDomainMarkDeviceForRemoval(virDomainObjPtr vm,
-                               virDomainDeviceInfoPtr info)
+qemuDomainMarkDeviceAliasForRemoval(virDomainObjPtr vm,
+                                    const char *alias)
 {
     qemuDomainObjPrivatePtr priv = vm->privateData;

@@ -3539,9 +3539,19 @@ qemuDomainMarkDeviceForRemoval(virDomainObjPtr vm,
     if (!virQEMUCapsGet(priv->qemuCaps, QEMU_CAPS_DEVICE_DEL_EVENT))
         return;

-    priv->unplug.alias = info->alias;
+    priv->unplug.alias = alias;
 }

+
+static void
+qemuDomainMarkDeviceForRemoval(virDomainObjPtr vm,
+                               virDomainDeviceInfoPtr info)
+
+{
+    qemuDomainMarkDeviceAliasForRemoval(vm, info->alias);
+}
+
+
 static void
 qemuDomainResetDeviceRemoval(virDomainObjPtr vm)
 {
-- 
2.9.2

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list



[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]