mirror of
https://github.com/libvirt/libvirt.git
synced 2025-02-25 18:55:26 -06:00
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: Jiri Denemark <jdenemar@redhat.com>
This commit is contained in:
parent
2a978269fc
commit
e841a41169
@ -230,7 +230,7 @@ virCPUDefCopy(const virCPUDef *cpu)
|
|||||||
virCPUDefPtr
|
virCPUDefPtr
|
||||||
virCPUDefParseXML(xmlNodePtr node,
|
virCPUDefParseXML(xmlNodePtr node,
|
||||||
xmlXPathContextPtr ctxt,
|
xmlXPathContextPtr ctxt,
|
||||||
virCPUType mode)
|
virCPUType type)
|
||||||
{
|
{
|
||||||
virCPUDefPtr def;
|
virCPUDefPtr def;
|
||||||
xmlNodePtr *nodes = NULL;
|
xmlNodePtr *nodes = NULL;
|
||||||
@ -250,7 +250,7 @@ virCPUDefParseXML(xmlNodePtr node,
|
|||||||
if (VIR_ALLOC(def) < 0)
|
if (VIR_ALLOC(def) < 0)
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
if (mode == VIR_CPU_TYPE_AUTO) {
|
if (type == VIR_CPU_TYPE_AUTO) {
|
||||||
if (virXPathBoolean("boolean(./arch)", ctxt)) {
|
if (virXPathBoolean("boolean(./arch)", ctxt)) {
|
||||||
if (virXPathBoolean("boolean(./@match)", ctxt)) {
|
if (virXPathBoolean("boolean(./@match)", ctxt)) {
|
||||||
virReportError(VIR_ERR_XML_ERROR, "%s",
|
virReportError(VIR_ERR_XML_ERROR, "%s",
|
||||||
@ -263,7 +263,7 @@ virCPUDefParseXML(xmlNodePtr node,
|
|||||||
def->type = VIR_CPU_TYPE_GUEST;
|
def->type = VIR_CPU_TYPE_GUEST;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
def->type = mode;
|
def->type = type;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((cpuMode = virXMLPropString(node, "mode"))) {
|
if ((cpuMode = virXMLPropString(node, "mode"))) {
|
||||||
|
Loading…
Reference in New Issue
Block a user