Following the domain XML naming Signed-off-by: Marc-André Lureau <marcandre.lureau@xxxxxxxxx> --- src/conf/domain_conf.c | 44 ++++++++++++++++++++++---------------------- src/conf/domain_conf.h | 4 ++-- src/vbox/vbox_common.c | 8 ++++---- src/vz/vz_sdk.c | 2 +- 4 files changed, 29 insertions(+), 29 deletions(-) diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index 616bf80..f501f14 100644 --- a/src/conf/domain_conf.c +++ b/src/conf/domain_conf.c @@ -11961,41 +11961,41 @@ virDomainVideoAccelDefParseXML(xmlNodePtr node) { xmlNodePtr cur; virDomainVideoAccelDefPtr def; - char *support3d = NULL; - char *support2d = NULL; + char *accel3d = NULL; + char *accel2d = NULL; cur = node->children; while (cur != NULL) { if (cur->type == XML_ELEMENT_NODE) { - if (!support3d && !support2d && + if (!accel3d && !accel2d && xmlStrEqual(cur->name, BAD_CAST "acceleration")) { - support3d = virXMLPropString(cur, "accel3d"); - support2d = virXMLPropString(cur, "accel2d"); + accel3d = virXMLPropString(cur, "accel3d"); + accel2d = virXMLPropString(cur, "accel2d"); } } cur = cur->next; } - if (!support3d && !support2d) + if (!accel3d && !accel2d) return NULL; if (VIR_ALLOC(def) < 0) return NULL; - if (support3d) { - if (STREQ(support3d, "yes")) - def->support3d = true; + if (accel3d) { + if (STREQ(accel3d, "yes")) + def->accel3d = true; else - def->support3d = false; - VIR_FREE(support3d); + def->accel3d = false; + VIR_FREE(accel3d); } - if (support2d) { - if (STREQ(support2d, "yes")) - def->support2d = true; + if (accel2d) { + if (STREQ(accel2d, "yes")) + def->accel2d = true; else - def->support2d = false; - VIR_FREE(support2d); + def->accel2d = false; + VIR_FREE(accel2d); } return def; @@ -17170,17 +17170,17 @@ virDomainVideoDefCheckABIStability(virDomainVideoDefPtr src, } if (src->accel) { - if (src->accel->support2d != dst->accel->support2d) { + if (src->accel->accel2d != dst->accel->accel2d) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, _("Target video card 2d accel %u does not match source %u"), - dst->accel->support2d, src->accel->support2d); + dst->accel->accel2d, src->accel->accel2d); return false; } - if (src->accel->support3d != dst->accel->support3d) { + if (src->accel->accel3d != dst->accel->accel3d) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, _("Target video card 3d accel %u does not match source %u"), - dst->accel->support3d, src->accel->support3d); + dst->accel->accel3d, src->accel->accel3d); return false; } } @@ -20838,9 +20838,9 @@ virDomainVideoAccelDefFormat(virBufferPtr buf, virDomainVideoAccelDefPtr def) { virBufferAsprintf(buf, "<acceleration accel3d='%s'", - def->support3d ? "yes" : "no"); + def->accel3d ? "yes" : "no"); virBufferAsprintf(buf, " accel2d='%s'", - def->support2d ? "yes" : "no"); + def->accel2d ? "yes" : "no"); virBufferAddLit(buf, "/>\n"); } diff --git a/src/conf/domain_conf.h b/src/conf/domain_conf.h index 8d43ee6..40ad68c 100644 --- a/src/conf/domain_conf.h +++ b/src/conf/domain_conf.h @@ -1382,8 +1382,8 @@ typedef enum { typedef struct _virDomainVideoAccelDef virDomainVideoAccelDef; typedef virDomainVideoAccelDef *virDomainVideoAccelDefPtr; struct _virDomainVideoAccelDef { - bool support3d; - bool support2d; + bool accel3d; + bool accel2d; }; diff --git a/src/vbox/vbox_common.c b/src/vbox/vbox_common.c index 3e6ed7a..4839a62 100644 --- a/src/vbox/vbox_common.c +++ b/src/vbox/vbox_common.c @@ -1554,10 +1554,10 @@ vboxAttachVideo(virDomainDefPtr def, IMachine *machine) gVBoxAPI.UIMachine.SetMonitorCount(machine, def->videos[0]->heads); if (def->videos[0]->accel) { gVBoxAPI.UIMachine.SetAccelerate3DEnabled(machine, - def->videos[0]->accel->support3d); + def->videos[0]->accel->accel3d); if (gVBoxAPI.accelerate2DVideo) gVBoxAPI.UIMachine.SetAccelerate2DVideoEnabled(machine, - def->videos[0]->accel->support2d); + def->videos[0]->accel->accel2d); } else { gVBoxAPI.UIMachine.SetAccelerate3DEnabled(machine, 0); if (gVBoxAPI.accelerate2DVideo) @@ -3277,8 +3277,8 @@ vboxDumpVideo(virDomainDefPtr def, vboxGlobalData *data ATTRIBUTE_UNUSED, def->videos[0]->vram = VRAMSize * 1024; def->videos[0]->heads = monitorCount; if (VIR_ALLOC(def->videos[0]->accel) >= 0) { - def->videos[0]->accel->support3d = accelerate3DEnabled; - def->videos[0]->accel->support2d = accelerate2DEnabled; + def->videos[0]->accel->accel3d = accelerate3DEnabled; + def->videos[0]->accel->accel2d = accelerate2DEnabled; } } } diff --git a/src/vz/vz_sdk.c b/src/vz/vz_sdk.c index 750133d..1fced3f 100644 --- a/src/vz/vz_sdk.c +++ b/src/vz/vz_sdk.c @@ -2320,7 +2320,7 @@ static int prlsdkCheckVideoUnsupportedParams(virDomainDefPtr def) return -1; } - if (v->accel != NULL && (v->accel->support2d || v->accel->support3d)) { + if (v->accel != NULL && (v->accel->accel2d || v->accel->accel3d)) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s", _("vz driver doesn't support " "setting video acceleration parameters.")); -- 2.5.0 -- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list