mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-23 06:05:27 +00:00
qemu: Assume QEMU_CAPS_VSERPORT_CHANGE
Introduced in QEMU's commit of v2.1.0-rc0~18^2~2 the VSERPORT_CHANGE event is always available for all QEMU versions we support (4.2.0, currently). Therefore, we can assume the capability is always set and thus doesn't need to be checked for. Signed-off-by: Michal Privoznik <mprivozn@redhat.com> Reviewed-by: Peter Krempa <pkrempa@redhat.com> Reviewed-by: Ján Tomko <jtomko@redhat.com>
This commit is contained in:
parent
05aa2e1a5d
commit
3cf0a764cd
@ -214,8 +214,7 @@ qemuConnectAgent(virQEMUDriver *driver, virDomainObj *vm)
|
|||||||
if (priv->agent)
|
if (priv->agent)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
if (virQEMUCapsGet(priv->qemuCaps, QEMU_CAPS_VSERPORT_CHANGE) &&
|
if (config->state != VIR_DOMAIN_CHR_DEVICE_STATE_CONNECTED) {
|
||||||
config->state != VIR_DOMAIN_CHR_DEVICE_STATE_CONNECTED) {
|
|
||||||
VIR_DEBUG("Deferring connecting to guest agent");
|
VIR_DEBUG("Deferring connecting to guest agent");
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
@ -230,7 +229,7 @@ qemuConnectAgent(virQEMUDriver *driver, virDomainObj *vm)
|
|||||||
config->source,
|
config->source,
|
||||||
virEventThreadGetContext(priv->eventThread),
|
virEventThreadGetContext(priv->eventThread),
|
||||||
&agentCallbacks,
|
&agentCallbacks,
|
||||||
virQEMUCapsGet(priv->qemuCaps, QEMU_CAPS_VSERPORT_CHANGE));
|
true);
|
||||||
|
|
||||||
if (!virDomainObjIsActive(vm)) {
|
if (!virDomainObjIsActive(vm)) {
|
||||||
qemuAgentClose(agent);
|
qemuAgentClose(agent);
|
||||||
|
Loading…
Reference in New Issue
Block a user