From patchwork Tue Apr 17 18:40:11 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Cole Robinson X-Patchwork-Id: 133583 Delivered-To: patch@linaro.org Received: by 10.46.84.18 with SMTP id i18csp5038021ljb; Tue, 17 Apr 2018 11:40:36 -0700 (PDT) X-Google-Smtp-Source: AIpwx4/NfZ8dIM04zNzDQrn5T7DwQIATNcT5uC4buLqoLfN2disIJFCvO5fn0cdtGc2Qw0w6XRKD X-Received: by 2002:a9d:51ce:: with SMTP id d14-v6mr2059061oth.386.1523990436799; Tue, 17 Apr 2018 11:40:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1523990436; cv=none; d=google.com; s=arc-20160816; b=UdOSBiayOJgDQwqUTRwU2hJWbvuckSd+b+/G7113XDnkp9K3YeS1+Kgbsd219oD2v9 ngeTbC62IiQbkshUDrLYsgiVC+gIyhuFtdlV/9G/t1KnuynHkxTEvut/sJ8PzLeA43iP UNfzZVpmxaPfXTEOt0cVUUWgj/G4d4BSWZRkaEGPhjdJLTStcrX+nnAe3b/hTD5snak4 r4birxQ8Uxw/CYEHzNfCgM7SSzzZrdMkMSmWuFEQ2dHSkfawXhg1jIXd2yG0/+NbxwFR 7lpQuhX0GR7RafjyGaCH73G1L3+lUy96SC2l06Lg9Zglk2maIq+CGHu6fPBXDJNltKr3 IlSA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=errors-to:sender:content-transfer-encoding:mime-version :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:cc:references:in-reply-to:references :in-reply-to:message-id:date:to:from:delivered-to :arc-authentication-results; bh=OtWr3vnfe3StCCNKAzBg1ABjJDA99dNnvBvhSJ3JrdE=; b=XCGgFRGmm0/F9ooy9p/XHaxzE3no5lIcRUdgIqVsOI7uOxBPcLr5dcD2XtSrPwjOdx ++/kAdLgvztkT+gIRVdcpIJ6CYp8kestY1rgi21+Y+n+zi3srya+LhxaRNRaH4WDdxOx PwaIdPx67fz0G/rE5P4RgNJIMSveFbtwUmOYc7zECxesv+hMG/PYqNlh4xyWsishkdKk P8ZkSTeeizGLCv9W+z4gtOqmzFAabODW2L+unRpPeA7K8OI5nWCikRgTYzUjUtfgVf1c ZzTPn59ofjxviM4sv5QmUjYgeTP1rYgzMwylXbNIJfneSOVy0JQ8gz2Ea9c7i/WjPmca rrGw== 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 r35-v6si5820110ote.425.2018.04.17.11.40.36 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 17 Apr 2018 11:40:36 -0700 (PDT) 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-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 6349E81DE4; Tue, 17 Apr 2018 18:40:35 +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 28A297ED44; Tue, 17 Apr 2018 18:40:35 +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 D76A8180BAD3; Tue, 17 Apr 2018 18:40:34 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.rdu2.redhat.com [10.11.54.4]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id w3HIeFuX031801 for ; Tue, 17 Apr 2018 14:40:16 -0400 Received: by smtp.corp.redhat.com (Postfix) id BEDEC200BCCE; Tue, 17 Apr 2018 18:40:15 +0000 (UTC) Delivered-To: libvirt-list@redhat.com Received: from worklaptop.bos.redhat.com (dhcp-17-157.bos.redhat.com [10.18.17.157]) by smtp.corp.redhat.com (Postfix) with ESMTP id 90E242023227; Tue, 17 Apr 2018 18:40:15 +0000 (UTC) From: Cole Robinson To: libvirt-list@redhat.com Date: Tue, 17 Apr 2018 14:40:11 -0400 Message-Id: <18601ec4d9e0e022f5d411eb60051114b7b462ab.1523989580.git.crobinso@redhat.com> In-Reply-To: References: In-Reply-To: References: X-Scanned-By: MIMEDefang 2.78 on 10.11.54.4 X-loop: libvir-list@redhat.com Cc: =?utf-8?q?Marc-Andr=C3=A9_Lureau?= Subject: [libvirt] [PATCH 2/3] conf: Add a comment warning about boolean feature XML 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: , MIME-Version: 1.0 Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.25]); Tue, 17 Apr 2018 18:40:35 +0000 (UTC) This is the old style and we really shouldn't be adding any more examples like this. Add a comment to warn devs away Signed-off-by: Cole Robinson --- docs/schemas/domaincommon.rng | 6 +++++- src/conf/domain_conf.c | 2 ++ 2 files changed, 7 insertions(+), 1 deletion(-) -- 2.17.0 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list Reviewed-by: John Ferlan diff --git a/docs/schemas/domaincommon.rng b/docs/schemas/domaincommon.rng index 4cab55f05..015c5b737 100644 --- a/docs/schemas/domaincommon.rng +++ b/docs/schemas/domaincommon.rng @@ -5036,7 +5036,11 @@ - + + + + + diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index 648057ad4..e303c503e 100644 --- a/src/conf/domain_conf.c +++ b/src/conf/domain_conf.c @@ -26871,6 +26871,8 @@ virDomainDefFormatInternal(virDomainDefPtr def, case VIR_DOMAIN_FEATURE_PAE: case VIR_DOMAIN_FEATURE_VIRIDIAN: case VIR_DOMAIN_FEATURE_PRIVNET: + /* NOTE: This is for old style booleans. New XML + * should use the explicit state=on|off output below */ switch ((virTristateSwitch) def->features[i]) { case VIR_TRISTATE_SWITCH_ABSENT: break;