mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-02-09 13:11:36 +00:00
parallels: fix virDomainDef.features comparison
virDomainDef.features became an array, so now we can't simply compare one features variable to another. We need to compare each each element from the array. Signed-off-by: Dmitry Guryanov <dguryanov@parallels.com>
This commit is contained in:
parent
e3d66229a1
commit
740a3f2731
@ -1955,6 +1955,7 @@ static int
|
|||||||
parallelsApplyChanges(virConnectPtr conn, virDomainObjPtr dom, virDomainDefPtr new)
|
parallelsApplyChanges(virConnectPtr conn, virDomainObjPtr dom, virDomainDefPtr new)
|
||||||
{
|
{
|
||||||
char buf[32];
|
char buf[32];
|
||||||
|
size_t i;
|
||||||
|
|
||||||
virDomainDefPtr old = dom->def;
|
virDomainDefPtr old = dom->def;
|
||||||
parallelsDomObjPtr pdom = dom->privateData;
|
parallelsDomObjPtr pdom = dom->privateData;
|
||||||
@ -2131,12 +2132,14 @@ parallelsApplyChanges(virConnectPtr conn, virDomainObjPtr dom, virDomainDefPtr n
|
|||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (old->features != new->features) {
|
for (i = 0; i < VIR_DOMAIN_FEATURE_LAST; i++) {
|
||||||
|
if (old->features[i] != new->features[i]) {
|
||||||
virReportError(VIR_ERR_ARGUMENT_UNSUPPORTED, "%s",
|
virReportError(VIR_ERR_ARGUMENT_UNSUPPORTED, "%s",
|
||||||
_("changing features is not supported "
|
_("changing features is not supported "
|
||||||
"by parallels driver"));
|
"by parallels driver"));
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (new->clock.offset != VIR_DOMAIN_CLOCK_OFFSET_UTC ||
|
if (new->clock.offset != VIR_DOMAIN_CLOCK_OFFSET_UTC ||
|
||||||
new->clock.ntimers != 0) {
|
new->clock.ntimers != 0) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user