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 <mprivozn@redhat.com>
Signed-off-by: Cole Robinson <crobinso@redhat.com>
This commit is contained in:
Cole Robinson 2019-03-06 18:22:01 -05:00
parent 8645a13dec
commit a994541b8a

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