From patchwork Wed Mar 6 23:37:00 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Cole Robinson X-Patchwork-Id: 159777 Delivered-To: patch@linaro.org Received: by 2002:a02:5cc1:0:0:0:0:0 with SMTP id w62csp6774010jad; Wed, 6 Mar 2019 15:37:47 -0800 (PST) X-Google-Smtp-Source: APXvYqzcnviot3SK4JaYO4LqPpVv3wUk0KANDXcCjS/bK3fGIqqm+EjUXC1i0DQRazQ/OiGNpdvE X-Received: by 2002:a37:330c:: with SMTP id z12mr8018612qkz.136.1551915467610; Wed, 06 Mar 2019 15:37:47 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1551915467; cv=none; d=google.com; s=arc-20160816; b=eTCE/VmZUYRhfE/POrAiP/A09Ka38fAttci1hAJdo7QrcFPvJ/l+akIL4/128FQ+0g JE9kIBnJSoYpTCMHQHwkG8MiTW/mRxAp42GWI68Um8PuZuW4TqYtDrrJjO1egbFNi4It L/uaNdx7waxBkGhEcgvFzNrXBYwIbAHfrQetduzaTVLzq/QB1Bkldtyo2BouUhCTqdnA tkdR5DCgy2zYhM7CSEKixKNbaC/Q18p8mgyZRMSUSaSaEfPh7+zR7YBCVj0Yc17Uc/1M m8awV7Ecu5BIX2MQq4SEzI3YUTfBOV+r5yru73c25bDv1fKkFSQfNqZs3VzI4aJy7aPs bnMw== 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=XuDBjbuSPd9I2yXQhG925jRu5s2IYFPiWIW6CzraZVs=; b=0gwjkep3G1FphaIBfP7Bi7JHmbAM3AmkM5m6Cdc6BDaKlXo21FQMygpmcy3asA+s1K D9ZfUqRmlEuDQq1dkbjdR4R9Qse43mIj8aiZsCmP8u4c8hHWmGG3cyarTRevnGFprTMc 5s6WpGtinIloXnfd0H8AQuyXv7TP1r8bePsRME1Wlo/joPjEC23ilcSMnhNdQ9Egn6Es 7dNKU7vjA4ute2aXlKrjfMS3+m7fuVVR1zuZbCI22Cfwbfzxc5G0GxqttdBm35Rf+Cm1 OOEykaim+qv/IDa8MVZGpMEQhG9lOd1eCj01jkB3sb3DypJOMOuvNJQlEDtzIK1S5hVj hvVA== 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 s68si1924409qki.17.2019.03.06.15.37.47 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 06 Mar 2019 15:37:47 -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-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 6C0B0C057EC3; Wed, 6 Mar 2019 23:37:46 +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 4326E1001DF1; Wed, 6 Mar 2019 23:37:46 +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 0A148181A269; Wed, 6 Mar 2019 23:37:46 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id x26NbL8s005251 for ; Wed, 6 Mar 2019 18:37:21 -0500 Received: by smtp.corp.redhat.com (Postfix) id EA6F21001DF1; Wed, 6 Mar 2019 23:37:21 +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 858A71001DD9; Wed, 6 Mar 2019 23:37:21 +0000 (UTC) From: Cole Robinson To: libvirt-list@redhat.com Date: Wed, 6 Mar 2019 18:37:00 -0500 Message-Id: <625eca459817ea253c1b2a0f60961935b56b9e13.1551914794.git.crobinso@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH v2 11/16] conf: domcaps: Add virCapsEnum 'report' 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.22 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.32]); Wed, 06 Mar 2019 23:37:46 +0000 (UTC) virCapsEnum report is an internal bool indicating whether we should format the enum in the XML at all. This is unused for now but will be handled in future patches. We use a plain bool instead of tristate because the case here is a bit different than the explicit @supported output. We already report the equivalent of supported=YES|NO based on what enum values are filled in. This adds report=false to handle the ABSENT case. Signed-off-by: Cole Robinson --- src/conf/domain_capabilities.h | 1 + 1 file changed, 1 insertion(+) -- 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.h b/src/conf/domain_capabilities.h index 3282b47d52..26f4b8c394 100644 --- a/src/conf/domain_capabilities.h +++ b/src/conf/domain_capabilities.h @@ -33,6 +33,7 @@ typedef virDomainCaps *virDomainCapsPtr; typedef struct _virDomainCapsEnum virDomainCapsEnum; typedef virDomainCapsEnum *virDomainCapsEnumPtr; struct _virDomainCapsEnum { + bool report; /* Whether the format the enum at all */ unsigned int values; /* Bitmask of values supported in the corresponding enum */ };