After the partial refactor in fdd06824e3a618ca33752e0439bbd5b2d9da1b0d
the function was left in a halfway state between the old parser style
and new one.
Try to improve it a bit, although the result is still not ideal.
Peter Krempa (37):
conf: domain: Register automatic pointer freeing for
virDomainActualNetDef
conf: domain: Automatically free 'def' and 'actual' in
virDomainNetDefParseXML
conf: domain: Remove 'error' label in virDomainNetDefParseXML
virDomainNetDefParseXML: Remove unnecessary temporary variables
virDomainNetDefParseXML: Separate and localize parsing of
'backend/@vhost'
virDomainNetDefParseXML: Split out parsing of 'driver' subelement
virDomainNetDefParseXML: Use virXMLPropEnumDefault for parsing
'def->type'
virDomainNetIPInfoParseXML: Remove pointless automatic clearing of
'route' and 'ip'
virDomainNetIPInfoParseXML: Don't VIR_FREE and overwrite autofreed
'nodes'
virDomainNetIPInfoParseXML: Simplify cleanup
virDomainNetIPInfoParseXML: Don't force callers to set proper
'ctxt->node'
util: xml: Introduce virXMLPropUUID
util: xml: Adjust documentation of virXMLPropString
util: xml: Introduce virXMLPropStringRequired
virDomainNetDefParseXML: Convert parsing of 'source_node' to a
switch() statement
virDomainNetDefParseXML: Refactor parsing of data for
VIR_DOMAIN_NET_TYPE_NETWORK
util: xml: Introduce virXMLPropLongLong
virDomainNetDefParseXML: Refactor parsing of data for
VIR_DOMAIN_NET_TYPE_VDS
virDomainNetDefParseXML: Refactor parsing of data for
VIR_DOMAIN_NET_TYPE_INTERNAL
virDomainNetDefParseXML: Refactor parsing of data for
VIR_DOMAIN_NET_TYPE_BRIDGE
conf: domain: Convert 'mode' field of the 'direct' type of
virDomainNetDef to proper type
virDomainNetDefParseXML: Refactor parsing of data for
VIR_DOMAIN_NET_TYPE_DIRECT
virDomainNetDefParseXML: Extract network device model earlier
conf: domain: Move 'virDomainChrSourceReconnectDefParseXML'
virDomainNetDefParseXML: Refactor parsing of data for
VIR_DOMAIN_NET_TYPE_VHOSTUSER
virDomainNetDefParseXML: Refactor parsing of data for
VIR_DOMAIN_NET_TYPE_VDPA
util: xml: Introduce VIR_XPATH_NODE_AUTORESTORE_NAME
virDomainNetDefParseXML: Refactor parsing of data for
VIR_DOMAIN_NET_TYPE_UDP/MCAST/SERVER/CLIENT
virDomainNetDefParseXML: Refactor parsing of data for
VIR_DOMAIN_NET_TYPE_HOSTDEV
conf: domain: Move prue validation code from virDomainNetDefParseXML
to virDomainNetDefValidate
virDomainNetDefParseXML: Refactor parsing of <virtualport>
virDomainNetDef: Use virTristateBool for 'managed_tap' instead of int
virDomainNetDefParseXML: Refactor parsing of <target> subelement
virDomainNetDefParseXML: Refactor parsing of <filterref>
virDomainNetDefParseXML: Don't overload 'node' variable when parsing
<coalesce>
virDomainNetDefParseXML: Parse attributes of <mac> only when present
virDomainNetDefParseXML: Drop prehistoric error workaround
src/conf/domain_conf.c | 1118 +++++++++++++++---------------------
src/conf/domain_conf.h | 5 +-
src/conf/domain_validate.c | 34 ++
src/libvirt_private.syms | 3 +
src/util/virxml.c | 139 ++++-
src/util/virxml.h | 39 +-
6 files changed, 683 insertions(+), 655 deletions(-)
--
2.37.1