提交 740a3f27 编写于 作者: D Dmitry Guryanov 提交者: Daniel P. Berrange

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: NDmitry Guryanov <dguryanov@parallels.com>
上级 e3d66229
......@@ -1955,6 +1955,7 @@ static int
parallelsApplyChanges(virConnectPtr conn, virDomainObjPtr dom, virDomainDefPtr new)
{
char buf[32];
size_t i;
virDomainDefPtr old = dom->def;
parallelsDomObjPtr pdom = dom->privateData;
......@@ -2131,11 +2132,13 @@ parallelsApplyChanges(virConnectPtr conn, virDomainObjPtr dom, virDomainDefPtr n
return -1;
}
if (old->features != new->features) {
virReportError(VIR_ERR_ARGUMENT_UNSUPPORTED, "%s",
_("changing features is not supported "
"by parallels driver"));
return -1;
for (i = 0; i < VIR_DOMAIN_FEATURE_LAST; i++) {
if (old->features[i] != new->features[i]) {
virReportError(VIR_ERR_ARGUMENT_UNSUPPORTED, "%s",
_("changing features is not supported "
"by parallels driver"));
return -1;
}
}
if (new->clock.offset != VIR_DOMAIN_CLOCK_OFFSET_UTC ||
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册