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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxx>
---
 src/conf/domain_capabilities.c | 5 +++++
 1 file changed, 5 insertions(+)

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");
-- 
2.20.1

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list



[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux