From: Michal Privoznik Date: Mon, 20 Apr 2015 08:48:19 +0000 (+0200) Subject: virDomainActualNetDefContentsFormat: Format class_id only for status XML X-Git-Tag: v1.2.15-rc1~86 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e128b4a44df49e74c11dde570fba2906a35538dd;p=thirdparty%2Flibvirt.git virDomainActualNetDefContentsFormat: Format class_id only for status XML In one of my previous patches (b68a56bcfe) I made class_id to format more frequently. Well, now it's formatting way too frequent - even for regular active XML. Users don't need to see it, so lets format it only for the status XML where it's really needed. Signed-off-by: Michal Privoznik --- diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index 479b4c2a18..9aad782f19 100644 --- a/src/conf/domain_conf.c +++ b/src/conf/domain_conf.c @@ -18522,7 +18522,8 @@ virDomainActualNetDefContentsFormat(virBufferPtr buf, virBufferAddLit(buf, "/>\n"); } - if (def->data.network.actual && def->data.network.actual->class_id) { + if (flags & VIR_DOMAIN_DEF_FORMAT_STATUS && + def->data.network.actual && def->data.network.actual->class_id) { virBufferAsprintf(buf, "\n", def->data.network.actual->class_id); }