From a994541b8afc3c135e21847f39ef1a3da76f9107 Mon Sep 17 00:00:00 2001 From: Cole Robinson Date: Wed, 6 Mar 2019 18:22:01 -0500 Subject: [PATCH] conf: domcaps: Don't format XML on report=false 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 Signed-off-by: Cole Robinson --- 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, "values) { virBufferAddLit(buf, "/>\n");