From nobody Mon Feb 9 09:09:29 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 216.205.24.124 as permitted sender) client-ip=216.205.24.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 216.205.24.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=1617796189; cv=none; d=zohomail.com; s=zohoarc; b=QNSB3VCBsWsReEswSSlYrUaV8lE+deHlqVDEluln93KIGjO2jT4XTWJfSfZaK0NjVRrKZWgbOgQVTeLBr1Vwh9qf3U0k22+ihbkfotYiubPMlGNlwsXEmAonk5DM65yQuv4R+ubeqBgGcCReuxjdyEttF4RSoqWhR+dp5+a9fqo= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1617796189; h=Content-Type:Content-Transfer-Encoding:Cc: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=HjE1GAUpBsVeu4S/G0HFROoaDOuDj1x9BTZk7WhVR0g=; b=L+dFIW/abZ/19Xvt4iFTQx9MyjVlsqPwTXMdpBuOUvnHhZlUAp5MANmX2WeoqJwGGSuJICZwM9cbBJElJi2uVbFSXui5W6NwN5PPa/HvYEcH0pC9CDcP3narMzgpcpCCZBtGqZalVNG6UQwWfFRNtxVvDEXuNDlPBrsi+6rzw+Y= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 216.205.24.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [216.205.24.124]) by mx.zohomail.com with SMTPS id 1617796189579270.508133993146; Wed, 7 Apr 2021 04:49:49 -0700 (PDT) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-505-KRCRZZMpP5uEKrPB1koWSg-1; Wed, 07 Apr 2021 07:49:06 -0400 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 mimecast-mx01.redhat.com (Postfix) with ESMTPS id 18BA8107ACF5; Wed, 7 Apr 2021 11:49:00 +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 DADAE19C46; Wed, 7 Apr 2021 11:48:59 +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 9EAAC1806D15; Wed, 7 Apr 2021 11:48:59 +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 137Bmilg006700 for ; Wed, 7 Apr 2021 07:48:44 -0400 Received: by smtp.corp.redhat.com (Postfix) id 3EB7814108; Wed, 7 Apr 2021 11:48:44 +0000 (UTC) Received: from work.redhat.com (ovpn-113-23.ams2.redhat.com [10.36.113.23]) by smtp.corp.redhat.com (Postfix) with ESMTP id 8232260854; Wed, 7 Apr 2021 11:48:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1617796188; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc: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=HjE1GAUpBsVeu4S/G0HFROoaDOuDj1x9BTZk7WhVR0g=; b=HIl+6CW2lYvvMrP1JlA/OizrW5+GGLl2VmMLcNN/GHO9qlE2mMwtEKhh5RAVFKTI7xT9w4 5nahRESQjrsDZfAjEsI1kCSfEWpIMhPx8Spy4gFf1nZkz/HQxQXCfeokqfmzHWkv/AnnSo r0mewn772v6Q6th1ihrGxCbDfmx3b1U= X-MC-Unique: KRCRZZMpP5uEKrPB1koWSg-1 From: Tim Wiederhake To: libvir-list@redhat.com Subject: [libvirt PATCH 01/14] conf: Use virTristateXXX in virStorageSource Date: Wed, 7 Apr 2021 13:48:28 +0200 Message-Id: <20210407114841.85009-2-twiederh@redhat.com> In-Reply-To: <20210407114841.85009-1-twiederh@redhat.com> References: <20210407114841.85009-1-twiederh@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-loop: libvir-list@redhat.com Cc: Tim Wiederhake 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 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) Content-Type: text/plain; charset="utf-8" Signed-off-by: Tim Wiederhake --- src/conf/domain_conf.c | 12 ++++++++---- src/conf/storage_source_conf.h | 2 +- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index 1e72171586..b8f6c3d606 100644 --- a/src/conf/domain_conf.c +++ b/src/conf/domain_conf.c @@ -8340,11 +8340,15 @@ virDomainDiskSourceNetworkParse(xmlNodePtr node, return -1; } =20 - if ((haveTLS =3D virXMLPropString(node, "tls")) && - (src->haveTLS =3D virTristateBoolTypeFromString(haveTLS)) <=3D 0) { - virReportError(VIR_ERR_XML_ERROR, - _("unknown disk source 'tls' setting '%s'"), haveTLS); + if ((haveTLS =3D virXMLPropString(node, "tls"))) { + int value; + + if ((value =3D virTristateBoolTypeFromString(haveTLS)) <=3D 0) { + virReportError(VIR_ERR_XML_ERROR, + _("unknown disk source 'tls' setting '%s'"), ha= veTLS); return -1; + } + src->haveTLS =3D value; } =20 if ((flags & VIR_DOMAIN_DEF_PARSE_STATUS) && diff --git a/src/conf/storage_source_conf.h b/src/conf/storage_source_conf.h index f42bb1c67d..e6702a1ffc 100644 --- a/src/conf/storage_source_conf.h +++ b/src/conf/storage_source_conf.h @@ -356,7 +356,7 @@ struct _virStorageSource { char *nodestorage; /* name of the storage object */ =20 /* An optional setting to enable usage of TLS for the storage source */ - int haveTLS; /* enum virTristateBool */ + virTristateBool haveTLS; =20 /* Indication whether the haveTLS value was altered due to qemu.conf * setting when haveTLS is missing from the domain config file */ --=20 2.26.2