Signed-off-by: Tim Wiederhake <twiederh(a)redhat.com>
---
src/conf/domain_conf.c | 12 ++----------
1 file changed, 2 insertions(+), 10 deletions(-)
diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c
index b4928a94c2..756a35f33b 100644
--- a/src/conf/domain_conf.c
+++ b/src/conf/domain_conf.c
@@ -13077,7 +13077,6 @@ virDomainGraphicsDefParseXMLVNC(virDomainGraphicsDefPtr def,
g_autofree char *websocketGenerated = virXMLPropString(node,
"websocketGenerated");
g_autofree char *sharePolicy = virXMLPropString(node, "sharePolicy");
g_autofree char *autoport = virXMLPropString(node, "autoport");
- g_autofree char *powerControl = virXMLPropString(node, "powerControl");
xmlNodePtr audioNode;
VIR_XPATH_NODE_AUTORESTORE(ctxt)
@@ -13136,15 +13135,8 @@ virDomainGraphicsDefParseXMLVNC(virDomainGraphicsDefPtr def,
}
}
- if (powerControl) {
- int powerControlVal = virTristateBoolTypeFromString(powerControl);
- if (powerControlVal < 0) {
- virReportError(VIR_ERR_INTERNAL_ERROR,
- _("cannot parse vnc power control '%s'"),
powerControl);
- return -1;
- }
- def->data.vnc.powerControl = powerControlVal;
- }
+ if ((virXMLPropYesNo(node, "powerControl",
&def->data.vnc.powerControl)) < 0)
+ return -1;
def->data.vnc.keymap = virXMLPropString(node, "keymap");
--
2.26.2