提交 00990d9f 编写于 作者: P Peter Krempa

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.
上级 6d4ee77d
...@@ -3529,8 +3529,8 @@ qemuDomainRemoveDevice(virQEMUDriverPtr driver, ...@@ -3529,8 +3529,8 @@ qemuDomainRemoveDevice(virQEMUDriverPtr driver,
static void static void
qemuDomainMarkDeviceForRemoval(virDomainObjPtr vm, qemuDomainMarkDeviceAliasForRemoval(virDomainObjPtr vm,
virDomainDeviceInfoPtr info) const char *alias)
{ {
qemuDomainObjPrivatePtr priv = vm->privateData; qemuDomainObjPrivatePtr priv = vm->privateData;
...@@ -3539,9 +3539,19 @@ qemuDomainMarkDeviceForRemoval(virDomainObjPtr vm, ...@@ -3539,9 +3539,19 @@ qemuDomainMarkDeviceForRemoval(virDomainObjPtr vm,
if (!virQEMUCapsGet(priv->qemuCaps, QEMU_CAPS_DEVICE_DEL_EVENT)) if (!virQEMUCapsGet(priv->qemuCaps, QEMU_CAPS_DEVICE_DEL_EVENT))
return; return;
priv->unplug.alias = info->alias; priv->unplug.alias = alias;
} }
static void
qemuDomainMarkDeviceForRemoval(virDomainObjPtr vm,
virDomainDeviceInfoPtr info)
{
qemuDomainMarkDeviceAliasForRemoval(vm, info->alias);
}
static void static void
qemuDomainResetDeviceRemoval(virDomainObjPtr vm) qemuDomainResetDeviceRemoval(virDomainObjPtr vm)
{ {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册