[libvirt PATCH v2 02/24] cpu_x86: Ignore alias names
Daniel P. Berrangé
berrange at redhat.com
Mon Oct 31 09:36:34 UTC 2022
On Fri, Oct 28, 2022 at 05:06:33PM +0200, Tim Wiederhake wrote:
> A later patch will add alias names to the feature map. Ignore them for now.
>
> Signed-off-by: Tim Wiederhake <twiederh at redhat.com>
> Reviewed-by: Jiri Denemark <jdenemar at redhat.com>
> ---
> src/cpu/cpu_x86.c | 10 ++++++++--
> 1 file changed, 8 insertions(+), 2 deletions(-)
>
> diff --git a/src/cpu/cpu_x86.c b/src/cpu/cpu_x86.c
> index 4d2379803c..d2560de497 100644
> --- a/src/cpu/cpu_x86.c
> +++ b/src/cpu/cpu_x86.c
> @@ -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;
> + }
Please put a comment here describing that we're ignoring this because
it is only intended for use by the QEMU sync script.
With regards,
Daniel
--
|: https://berrange.com -o- https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org -o- https://fstop138.berrange.com :|
|: https://entangle-photo.org -o- https://www.instagram.com/dberrange :|
More information about the libvir-list
mailing list