]> xenbits.xensource.com Git - libvirt.git/commitdiff
conf: domcaps: Don't format XML on report=false
authorCole Robinson <crobinso@redhat.com>
Wed, 6 Mar 2019 23:22:01 +0000 (18:22 -0500)
committerCole Robinson <crobinso@redhat.com>
Mon, 18 Mar 2019 14:51:02 +0000 (10:51 -0400)
After this, newly added enums will not automatically show up in
driver output unless the driver code specifically sets report=true

Acked-by: Michal Privoznik <mprivozn@redhat.com>
Signed-off-by: Cole Robinson <crobinso@redhat.com>
src/conf/domain_capabilities.c

index f45a3bcc3d1b7a1907ef6f476e37301690e4fb42..5a8f48da617a49ff40bd181fed90e940e4fafedf 100644 (file)
@@ -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");