diff mbox series

[v2,15/16] conf: domcaps: Don't format XML on report=false

Message ID 747c6cd809b138e4c47d105e05c79ca2bfeea3ca.1551914794.git.crobinso@redhat.com
State Accepted
Commit a994541b8afc3c135e21847f39ef1a3da76f9107
Headers show
Series domcaps: use virTristateBool | expand

Commit Message

Cole Robinson March 6, 2019, 11:38 p.m. UTC
After this, newly added enums will not automatically show up in
driver output unless the driver code specifically sets report=true

Signed-off-by: Cole Robinson <crobinso@redhat.com>

---
 src/conf/domain_capabilities.c | 5 +++++
 1 file changed, 5 insertions(+)

-- 
2.20.1

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list
diff mbox series

Patch

diff --git a/src/conf/domain_capabilities.c b/src/conf/domain_capabilities.c
index f45a3bcc3d..5a8f48da61 100644
--- a/src/conf/domain_capabilities.c
+++ b/src/conf/domain_capabilities.c
@@ -330,6 +330,11 @@  virDomainCapsEnumFormat(virBufferPtr buf,
     int ret = -1;
     size_t i;
 
+    if (!capsEnum->report) {
+        ret = 0;
+        goto cleanup;
+    }
+
     virBufferAsprintf(buf, "<enum name='%s'", capsEnumName);
     if (!capsEnum->values) {
         virBufferAddLit(buf, "/>\n");