[RFC 0/1] virxml: Accept 'default' for virTristate* properties

Andrea Bolognani posted 1 patch 2 years, 1 month ago
Test syntax-check passed
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/libvirt tags/patchew/20220323180420.60890-1-abologna@redhat.com
src/util/virxml.c | 4 ----
1 file changed, 4 deletions(-)
[RFC 0/1] virxml: Accept 'default' for virTristate* properties
Posted by Andrea Bolognani 2 years, 1 month ago
Sending this as an RFC because it's incomplete.

After virXMLPropTristate*() had been introduced, existing code was
gradually converted to use the new helpers; however, if you look for
example at 593140dabd66 you'll see that the original implementation
considered encountering 'default' to be an error, and the change I'm
proposing would relax such a check.

So we need to go through the callers one by one, adapting them as
necessary (in this case, we would pass VIR_XML_PROP_NONZERO in
addition to existing flags) to ensure that the original semantic is
preserved.

Any better ideas?

Andrea Bolognani (1):
  virxml: Accept 'default' for virTristate* properties

 src/util/virxml.c | 4 ----
 1 file changed, 4 deletions(-)

-- 
2.35.1