From patchwork Wed Mar 6 23:38:24 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Cole Robinson X-Patchwork-Id: 159782 Delivered-To: patch@linaro.org Received: by 2002:a02:5cc1:0:0:0:0:0 with SMTP id w62csp6774800jad; Wed, 6 Mar 2019 15:38:44 -0800 (PST) X-Google-Smtp-Source: APXvYqy5C79tCeHQhMo446UYVXxVgT4aoMcFjxTJ/Ma5JhvoKICtr3P1U0IymRvZ/Y4AnQpFBfxJ X-Received: by 2002:a0c:fcc5:: with SMTP id i5mr8397013qvq.39.1551915523966; Wed, 06 Mar 2019 15:38:43 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1551915523; cv=none; d=google.com; s=arc-20160816; b=Ty15/uDLc5Oh9LxLNnZOkXykYoTrQF1aYbrumxBDGajnEs7gmBH6biaMEvdfNuz6lJ gF+MJTto9y4vuwzjH84sgMw3pKAT4MOlNUwyqfav8kNYYbotUaowR4U9FtahjLeI7pdR hskbJMj1ttcmwnno/zV/2gCGcS/kJmw4TwzD4bg5+/OXufsCsO/UZnw2yF7b71va9YPz W2ddAmFou2jxTbQE3bwyfy43mT7PGFYssBX+rkt9RXz9Hhx/O7F/8Q8QFmrIckSNUobx b4wwKmTGxWD8b1YKD3nNDSRxc6BPBUE0D/ao4QzO2GKj+i97yhPO+XT+Bh1yde1cO2zv CAqQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=errors-to:sender:content-transfer-encoding:list-subscribe:list-help :list-post:list-archive:list-unsubscribe:list-id:precedence:subject :mime-version:references:in-reply-to:message-id:date:to:from :delivered-to; bh=kITVSfk05iOwMCVg6+9dWn1Ei3FWZzPpd1agZ3G5nh4=; b=SnN5u9Safms971P3iaJN68HCV8vSEnZcN2NMbL63UD7m7JxT0ojGZ1M42SAWA4tyzP bZLdG/XCRPVBHrKFXJspBteQNqTWmFRPZtsnxJNIm5EZsHsObM1aCsIXV3XySMA+Sm0b jCdX/i6Woc2DuwKDazlt9c/HLJJCfnVgSRGgAC+hMXwNxQzmYRxd68Zgq3ZFma2OTvN6 IuNYIdwuA/+tLq/0NGmeE+vgW/w3tzOKntR1yN478oI4/xAGiCWWbXn/BqUA5RTR0xXl F+ZagHzK2uRNywx5ocFEQp60mN6JBfPVDshvBi4t4YH64Hsv+umSVZy8Aq4trz9Pxmxi EmuA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of libvir-list-bounces@redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from mx1.redhat.com (mx1.redhat.com. [209.132.183.28]) by mx.google.com with ESMTPS id r53si1868826qtk.143.2019.03.06.15.38.43 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 06 Mar 2019 15:38:43 -0800 (PST) Received-SPF: pass (google.com: domain of libvir-list-bounces@redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; Authentication-Results: mx.google.com; spf=pass (google.com: domain of libvir-list-bounces@redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 9F60D58567; Wed, 6 Mar 2019 23:38:42 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 720E119C67; Wed, 6 Mar 2019 23:38:42 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id 2B8F5181A12C; Wed, 6 Mar 2019 23:38:42 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id x26NcbE6005930 for ; Wed, 6 Mar 2019 18:38:37 -0500 Received: by smtp.corp.redhat.com (Postfix) id 62DFE611C2; Wed, 6 Mar 2019 23:38:37 +0000 (UTC) Delivered-To: libvirt-list@redhat.com Received: from worklaptop.redhat.com (ovpn-121-104.rdu2.redhat.com [10.10.121.104]) by smtp.corp.redhat.com (Postfix) with ESMTP id F17D6611C0; Wed, 6 Mar 2019 23:38:36 +0000 (UTC) From: Cole Robinson To: libvirt-list@redhat.com Date: Wed, 6 Mar 2019 18:38:24 -0500 Message-Id: <747c6cd809b138e4c47d105e05c79ca2bfeea3ca.1551914794.git.crobinso@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH v2 15/16] conf: domcaps: Don't format XML on report=false X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.39]); Wed, 06 Mar 2019 23:38:43 +0000 (UTC) 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 --- src/conf/domain_capabilities.c | 5 +++++ 1 file changed, 5 insertions(+) -- 2.20.1 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list 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");