From nobody Tue Feb 10 12:57:30 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=1619188786; cv=none; d=zohomail.com; s=zohoarc; b=QNhZwY7ik/DaIr91McGIRStN3gzv3k28sJdbQuDy8VRxhXsWtIQ4IGGKXmD/2jCQeM5mlmZWBnAu/Fc05q+N9q5Y8eP4VKLiVNA8tyULJPIlZucaYzfceA8PV36bf0HNkO9nTn/uiVwPJRdyCXCcUhs6Hw7EzFj2SostiF3it6s= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1619188786; 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=Fv2r07bUFHXl0PrBZco30aMAG0GDbBPYyfParSaV4Ew=; b=Hguhms3b0fS5fHfW7j5quWt0Gfwk8cYZDmw/xHsXo2Fw2jWN2hy6C3/1Y4hjDxgqF2fwHiYAa7RvAojfApWMDs+0qUxTvS5yiAMO/059SudSnbyn00m24Err4lvAjBfMxLGTHzAqcNQa8ajANfe5Z+lTXCFctM+GhpXuQ+yilNk= 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 1619188786947311.52027260773286; Fri, 23 Apr 2021 07:39:46 -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-325-6OuM6sxcNlSUz1g_PXwRUQ-1; Fri, 23 Apr 2021 10:39:43 -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 F20B11008072; Fri, 23 Apr 2021 14:39:34 +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 C66221992D; Fri, 23 Apr 2021 14:39:34 +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 858F61806D20; Fri, 23 Apr 2021 14:39:34 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 13NEdUr0029216 for ; Fri, 23 Apr 2021 10:39:30 -0400 Received: by smtp.corp.redhat.com (Postfix) id 7FB3560BD8; Fri, 23 Apr 2021 14:39:30 +0000 (UTC) Received: from work.redhat.com (ovpn-115-30.ams2.redhat.com [10.36.115.30]) by smtp.corp.redhat.com (Postfix) with ESMTP id 8C3D51349A; Fri, 23 Apr 2021 14:39:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1619188785; 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=Fv2r07bUFHXl0PrBZco30aMAG0GDbBPYyfParSaV4Ew=; b=TnVgQaSJpbpCYYHXPnCrnlWcTIMMmFZgv4LCK8fBczsrLQ7UeryXgCR14+gazmxtM556Yl zTnKGrJyOh8C86J/mm4AvVLlQSqyPy/RJ5zrGb31SKY9l32qRyWQLbLBNfhAS4Plu6k+MO b3Q0nMVEY3RD2a7ZtMc74HStq1WzH94= X-MC-Unique: 6OuM6sxcNlSUz1g_PXwRUQ-1 From: Tim Wiederhake To: libvir-list@redhat.com Subject: [libvirt PATCH v2 02/11] virDomainControllerDef: Change type of ioeventfd to virTristateSwitch Date: Fri, 23 Apr 2021 16:39:13 +0200 Message-Id: <20210423143922.298608-3-twiederh@redhat.com> In-Reply-To: <20210423143922.298608-1-twiederh@redhat.com> References: <20210423143922.298608-1-twiederh@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-loop: libvir-list@redhat.com Cc: =?UTF-8?q?J=C3=A1n=20Tomko?= , 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-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) Signed-off-by: Tim Wiederhake Reviewed-by: J=C3=A1n Tomko --- src/conf/domain_conf.c | 13 ++++++++----- src/conf/domain_conf.h | 2 +- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index 24c0943d62..4ed7c0ef83 100644 --- a/src/conf/domain_conf.c +++ b/src/conf/domain_conf.c @@ -9619,11 +9619,14 @@ virDomainControllerDefParseXML(virDomainXMLOption *= xmlopt, return NULL; } =20 - if (ioeventfd && - (def->ioeventfd =3D virTristateSwitchTypeFromString(ioeventfd)) < = 0) { - virReportError(VIR_ERR_XML_ERROR, - _("Malformed 'ioeventfd' value %s"), ioeventfd); - return NULL; + if (ioeventfd) { + int value; + if ((value =3D virTristateSwitchTypeFromString(ioeventfd)) < 0) { + virReportError(VIR_ERR_XML_ERROR, + _("Malformed 'ioeventfd' value %s"), ioeventfd); + return NULL; + } + def->ioeventfd =3D value; } =20 if (iothread) { diff --git a/src/conf/domain_conf.h b/src/conf/domain_conf.h index a7cad31896..d4344a7158 100644 --- a/src/conf/domain_conf.h +++ b/src/conf/domain_conf.h @@ -763,7 +763,7 @@ struct _virDomainControllerDef { unsigned int queues; unsigned int cmd_per_lun; unsigned int max_sectors; - int ioeventfd; /* enum virTristateSwitch */ + virTristateSwitch ioeventfd; unsigned int iothread; /* unused =3D 0, > 0 specific thread # */ union { virDomainVirtioSerialOpts vioserial; --=20 2.26.3