]> git.ipfire.org Git - thirdparty/libvirt.git/commit
util: xml: Expose all arguments of virXMLParseHelper in virXMLParse macro
authorPeter Krempa <pkrempa@redhat.com>
Thu, 22 Sep 2022 12:30:53 +0000 (14:30 +0200)
committerPeter Krempa <pkrempa@redhat.com>
Thu, 6 Oct 2022 08:54:24 +0000 (10:54 +0200)
commit0c5378bc0745dd5518f5216271c19a0fd956ea43
treea17a7082cb4ad4c342e6b37c0f62c75703bf5c8b
parent0327bbb767dd9a8114d659c5f09c70edc3610b5a
util: xml: Expose all arguments of virXMLParseHelper in virXMLParse macro

The generic helper also has helper code to validate the root element and
create an XPath context. Many places in the code duplicate code for
doing these operations.

Extend the helper to provide all arguments and fix all callers.

In many cases this patch refactors the passing of the 'validate'
field into a separate variable to avoid quirky looking arguments.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
18 files changed:
src/conf/backup_conf.c
src/conf/checkpoint_conf.c
src/conf/domain_conf.c
src/conf/interface_conf.c
src/conf/network_conf.c
src/conf/node_device_conf.c
src/conf/nwfilter_conf.c
src/conf/secret_conf.c
src/conf/snapshot_conf.c
src/conf/storage_conf.c
src/conf/virnetworkportdef.c
src/conf/virnwfilterbindingdef.c
src/conf/virnwfilterbindingobj.c
src/test/test_driver.c
src/util/virxml.h
src/vbox/vbox_snapshot_conf.c
src/vz/vz_sdk.c
tests/qemuxml2argvtest.c