From nobody Tue Feb 10 09:24:31 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) client-ip=170.10.133.124; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1628685571; cv=none; d=zohomail.com; s=zohoarc; b=JZ8xWzGu2n/+pOmNRSb4HJ4B2RZS1YdSZukkH3RvSxmZvLwVg4E2jt8Uexe+epEOsT4Vz5OUuxhB0k2hePo03uVw3itijSX44DoB4B5S6RpdTTmvn7To58ko3bObaCxqmt5YUsRi6YrtSgkqnjJ0cD6IWfL7siGxH4j70xJAAVA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1628685571; h=Content-Type:Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=odW0badMs6ocvGl0H74dlV3vuFKBfIZhCfwIX0vK03M=; b=WfkYz9+d6E0UVq9KNdQC3TxeoIx0efNv1rn81CkNuiGUR3OF8fA+e2Q64wls7ArQutab3P2U78Yougd+Mti9lC1JmF41OBpyaIfD1FoKgA5RR3fyg8mCLaeqylz374ejffJ1BoPi2yCfbXnLqO/ZAnKHKzz+GBcg0t4nC4wFeEI= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mx.zohomail.com with SMTPS id 1628685570602519.6092333713357; Wed, 11 Aug 2021 05:39:30 -0700 (PDT) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-44-sIxqB3mvPCCm9heYewuBgg-1; Wed, 11 Aug 2021 08:39:28 -0400 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 24BC018C89DC; Wed, 11 Aug 2021 12:39:23 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 12B5D5D740; Wed, 11 Aug 2021 12:39:22 +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 9D26D4A700; Wed, 11 Aug 2021 12:39:21 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 17BCbdJo020047 for ; Wed, 11 Aug 2021 08:37:39 -0400 Received: by smtp.corp.redhat.com (Postfix) id ECE7881F76; Wed, 11 Aug 2021 12:37:39 +0000 (UTC) Received: from localhost.localdomain.com (unknown [10.43.2.2]) by smtp.corp.redhat.com (Postfix) with ESMTP id 7402481F78 for ; Wed, 11 Aug 2021 12:37:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1628685569; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=odW0badMs6ocvGl0H74dlV3vuFKBfIZhCfwIX0vK03M=; b=WEVTwf4pG4uFuQdqQphfqYEQ2kSR1JioFJwgWDX3v23E6YPAw2ep/27SPNdktszs67ljST uOjjVEUeZl66cXeIUresgeYcrHeokVzunNaqE1oZZ+Dv3Te04r+bBjl2Rn7Op3NNlekdh+ sZwqHAcEEtxDHWKoNouI5zWJMzknIzs= X-MC-Unique: sIxqB3mvPCCm9heYewuBgg-1 From: Kristina Hanicova To: libvir-list@redhat.com Subject: [PATCH 1/5] src: add 'schema' and 'validate' variable to virXMLParseHelper() Date: Wed, 11 Aug 2021 14:36:44 +0200 Message-Id: In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-loop: libvir-list@redhat.com 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: , Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=libvir-list-bounces@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1628685571511100001 Content-Type: text/plain; charset="utf-8" Signed-off-by: Kristina Hanicova --- src/conf/backup_conf.c | 2 +- src/conf/checkpoint_conf.c | 2 +- src/conf/domain_conf.c | 2 +- src/conf/interface_conf.c | 2 +- src/conf/network_conf.c | 2 +- src/conf/node_device_conf.c | 2 +- src/conf/nwfilter_conf.c | 2 +- src/conf/secret_conf.c | 2 +- src/conf/snapshot_conf.c | 2 +- src/conf/storage_conf.c | 4 ++-- src/conf/virnetworkportdef.c | 2 +- src/conf/virnwfilterbindingdef.c | 2 +- src/conf/virnwfilterbindingobj.c | 2 +- src/test/test_driver.c | 2 +- src/util/virxml.c | 6 +++++- src/util/virxml.h | 20 +++++++++++--------- src/vbox/vbox_snapshot_conf.c | 6 +++--- src/vz/vz_sdk.c | 2 +- tests/qemuxml2argvtest.c | 2 +- 19 files changed, 36 insertions(+), 30 deletions(-) diff --git a/src/conf/backup_conf.c b/src/conf/backup_conf.c index ac92bd4f26..9307357d84 100644 --- a/src/conf/backup_conf.c +++ b/src/conf/backup_conf.c @@ -281,7 +281,7 @@ virDomainBackupDefParseString(const char *xmlStr, g_autoptr(xmlDoc) xml =3D NULL; int keepBlanksDefault =3D xmlKeepBlanksDefault(0); =20 - if ((xml =3D virXMLParse(NULL, xmlStr, _("(domain_backup)")))) { + if ((xml =3D virXMLParse(NULL, xmlStr, _("(domain_backup)"), NULL, fal= se))) { xmlKeepBlanksDefault(keepBlanksDefault); ret =3D virDomainBackupDefParseNode(xml, xmlDocGetRootElement(xml), xmlopt, flags); diff --git a/src/conf/checkpoint_conf.c b/src/conf/checkpoint_conf.c index 7b26da416b..dd0e6035fa 100644 --- a/src/conf/checkpoint_conf.c +++ b/src/conf/checkpoint_conf.c @@ -226,7 +226,7 @@ virDomainCheckpointDefParseString(const char *xmlStr, xmlDocPtr xml; int keepBlanksDefault =3D xmlKeepBlanksDefault(0); =20 - if ((xml =3D virXMLParse(NULL, xmlStr, _("(domain_checkpoint)")))) { + if ((xml =3D virXMLParse(NULL, xmlStr, _("(domain_checkpoint)"), NULL,= false))) { xmlKeepBlanksDefault(keepBlanksDefault); ret =3D virDomainCheckpointDefParseNode(xml, xmlDocGetRootElement(= xml), xmlopt, parseOpaque, flags); diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index 15452ef6fc..b996a0cc3c 100644 --- a/src/conf/domain_conf.c +++ b/src/conf/domain_conf.c @@ -20400,7 +20400,7 @@ virDomainDefParse(const char *xmlStr, virDomainDef *def =3D NULL; int keepBlanksDefault =3D xmlKeepBlanksDefault(0); xmlNodePtr root; - if (!(xml =3D virXMLParse(filename, xmlStr, _("(domain_definition)")))) + if (!(xml =3D virXMLParse(filename, xmlStr, _("(domain_definition)"), = NULL, false))) goto cleanup; =20 root =3D xmlDocGetRootElement(xml); diff --git a/src/conf/interface_conf.c b/src/conf/interface_conf.c index d84ec66def..c4b763d0de 100644 --- a/src/conf/interface_conf.c +++ b/src/conf/interface_conf.c @@ -824,7 +824,7 @@ virInterfaceDefParse(const char *xmlStr, xmlDocPtr xml; virInterfaceDef *def =3D NULL; =20 - if ((xml =3D virXMLParse(filename, xmlStr, _("(interface_definition)")= ))) { + if ((xml =3D virXMLParse(filename, xmlStr, _("(interface_definition)")= , NULL, false))) { def =3D virInterfaceDefParseNode(xml, xmlDocGetRootElement(xml)); xmlFreeDoc(xml); } diff --git a/src/conf/network_conf.c b/src/conf/network_conf.c index e34ac52a68..fbd939a1f1 100644 --- a/src/conf/network_conf.c +++ b/src/conf/network_conf.c @@ -2091,7 +2091,7 @@ virNetworkDefParse(const char *xmlStr, virNetworkDef *def =3D NULL; int keepBlanksDefault =3D xmlKeepBlanksDefault(0); =20 - if ((xml =3D virXMLParse(filename, xmlStr, _("(network_definition)")))) + if ((xml =3D virXMLParse(filename, xmlStr, _("(network_definition)"), = NULL, false))) def =3D virNetworkDefParseNode(xml, xmlDocGetRootElement(xml), xml= opt); =20 xmlKeepBlanksDefault(keepBlanksDefault); diff --git a/src/conf/node_device_conf.c b/src/conf/node_device_conf.c index d6093f4aa9..bda1a11b37 100644 --- a/src/conf/node_device_conf.c +++ b/src/conf/node_device_conf.c @@ -2177,7 +2177,7 @@ virNodeDeviceDefParse(const char *str, xmlDocPtr xml; g_autoptr(virNodeDeviceDef) def =3D NULL; =20 - if ((xml =3D virXMLParse(filename, str, _("(node_device_definition)"))= )) { + if ((xml =3D virXMLParse(filename, str, _("(node_device_definition)"),= NULL, false))) { def =3D virNodeDeviceDefParseNode(xml, xmlDocGetRootElement(xml), create, virt_type); xmlFreeDoc(xml); diff --git a/src/conf/nwfilter_conf.c b/src/conf/nwfilter_conf.c index fc81fd97ea..b7adae7161 100644 --- a/src/conf/nwfilter_conf.c +++ b/src/conf/nwfilter_conf.c @@ -2744,7 +2744,7 @@ virNWFilterDefParse(const char *xmlStr, virNWFilterDef *def =3D NULL; xmlDocPtr xml; =20 - if ((xml =3D virXMLParse(filename, xmlStr, _("(nwfilter_definition)"))= )) { + if ((xml =3D virXMLParse(filename, xmlStr, _("(nwfilter_definition)"),= NULL, false))) { def =3D virNWFilterDefParseNode(xml, xmlDocGetRootElement(xml)); xmlFreeDoc(xml); } diff --git a/src/conf/secret_conf.c b/src/conf/secret_conf.c index 7bfdc58b83..5968b4365c 100644 --- a/src/conf/secret_conf.c +++ b/src/conf/secret_conf.c @@ -196,7 +196,7 @@ virSecretDefParse(const char *xmlStr, xmlDocPtr xml; virSecretDef *ret =3D NULL; =20 - if ((xml =3D virXMLParse(filename, xmlStr, _("(definition_of_secret)")= ))) { + if ((xml =3D virXMLParse(filename, xmlStr, _("(definition_of_secret)")= , NULL, false))) { ret =3D secretXMLParseNode(xml, xmlDocGetRootElement(xml)); xmlFreeDoc(xml); } diff --git a/src/conf/snapshot_conf.c b/src/conf/snapshot_conf.c index 0592640dd9..3282627044 100644 --- a/src/conf/snapshot_conf.c +++ b/src/conf/snapshot_conf.c @@ -462,7 +462,7 @@ virDomainSnapshotDefParseString(const char *xmlStr, xmlDocPtr xml; int keepBlanksDefault =3D xmlKeepBlanksDefault(0); =20 - if ((xml =3D virXMLParse(NULL, xmlStr, _("(domain_snapshot)")))) { + if ((xml =3D virXMLParse(NULL, xmlStr, _("(domain_snapshot)"), NULL, f= alse))) { xmlKeepBlanksDefault(keepBlanksDefault); ret =3D virDomainSnapshotDefParseNode(xml, xmlDocGetRootElement(xm= l), xmlopt, parseOpaque, diff --git a/src/conf/storage_conf.c b/src/conf/storage_conf.c index ad2eb66417..e72e8d0ade 100644 --- a/src/conf/storage_conf.c +++ b/src/conf/storage_conf.c @@ -1009,7 +1009,7 @@ virStoragePoolDefParse(const char *xmlStr, virStoragePoolDef *ret =3D NULL; xmlDocPtr xml; =20 - if ((xml =3D virXMLParse(filename, xmlStr, _("(storage_pool_definition= )")))) { + if ((xml =3D virXMLParse(filename, xmlStr, _("(storage_pool_definition= )"), NULL, false))) { ret =3D virStoragePoolDefParseNode(xml, xmlDocGetRootElement(xml)); xmlFreeDoc(xml); } @@ -1478,7 +1478,7 @@ virStorageVolDefParse(virStoragePoolDef *pool, virStorageVolDef *ret =3D NULL; xmlDocPtr xml; =20 - if ((xml =3D virXMLParse(filename, xmlStr, _("(storage_volume_definiti= on)")))) { + if ((xml =3D virXMLParse(filename, xmlStr, _("(storage_volume_definiti= on)"), NULL, false))) { ret =3D virStorageVolDefParseNode(pool, xml, xmlDocGetRootElement(= xml), flags); xmlFreeDoc(xml); } diff --git a/src/conf/virnetworkportdef.c b/src/conf/virnetworkportdef.c index adda66590a..9c2a6298d2 100644 --- a/src/conf/virnetworkportdef.c +++ b/src/conf/virnetworkportdef.c @@ -297,7 +297,7 @@ virNetworkPortDefParse(const char *xmlStr, virNetworkPortDef *def =3D NULL; xmlDocPtr xml; =20 - if ((xml =3D virXMLParse(filename, xmlStr, _("(networkport_definition)= ")))) { + if ((xml =3D virXMLParse(filename, xmlStr, _("(networkport_definition)= "), NULL, false))) { def =3D virNetworkPortDefParseNode(xml, xmlDocGetRootElement(xml)); xmlFreeDoc(xml); } diff --git a/src/conf/virnwfilterbindingdef.c b/src/conf/virnwfilterbinding= def.c index 22ecf7b828..4079fcdba4 100644 --- a/src/conf/virnwfilterbindingdef.c +++ b/src/conf/virnwfilterbindingdef.c @@ -188,7 +188,7 @@ virNWFilterBindingDefParse(const char *xmlStr, virNWFilterBindingDef *def =3D NULL; xmlDocPtr xml; =20 - if ((xml =3D virXMLParse(filename, xmlStr, _("(nwfilterbinding_definit= ion)")))) { + if ((xml =3D virXMLParse(filename, xmlStr, _("(nwfilterbinding_definit= ion)"), NULL, false))) { def =3D virNWFilterBindingDefParseNode(xml, xmlDocGetRootElement(x= ml)); xmlFreeDoc(xml); } diff --git a/src/conf/virnwfilterbindingobj.c b/src/conf/virnwfilterbinding= obj.c index d48c95af88..11426e0a4d 100644 --- a/src/conf/virnwfilterbindingobj.c +++ b/src/conf/virnwfilterbindingobj.c @@ -265,7 +265,7 @@ virNWFilterBindingObjParse(const char *xmlStr, virNWFilterBindingObj *obj =3D NULL; xmlDocPtr xml; =20 - if ((xml =3D virXMLParse(filename, xmlStr, _("(nwfilterbinding_status)= ")))) { + if ((xml =3D virXMLParse(filename, xmlStr, _("(nwfilterbinding_status)= "), NULL, false))) { obj =3D virNWFilterBindingObjParseNode(xml, xmlDocGetRootElement(x= ml)); xmlFreeDoc(xml); } diff --git a/src/test/test_driver.c b/src/test/test_driver.c index 7c3bb70be3..00cc13511a 100644 --- a/src/test/test_driver.c +++ b/src/test/test_driver.c @@ -832,7 +832,7 @@ testParseXMLDocFromFile(xmlNodePtr node, const char *fi= le, const char *type) if ((relFile =3D virXMLPropString(node, "file"))) { absFile =3D testBuildFilename(file, relFile); =20 - if (!(doc =3D virXMLParse(absFile, NULL, type))) + if (!(doc =3D virXMLParse(absFile, NULL, type, NULL, false))) goto error; =20 ret =3D xmlCopyNode(xmlDocGetRootElement(doc), 1); diff --git a/src/util/virxml.c b/src/util/virxml.c index 4360b15486..0220c5906f 100644 --- a/src/util/virxml.c +++ b/src/util/virxml.c @@ -1096,6 +1096,8 @@ catchXMLError(void *ctx, const char *msg G_GNUC_UNUSE= D, ...) * @url: URL of XML document for string parser * @rootelement: Optional name of the expected root element * @ctxt: optional pointer to populate with new context pointer + * @schemafile: unused + * @validate: unused * * Parse XML document provided either as a file or a string. The function * guarantees that the XML document contains a root element. @@ -1111,7 +1113,9 @@ virXMLParseHelper(int domcode, const char *xmlStr, const char *url, const char *rootelement, - xmlXPathContextPtr *ctxt) + xmlXPathContextPtr *ctxt, + const char *schemafile G_GNUC_UNUSED, + bool validate G_GNUC_UNUSED) { struct virParserData private; g_autoptr(xmlParserCtxt) pctxt =3D NULL; diff --git a/src/util/virxml.h b/src/util/virxml.h index 0bb0d1c118..e9359b1ef1 100644 --- a/src/util/virxml.h +++ b/src/util/virxml.h @@ -170,7 +170,9 @@ virXMLParseHelper(int domcode, const char *xmlStr, const char *url, const char *rootelement, - xmlXPathContextPtr *ctxt); + xmlXPathContextPtr *ctxt, + const char *schemafile, + bool validate); =20 const char * virXMLPickShellSafeComment(const char *str1, @@ -185,8 +187,8 @@ virXMLPickShellSafeComment(const char *str1, * * Return the parsed document object, or NULL on failure. */ -#define virXMLParse(filename, xmlStr, url) \ - virXMLParseHelper(VIR_FROM_THIS, filename, xmlStr, url, NULL, NULL) +#define virXMLParse(filename, xmlStr, url, schemafile, validate) \ + virXMLParseHelper(VIR_FROM_THIS, filename, xmlStr, url, NULL, NULL, sc= hemafile, validate) =20 /** * virXMLParseString: @@ -198,7 +200,7 @@ virXMLPickShellSafeComment(const char *str1, * Return the parsed document object, or NULL on failure. */ #define virXMLParseString(xmlStr, url) \ - virXMLParseHelper(VIR_FROM_THIS, NULL, xmlStr, url, NULL, NULL) + virXMLParseHelper(VIR_FROM_THIS, NULL, xmlStr, url, NULL, NULL, NULL, = false) =20 /** * virXMLParseFile: @@ -209,7 +211,7 @@ virXMLPickShellSafeComment(const char *str1, * Return the parsed document object, or NULL on failure. */ #define virXMLParseFile(filename) \ - virXMLParseHelper(VIR_FROM_THIS, filename, NULL, NULL, NULL, NULL) + virXMLParseHelper(VIR_FROM_THIS, filename, NULL, NULL, NULL, NULL, NUL= L, false) =20 /** * virXMLParseCtxt: @@ -224,7 +226,7 @@ virXMLPickShellSafeComment(const char *str1, * Return the parsed document object, or NULL on failure. */ #define virXMLParseCtxt(filename, xmlStr, url, pctxt) \ - virXMLParseHelper(VIR_FROM_THIS, filename, xmlStr, url, NULL, pctxt) + virXMLParseHelper(VIR_FROM_THIS, filename, xmlStr, url, NULL, pctxt, N= ULL, false) =20 /** * virXMLParseStringCtxt: @@ -238,11 +240,11 @@ virXMLPickShellSafeComment(const char *str1, * Return the parsed document object, or NULL on failure. */ #define virXMLParseStringCtxt(xmlStr, url, pctxt) \ - virXMLParseHelper(VIR_FROM_THIS, NULL, xmlStr, url, NULL, pctxt) + virXMLParseHelper(VIR_FROM_THIS, NULL, xmlStr, url, NULL, pctxt, NULL,= false) =20 /* virXMLParseStringCtxtRoot is same as above, except it also validates ro= ot node name */ #define virXMLParseStringCtxtRoot(xmlStr, url, rootnode, pctxt) \ - virXMLParseHelper(VIR_FROM_THIS, NULL, xmlStr, url, rootnode, pctxt) + virXMLParseHelper(VIR_FROM_THIS, NULL, xmlStr, url, rootnode, pctxt, N= ULL, false) =20 /** * virXMLParseFileCtxt: @@ -255,7 +257,7 @@ virXMLPickShellSafeComment(const char *str1, * Return the parsed document object, or NULL on failure. */ #define virXMLParseFileCtxt(filename, pctxt) \ - virXMLParseHelper(VIR_FROM_THIS, filename, NULL, NULL, NULL, pctxt) + virXMLParseHelper(VIR_FROM_THIS, filename, NULL, NULL, NULL, pctxt, NU= LL, false) =20 int virXMLSaveFile(const char *path, diff --git a/src/vbox/vbox_snapshot_conf.c b/src/vbox/vbox_snapshot_conf.c index f7423f60fc..7fb97d49d9 100644 --- a/src/vbox/vbox_snapshot_conf.c +++ b/src/vbox/vbox_snapshot_conf.c @@ -593,7 +593,7 @@ virVBoxSnapshotConfLoadVboxFile(const char *filePath, =20 machineDescription =3D g_new0(virVBoxSnapshotConfMachine, 1); =20 - xml =3D virXMLParse(filePath, NULL, NULL); + xml =3D virXMLParse(filePath, NULL, NULL, NULL, false); if (xml =3D=3D NULL) { virReportError(VIR_ERR_XML_ERROR, "%s", _("Unable to parse the xml")); @@ -1230,7 +1230,7 @@ virVBoxSnapshotConfGetRWDisksPathsFromLibvirtXML(cons= t char *filePath, _("filePath is null")); goto cleanup; } - xml =3D virXMLParse(filePath, NULL, NULL); + xml =3D virXMLParse(filePath, NULL, NULL, NULL, false); if (xml =3D=3D NULL) { virReportError(VIR_ERR_XML_ERROR, "%s", _("Unable to parse the xml")); @@ -1292,7 +1292,7 @@ virVBoxSnapshotConfGetRODisksPathsFromLibvirtXML(cons= t char *filePath, _("filePath is null")); goto cleanup; } - xml =3D virXMLParse(filePath, NULL, NULL); + xml =3D virXMLParse(filePath, NULL, NULL, NULL, false); if (xml =3D=3D NULL) { virReportError(VIR_ERR_XML_ERROR, "%s", _("Unable to parse the xml")); diff --git a/src/vz/vz_sdk.c b/src/vz/vz_sdk.c index 26a3acb386..6d3a873158 100644 --- a/src/vz/vz_sdk.c +++ b/src/vz/vz_sdk.c @@ -4595,7 +4595,7 @@ prlsdkParseSnapshotTree(const char *treexml) if (*treexml =3D=3D '\0') return snapshots; =20 - if (!(xml =3D virXMLParse(NULL, treexml, _("(snapshot_tree)")))) + if (!(xml =3D virXMLParse(NULL, treexml, _("(snapshot_tree)"), NULL, f= alse))) goto cleanup; =20 root =3D xmlDocGetRootElement(xml); diff --git a/tests/qemuxml2argvtest.c b/tests/qemuxml2argvtest.c index b552f5deed..2754a8a780 100644 --- a/tests/qemuxml2argvtest.c +++ b/tests/qemuxml2argvtest.c @@ -678,7 +678,7 @@ testCompareXMLToArgv(const void *data) if (testCheckExclusiveFlags(info->flags) < 0) goto cleanup; =20 - if (!(xml =3D virXMLParse(info->infile, NULL, "(domain_definition)"))) + if (!(xml =3D virXMLParse(info->infile, NULL, "(domain_definition)", N= ULL, false))) goto cleanup; =20 root =3D xmlDocGetRootElement(xml); --=20 2.31.1