mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-25 10:03:49 +03:00
qemu: hotplug: Allow marking unplugged devices by alias
Add a overlay function that takes the alias directly rather than extracting it from a device info.
This commit is contained in:
parent
6d4ee77d75
commit
00990d9f4c
@ -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)
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user