mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-09 06:25:19 +00:00
Fix virDomainChrEquals for spicevmc
virDomainChrSourceDefIsEqual should return 'true' for
identical SPICEVMC chardevs, and those that have no source
specification.
After this change, a failed hotplug no longer leaves a stale
pointer in the domain definition.
https://bugzilla.redhat.com/show_bug.cgi?id=1162097
(cherry picked from commit b987684ff6
)
This commit is contained in:
parent
d937f1f939
commit
35b06cebd4
@ -1590,16 +1590,17 @@ virDomainChrSourceDefIsEqual(const virDomainChrSourceDef *src,
|
|||||||
tgt->data.spiceport.channel);
|
tgt->data.spiceport.channel);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case VIR_DOMAIN_CHR_TYPE_SPICEVMC:
|
||||||
|
return src->data.spicevmc == tgt->data.spicevmc;
|
||||||
|
|
||||||
case VIR_DOMAIN_CHR_TYPE_NULL:
|
case VIR_DOMAIN_CHR_TYPE_NULL:
|
||||||
case VIR_DOMAIN_CHR_TYPE_VC:
|
case VIR_DOMAIN_CHR_TYPE_VC:
|
||||||
case VIR_DOMAIN_CHR_TYPE_STDIO:
|
case VIR_DOMAIN_CHR_TYPE_STDIO:
|
||||||
case VIR_DOMAIN_CHR_TYPE_SPICEVMC:
|
|
||||||
case VIR_DOMAIN_CHR_TYPE_LAST:
|
case VIR_DOMAIN_CHR_TYPE_LAST:
|
||||||
/* nada */
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
return false;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
void virDomainChrDefFree(virDomainChrDefPtr def)
|
void virDomainChrDefFree(virDomainChrDefPtr def)
|
||||||
|
Loading…
Reference in New Issue
Block a user