From nobody Mon May 6 22:56:04 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; envelope-from=libvir-list-bounces@redhat.com; helo=mx1.redhat.com; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1502117780363123.05373612507162; Mon, 7 Aug 2017 07:56:20 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 23CE7C047B7E; Mon, 7 Aug 2017 14:56:18 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id AB2CF692BD; Mon, 7 Aug 2017 14:56:16 +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 755A54BB79; Mon, 7 Aug 2017 14:56:15 +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 v77EuCN6027307 for ; Mon, 7 Aug 2017 10:56:12 -0400 Received: by smtp.corp.redhat.com (Postfix) id E4E1D8FC06; Mon, 7 Aug 2017 14:56:12 +0000 (UTC) Received: from dnr.brq.redhat.com (unknown [10.43.2.103]) by smtp.corp.redhat.com (Postfix) with ESMTP id 6B99E8FBF9 for ; Mon, 7 Aug 2017 14:56:10 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 23CE7C047B7E Authentication-Results: ext-mx07.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx07.extmail.prod.ext.phx2.redhat.com; spf=fail smtp.mailfrom=libvir-list-bounces@redhat.com From: =?UTF-8?q?J=C3=A1n=20Tomko?= To: libvir-list@redhat.com Date: Mon, 7 Aug 2017 16:56:07 +0200 Message-Id: <8648a12278142d6338701501b13509affbd2eb33.1502117761.git.jtomko@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH] conf: check rombar against VIR_DOMAIN_TRISTATE_SWITCH_ABSENT 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 Content-Transfer-Encoding: quoted-printable Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.31]); Mon, 07 Aug 2017 14:56:19 +0000 (UTC) X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" Make the comparison explicit. --- src/conf/domain_conf.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index 3cdb5e348..b5ce2ecd9 100644 --- a/src/conf/domain_conf.c +++ b/src/conf/domain_conf.c @@ -5359,10 +5359,10 @@ virDomainDeviceInfoFormat(virBufferPtr buf, } =20 if ((flags & VIR_DOMAIN_DEF_FORMAT_ALLOW_ROM) && - (info->rombar || info->romfile)) { + (info->rombar !=3D VIR_TRISTATE_SWITCH_ABSENT || info->romfile)) { =20 virBufferAddLit(buf, "rombar) { + if (info->rombar !=3D VIR_TRISTATE_SWITCH_ABSENT) { const char *rombar =3D virTristateSwitchTypeToString(info->rom= bar); =20 if (rombar) --=20 2.13.0 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list