mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-07-31 14:07:16 +00:00
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:
parent
0abc73665b
commit
6c72b352e5
@ -832,7 +832,7 @@ virCPUDataParse(const char *xmlStr)
|
|||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
data = driver->dataParse(ctxt);
|
data = driver->dataParse(ctxt->node);
|
||||||
return data;
|
return data;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -98,7 +98,7 @@ typedef char *
|
|||||||
(*virCPUArchDataFormat)(const virCPUData *data);
|
(*virCPUArchDataFormat)(const virCPUData *data);
|
||||||
|
|
||||||
typedef virCPUData *
|
typedef virCPUData *
|
||||||
(*virCPUArchDataParse)(xmlXPathContextPtr ctxt);
|
(*virCPUArchDataParse)(xmlNodePtr node);
|
||||||
|
|
||||||
typedef int
|
typedef int
|
||||||
(*virCPUArchGetModels)(char ***models);
|
(*virCPUArchGetModels)(char ***models);
|
||||||
|
@ -1780,14 +1780,14 @@ virCPUx86DataFormat(const virCPUData *data)
|
|||||||
|
|
||||||
|
|
||||||
static virCPUData *
|
static virCPUData *
|
||||||
virCPUx86DataParse(xmlXPathContextPtr ctxt)
|
virCPUx86DataParse(xmlNodePtr node)
|
||||||
{
|
{
|
||||||
g_autoptr(virCPUData) cpuData = NULL;
|
g_autoptr(virCPUData) cpuData = NULL;
|
||||||
|
|
||||||
if (!(cpuData = virCPUDataNew(VIR_ARCH_X86_64)))
|
if (!(cpuData = virCPUDataNew(VIR_ARCH_X86_64)))
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
if (x86ParseDataItemList(&cpuData->data.x86, ctxt->node) < 0)
|
if (x86ParseDataItemList(&cpuData->data.x86, node) < 0)
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
return g_steal_pointer(&cpuData);
|
return g_steal_pointer(&cpuData);
|
||||||
|
Loading…
Reference in New Issue
Block a user