From nobody Wed Dec 17 04:18:12 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; envelope-from=libvir-list-bounces@redhat.com; helo=mx1.redhat.com; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 150288727834927.336807302511602; Wed, 16 Aug 2017 05:41:18 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 731077790E; Wed, 16 Aug 2017 12:41:16 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 4D55E60631; Wed, 16 Aug 2017 12:41:16 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id F0990180610F; Wed, 16 Aug 2017 12:41:15 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id v7GCew9l021777 for ; Wed, 16 Aug 2017 08:40:58 -0400 Received: by smtp.corp.redhat.com (Postfix) id 741687D971; Wed, 16 Aug 2017 12:40:58 +0000 (UTC) Received: from antique-work.brq.redhat.com (unknown [10.43.2.152]) by smtp.corp.redhat.com (Postfix) with ESMTP id EF6467D57E for ; Wed, 16 Aug 2017 12:40:57 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 731077790E Authentication-Results: ext-mx02.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx02.extmail.prod.ext.phx2.redhat.com; spf=fail smtp.mailfrom=libvir-list-bounces@redhat.com From: Pavel Hrdina To: libvir-list@redhat.com Date: Wed, 16 Aug 2017 14:40:46 +0200 Message-Id: In-Reply-To: References: In-Reply-To: References: X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH 09/10] conf: use virXMLNodeContentString for boot options parsing 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-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.26]); Wed, 16 Aug 2017 12:41:16 +0000 (UTC) X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" Using XPath here doesn't add any benefit. Signed-off-by: Pavel Hrdina --- src/conf/domain_conf.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index ea293b9f02..db042e5dc1 100644 --- a/src/conf/domain_conf.c +++ b/src/conf/domain_conf.c @@ -17062,7 +17062,6 @@ virDomainDefParseBootOptions(virDomainDefPtr def, virHashTablePtr *bootHash) { xmlNodePtr *nodes =3D NULL; - xmlNodePtr oldnode; char *tmp =3D NULL; char *name =3D NULL; int ret =3D -1; @@ -17169,8 +17168,6 @@ virDomainDefParseBootOptions(virDomainDefPtr def, } =20 if (n =3D=3D 1) { - oldnode =3D ctxt->node; - ctxt->node =3D nodes[0]; tmp =3D virXMLPropString(nodes[0], "type"); =20 if (!tmp) { @@ -17181,7 +17178,7 @@ virDomainDefParseBootOptions(virDomainDefPtr def, =20 if (STREQ_NULLABLE(tmp, "slic")) { VIR_FREE(tmp); - tmp =3D virXPathString("string(.)", ctxt); + tmp =3D virXMLNodeContentString(nodes[0]); def->os.slic_table =3D virFileSanitizePath(tmp); VIR_FREE(tmp); } else { @@ -17190,7 +17187,6 @@ virDomainDefParseBootOptions(virDomainDefPtr def, tmp); goto error; } - ctxt->node =3D oldnode; } =20 if (virDomainDefParseBootXML(ctxt, def) < 0) --=20 2.13.5 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list