[PATCH 00/12] Remove virXMLPropStringLimit and virXPathStringLimit

Peter Krempa posted 12 patches 1 week, 6 days ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/libvirt tags/patchew/cover.1637600984.git.pkrempa@redhat.com
src/conf/domain_conf.c          | 104 +++++++++++++++-----------------
src/conf/node_device_conf.c     |   6 +-
src/libvirt_private.syms        |   2 -
src/security/security_selinux.c |   3 +-
src/util/virseclabel.h          |   6 +-
src/util/virxml.c               |  62 -------------------
src/util/virxml.h               |   8 ---
7 files changed, 59 insertions(+), 132 deletions(-)

[PATCH 00/12] Remove virXMLPropStringLimit and virXPathStringLimit

Posted by Peter Krempa 1 week, 6 days ago
The functions have API which is impossible to be use correctly by
callers. Refactor callers and remove the functions.

Note that this patchset preserves semantics of the callers (except for
removing duplicate or ignored errors). Some of the callers look fishy,
but that is not addressed here.

Peter Krempa (12):
  util: seclabel: Define autoptr cleanup func for virSecurityLabelDef
    and virSecurityDeviceLabelDef
  virSecurityLabelDef: Declare 'type' as 'virDomainSeclabelType'
  virSecurityLabelDefParseXML: Directly assign strings into appropriate
    variables
  virSecurityLabelDefParseXML: Don't reuse temporary string 'p'
  virSecurityLabelDefParseXML: Use automatic freeing for 'seclabel'
  virSecurityLabelDefParseXML: Remove pointless 'error' label
  virNodeDeviceCapVPDParseCustomFields: Don't use 'virXPathStringLimit'
  virSecurityLabelDefParseXML: Don't use 'virXPathStringLimit'
  virSecurityDeviceLabelDefParseXML: Use automatic memory clearing for
    temp strings
  virSecurityDeviceLabelDefParseXML: Don't use 'virXPathStringLimit'
  virSecurityLabelDefParseXML: Don't use virXMLPropStringLimit
  util: xml: Remove virXMLPropStringLimit and virXPathStringLimit

 src/conf/domain_conf.c          | 104 +++++++++++++++-----------------
 src/conf/node_device_conf.c     |   6 +-
 src/libvirt_private.syms        |   2 -
 src/security/security_selinux.c |   3 +-
 src/util/virseclabel.h          |   6 +-
 src/util/virxml.c               |  62 -------------------
 src/util/virxml.h               |   8 ---
 7 files changed, 59 insertions(+), 132 deletions(-)

-- 
2.31.1