提交 e841a411 编写于 作者: J Jiri Denemark

conf: Rename mode parameter in virCPUDefParseXML

The type of this parameter is virCPUType so calling it 'mode' is pretty
strange, 'type' is a much better name.
Signed-off-by: NJiri Denemark <jdenemar@redhat.com>
上级 2a978269
......@@ -230,7 +230,7 @@ virCPUDefCopy(const virCPUDef *cpu)
virCPUDefPtr
virCPUDefParseXML(xmlNodePtr node,
xmlXPathContextPtr ctxt,
virCPUType mode)
virCPUType type)
{
virCPUDefPtr def;
xmlNodePtr *nodes = NULL;
......@@ -250,7 +250,7 @@ virCPUDefParseXML(xmlNodePtr node,
if (VIR_ALLOC(def) < 0)
return NULL;
if (mode == VIR_CPU_TYPE_AUTO) {
if (type == VIR_CPU_TYPE_AUTO) {
if (virXPathBoolean("boolean(./arch)", ctxt)) {
if (virXPathBoolean("boolean(./@match)", ctxt)) {
virReportError(VIR_ERR_XML_ERROR, "%s",
......@@ -263,7 +263,7 @@ virCPUDefParseXML(xmlNodePtr node,
def->type = VIR_CPU_TYPE_GUEST;
}
} else {
def->type = mode;
def->type = type;
}
if ((cpuMode = virXMLPropString(node, "mode"))) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册