From nobody Wed Feb 11 05:17:54 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 170.10.129.124 as permitted sender) client-ip=170.10.129.124; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.129.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1648225625; cv=none; d=zohomail.com; s=zohoarc; b=HMlOlsdYOCIFUW0465PMpCwLKalPa7DhUf2gYy9hTfOtNvKfZxC9PMWkPPDGbhX9bNZvR6JmzK2xQAlkjrT+H1IFLmq46ulh1LilJVIRoBc6rs/Ss1wCOidJOjiTHKwPGwte6jXcJhMysw2iR7Hq7mZHWA3zQocvNArT5zy95EU= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1648225625; h=Content-Type:Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=ezO7ydYXXvQTxHSZYe4gcrI+eP7a7VsKjeW34UCIVRw=; b=HlLcGsIW+zqwSJYdPp8Y7UvwRAd7QYiSCAEAcj1nGpN/SV1AXMSyhKiZTOcU+2a5lgMNf7s3N0YcZs5JrN+aj48oHzzHjp52Zat03PlW0ax/lvIb10Ow0uWRRgN8sZP/xefPPG+qJOZGJW7dA4xsJJbw4xh1xufyvFpCHJSnOvs= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.129.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by mx.zohomail.com with SMTPS id 1648225624998317.4996895654539; Fri, 25 Mar 2022 09:27:04 -0700 (PDT) Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-311-6Ywi9UZOO3qx2CIXQC82-Q-1; Fri, 25 Mar 2022 12:27:02 -0400 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.rdu2.redhat.com [10.11.54.4]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 713342999B3A; Fri, 25 Mar 2022 16:26:59 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com [10.30.29.100]) by smtp.corp.redhat.com (Postfix) with ESMTP id 568242026D4C; Fri, 25 Mar 2022 16:26:59 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (localhost [IPv6:::1]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id 4EC22194035B; Fri, 25 Mar 2022 16:26:56 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx09.intmail.prod.int.rdu2.redhat.com [10.11.54.9]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id 5A3F01940341 for ; Fri, 25 Mar 2022 16:26:55 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id 3ACC65E8A4C; Fri, 25 Mar 2022 16:26:55 +0000 (UTC) Received: from harajuku.usersys.redhat.com.homenet.telecomitalia.it (unknown [10.40.192.64]) by smtp.corp.redhat.com (Postfix) with ESMTPS id BE87A5E8A42 for ; Fri, 25 Mar 2022 16:26:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1648225624; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=ezO7ydYXXvQTxHSZYe4gcrI+eP7a7VsKjeW34UCIVRw=; b=BFRTBQ+UrBnsSMDzVmOgtJyEkayiww5z8IgQeuTrTaw1N81oCo7mZ+xPFMNY9xyJ8Xb3MU Si7EFGh8siRlgenuDZtBV8u6wZ9CIYTgDoHt2/qfU/7CZVTPjWDiReMCf7DPolQOkA+H1/ VWv8TBLkmOF4AgmLnFOFSJ/LZAPQ8+g= X-MC-Unique: 6Ywi9UZOO3qx2CIXQC82-Q-1 X-Original-To: libvir-list@listman.corp.redhat.com From: Andrea Bolognani To: libvir-list@redhat.com Subject: [PATCH 1/9] conf: Don't pass PROP_NONZERO to virXMLPropTristateBool() Date: Fri, 25 Mar 2022 17:26:44 +0100 Message-Id: <20220325162652.328686-2-abologna@redhat.com> In-Reply-To: <20220325162652.328686-1-abologna@redhat.com> References: <20220325162652.328686-1-abologna@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.85 on 10.11.54.9 X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libvir-list-bounces@redhat.com Sender: "libvir-list" X-Scanned-By: MIMEDefang 2.78 on 10.11.54.4 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=libvir-list-bounces@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1648225625464100001 Content-Type: text/plain; charset="utf-8"; x-default="true" It's the default behavior. Signed-off-by: Andrea Bolognani --- src/conf/domain_conf.c | 6 +++--- src/conf/interface_conf.c | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index 731139f80f..1186ec8417 100644 --- a/src/conf/domain_conf.c +++ b/src/conf/domain_conf.c @@ -7862,7 +7862,7 @@ virSecurityLabelDefParseXML(xmlXPathContextPtr ctxt, seclabel->type =3D=3D VIR_DOMAIN_SECLABEL_NONE) seclabel->relabel =3D false; =20 - if (virXMLPropTristateBool(ctxt->node, "relabel", VIR_XML_PROP_NONZERO= , &relabel) < 0) + if (virXMLPropTristateBool(ctxt->node, "relabel", VIR_XML_PROP_NONE, &= relabel) < 0) return NULL; =20 virTristateBoolToBool(relabel, &seclabel->relabel); @@ -8079,7 +8079,7 @@ virSecurityDeviceLabelDefParseXML(virSecurityDeviceLa= belDef ***seclabels_rtn, seclabels[i]->model =3D g_steal_pointer(&model); } =20 - if (virXMLPropTristateBool(list[i], "relabel", VIR_XML_PROP_NONZER= O, &t) < 0) + if (virXMLPropTristateBool(list[i], "relabel", VIR_XML_PROP_NONE, = &t) < 0) goto error; =20 seclabels[i]->relabel =3D true; @@ -8088,7 +8088,7 @@ virSecurityDeviceLabelDefParseXML(virSecurityDeviceLa= belDef ***seclabels_rtn, /* labelskip is only parsed on live images */ seclabels[i]->labelskip =3D false; if (!(flags & VIR_DOMAIN_DEF_PARSE_INACTIVE)) { - if (virXMLPropTristateBool(list[i], "labelskip", VIR_XML_PROP_= NONZERO, &t) < 0) + if (virXMLPropTristateBool(list[i], "labelskip", VIR_XML_PROP_= NONE, &t) < 0) goto error; =20 virTristateBoolToBool(t, &seclabels[i]->labelskip); diff --git a/src/conf/interface_conf.c b/src/conf/interface_conf.c index 424650489c..ba5dc9961a 100644 --- a/src/conf/interface_conf.c +++ b/src/conf/interface_conf.c @@ -233,7 +233,7 @@ virInterfaceDefParseDhcp(virInterfaceProtocolDef *def, def->dhcp =3D 1; def->peerdns =3D -1; =20 - if (virXMLPropTristateBool(dhcp, "peerdns", VIR_XML_PROP_NONZERO, &pee= rdns) < 0) + if (virXMLPropTristateBool(dhcp, "peerdns", VIR_XML_PROP_NONE, &peerdn= s) < 0) return -1; =20 if (peerdns !=3D VIR_TRISTATE_BOOL_ABSENT) { --=20 2.35.1