mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-02-01 17:35:17 +00:00
cpu_x86: Ignore alias names
A later patch will add alias names to the feature map. They will be used in virQEMUCapsCPUFeatureTranslate and for synchronizing the list with QEMU. Signed-off-by: Tim Wiederhake <twiederh@redhat.com> Reviewed-by: Jiri Denemark <jdenemar@redhat.com>
This commit is contained in:
parent
10a41a8cbd
commit
7b0c01db75
@ -1089,7 +1089,7 @@ static int
|
||||
x86ParseDataItemList(virCPUx86Data *cpudata,
|
||||
xmlNodePtr node)
|
||||
{
|
||||
size_t i;
|
||||
size_t i = 0;
|
||||
|
||||
if (xmlChildElementCount(node) <= 0) {
|
||||
virReportError(VIR_ERR_INTERNAL_ERROR, "%s", _("no x86 CPU data found"));
|
||||
@ -1097,9 +1097,14 @@ x86ParseDataItemList(virCPUx86Data *cpudata,
|
||||
}
|
||||
|
||||
node = xmlFirstElementChild(node);
|
||||
for (i = 0; node; ++i) {
|
||||
while (node) {
|
||||
virCPUx86DataItem item;
|
||||
|
||||
if (virXMLNodeNameEqual(node, "alias")) {
|
||||
node = xmlNextElementSibling(node);
|
||||
continue;
|
||||
}
|
||||
|
||||
if (virXMLNodeNameEqual(node, "cpuid")) {
|
||||
if (x86ParseCPUID(node, &item) < 0) {
|
||||
virReportError(VIR_ERR_INTERNAL_ERROR,
|
||||
@ -1116,6 +1121,7 @@ x86ParseDataItemList(virCPUx86Data *cpudata,
|
||||
|
||||
if (virCPUx86DataAddItem(cpudata, &item) < 0)
|
||||
return -1;
|
||||
++i;
|
||||
|
||||
node = xmlNextElementSibling(node);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user