From nobody Mon Feb 9 04:31:42 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.24 as permitted sender) client-ip=209.132.183.24; envelope-from=libvir-list-bounces@redhat.com; helo=mx3-phx2.redhat.com; Authentication-Results: mx.zoho.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.24 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; Return-Path: Received: from mx3-phx2.redhat.com (mx3-phx2.redhat.com [209.132.183.24]) by mx.zohomail.com with SMTPS id 1487859657526199.2864490760121; Thu, 23 Feb 2017 06:20:57 -0800 (PST) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by mx3-phx2.redhat.com (8.13.8/8.13.8) with ESMTP id v1NEHag6030317; Thu, 23 Feb 2017 09:17:36 -0500 Received: from int-mx14.intmail.prod.int.phx2.redhat.com (int-mx14.intmail.prod.int.phx2.redhat.com [10.5.11.27]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id v1NEFUF8022317 for ; Thu, 23 Feb 2017 09:15:30 -0500 Received: from virval.usersys.redhat.com (dhcp129-92.brq.redhat.com [10.34.129.92]) by int-mx14.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id v1NEFTKl023992 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO) for ; Thu, 23 Feb 2017 09:15:30 -0500 Received: by virval.usersys.redhat.com (Postfix, from userid 500) id 64FF610238A; Thu, 23 Feb 2017 15:15:27 +0100 (CET) From: Jiri Denemark To: libvir-list@redhat.com Date: Thu, 23 Feb 2017 15:15:04 +0100 Message-Id: In-Reply-To: References: In-Reply-To: References: Mail-Followup-To: libvir-list@redhat.com X-Scanned-By: MIMEDefang 2.68 on 10.5.11.27 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH v3 06/28] qemu: Rename hostCPU/feature element in capabilities cache X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" The element will be generalized in the following commits. Signed-off-by: Jiri Denemark --- Notes: Version 3: - s/featureNodes/nodes/ - drop s/supported/boolean/ change =20 Version 2: - no change src/qemu/qemu_capabilities.c | 16 +- tests/qemucapabilitiesdata/caps_2.8.0.s390x.xml | 30 +-- tests/qemucapabilitiesdata/caps_2.9.0.x86_64.xml | 322 +++++++++++--------= ---- 3 files changed, 184 insertions(+), 184 deletions(-) diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c index 29ca3d4f9..c5643f7a0 100644 --- a/src/qemu/qemu_capabilities.c +++ b/src/qemu/qemu_capabilities.c @@ -3158,7 +3158,7 @@ virQEMUCapsLoadHostCPUModelInfo(virQEMUCapsPtr qemuCa= ps, { char *str =3D NULL; xmlNodePtr hostCPUNode; - xmlNodePtr *featureNodes =3D NULL; + xmlNodePtr *nodes =3D NULL; xmlNodePtr oldnode =3D ctxt->node; qemuMonitorCPUModelInfoPtr hostCPU =3D NULL; int ret =3D -1; @@ -3182,25 +3182,25 @@ virQEMUCapsLoadHostCPUModelInfo(virQEMUCapsPtr qemu= Caps, =20 ctxt->node =3D hostCPUNode; =20 - if ((n =3D virXPathNodeSet("./feature", ctxt, &featureNodes)) > 0) { + if ((n =3D virXPathNodeSet("./property", ctxt, &nodes)) > 0) { if (VIR_ALLOC_N(hostCPU->props, n) < 0) goto cleanup; =20 hostCPU->nprops =3D n; =20 for (i =3D 0; i < n; i++) { - hostCPU->props[i].name =3D virXMLPropString(featureNodes[i], "= name"); + hostCPU->props[i].name =3D virXMLPropString(nodes[i], "name"); if (!hostCPU->props[i].name) { virReportError(VIR_ERR_INTERNAL_ERROR, "%s", _("missing 'name' attribute for a host CPU" - " model feature in QEMU capabilities cach= e")); + " model property in QEMU capabilities cac= he")); goto cleanup; } =20 - if (!(str =3D virXMLPropString(featureNodes[i], "supported")))= { + if (!(str =3D virXMLPropString(nodes[i], "supported"))) { virReportError(VIR_ERR_INTERNAL_ERROR, "%s", _("missing 'supported' attribute for a host= CPU" - " model feature in QEMU capabilities cach= e")); + " model property in QEMU capabilities cac= he")); goto cleanup; } if (STREQ(str, "yes")) { @@ -3223,7 +3223,7 @@ virQEMUCapsLoadHostCPUModelInfo(virQEMUCapsPtr qemuCa= ps, cleanup: ctxt->node =3D oldnode; VIR_FREE(str); - VIR_FREE(featureNodes); + VIR_FREE(nodes); qemuMonitorCPUModelInfoFree(hostCPU); return ret; } @@ -3554,7 +3554,7 @@ virQEMUCapsFormatHostCPUModelInfo(virQEMUCapsPtr qemu= Caps, virBufferAdjustIndent(buf, 2); =20 for (i =3D 0; i < model->nprops; i++) { - virBufferAsprintf(buf, "\n", + virBufferAsprintf(buf, "\n= ", model->props[i].name, model->props[i].supported ? "yes" : "no"); } diff --git a/tests/qemucapabilitiesdata/caps_2.8.0.s390x.xml b/tests/qemuca= pabilitiesdata/caps_2.8.0.s390x.xml index c4c9bf9d5..02e89c841 100644 --- a/tests/qemucapabilitiesdata/caps_2.8.0.s390x.xml +++ b/tests/qemucapabilitiesdata/caps_2.8.0.s390x.xml @@ -134,21 +134,21 @@ s390x - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + diff --git a/tests/qemucapabilitiesdata/caps_2.9.0.x86_64.xml b/tests/qemuc= apabilitiesdata/caps_2.9.0.x86_64.xml index 369e18ee1..0f19d5242 100644 --- a/tests/qemucapabilitiesdata/caps_2.9.0.x86_64.xml +++ b/tests/qemucapabilitiesdata/caps_2.9.0.x86_64.xml @@ -208,167 +208,167 @@ (v2.8.0-1428-g1b1a68c602) x86_64 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + --=20 2.11.1 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list