cpu: Change virCPUArchDataParse to take xmlNodePtr

The function does not need a full xmlXPathContextPtr any longer and a
later patch will require a call to this function with only a xmlNodePtr
available.

Signed-off-by: Tim Wiederhake <twiederh@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
This commit is contained in:
Tim Wiederhake 2021-10-13 12:53:43 +02:00
parent 0abc73665b
commit 6c72b352e5
3 changed files with 4 additions and 4 deletions

View File

@ -832,7 +832,7 @@ virCPUDataParse(const char *xmlStr)
return NULL;
}
data = driver->dataParse(ctxt);
data = driver->dataParse(ctxt->node);
return data;
}

View File

@ -98,7 +98,7 @@ typedef char *
(*virCPUArchDataFormat)(const virCPUData *data);
typedef virCPUData *
(*virCPUArchDataParse)(xmlXPathContextPtr ctxt);
(*virCPUArchDataParse)(xmlNodePtr node);
typedef int
(*virCPUArchGetModels)(char ***models);

View File

@ -1780,14 +1780,14 @@ virCPUx86DataFormat(const virCPUData *data)
static virCPUData *
virCPUx86DataParse(xmlXPathContextPtr ctxt)
virCPUx86DataParse(xmlNodePtr node)
{
g_autoptr(virCPUData) cpuData = NULL;
if (!(cpuData = virCPUDataNew(VIR_ARCH_X86_64)))
return NULL;
if (x86ParseDataItemList(&cpuData->data.x86, ctxt->node) < 0)
if (x86ParseDataItemList(&cpuData->data.x86, node) < 0)
return NULL;
return g_steal_pointer(&cpuData);