On 06/25/2018 07:11 PM, Andrea Bolognani wrote:
We're going to introduce a second HPT-related setting soon,
at which point using a single location to store everything is
no longer going to cut it.
This mostly, but not completely, reverts 3dd1eb3b2650.
Signed-off-by: Andrea Bolognani <abologna(a)redhat.com>
---
src/conf/domain_conf.c | 21 ++++++++++++++-------
src/conf/domain_conf.h | 1 +
src/qemu/qemu_command.c | 7 ++++---
src/qemu/qemu_domain.c | 2 +-
4 files changed, 20 insertions(+), 11 deletions(-)
diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c
index f0b604e125..069ff8c2f8 100644
--- a/src/conf/domain_conf.c
+++ b/src/conf/domain_conf.c
@@ -19803,9 +19803,12 @@ virDomainDefParseXML(xmlDocPtr xml,
tmp);
goto error;
}
- def->features[val] = value;
+ def->hpt_resizing = (virDomainHPTResizing) value;
This typecast seems useless. Also, pre-existing, the if() statement
above is more verbose than it needs to be since
VIR_DOMAIN_HPT_RESIZING_NONE is defined to be zero.
VIR_FREE(tmp);
}
+
+ if (def->hpt_resizing != VIR_DOMAIN_HPT_RESIZING_NONE)
+ def->features[val] = VIR_TRISTATE_SWITCH_ON;
break;
/* coverity[dead_error_begin] */
Michal