From nobody Sun Feb 8 17:22:16 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 207.211.31.81 as permitted sender) client-ip=207.211.31.81; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-1.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 207.211.31.81 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=1578473597; cv=none; d=zohomail.com; s=zohoarc; b=m/JpRAQCauyCL88GBYN4CiTKY8tDbUVN5srmbPVBkfRKkDG3E8ZxtZ8r+YRn+oQwMM93/483fbHnuLVkY4eYZoiK+GpHz5kK39HiRu74+5ak2oDCBt/lBkokJSz5WnmjRMl38lLlwmE8tcty1EscC3oSXBJMx0Qiv7AN1M4Hd8M= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1578473597; 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=fH+KmoCZpD4Zrn7q1Grlb9gFcNKWyq2XaV0QPb3uOZQ=; b=OA3VbZl4NYjY1OsQoJPSwuT+mXnY+gXri1kB6E8dSV1YOCyEeIw8shXUhNhXIGry8PRXHyCMdP0NxouNWndJyCpw/adMokY8/3uWf8qLlINmLR+JmqgIA/5duD+DgzRFg/0t1Ipn53SlvXmkJkNv8DVr34+p1fk9R8tQfxQmj50= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 207.211.31.81 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-1.mimecast.com (us-smtp-2.mimecast.com [207.211.31.81]) by mx.zohomail.com with SMTPS id 1578473597851110.62097019901796; Wed, 8 Jan 2020 00:53:17 -0800 (PST) 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-201-_s2hQUszN06q8kiBMjsj8g-1; Wed, 08 Jan 2020 03:53:14 -0500 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 0164CDB63; Wed, 8 Jan 2020 08:53:09 +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 8D3C485EE6; Wed, 8 Jan 2020 08:53:06 +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 9EBE21809567; Wed, 8 Jan 2020 08:53:03 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 0088r2gU010431 for ; Wed, 8 Jan 2020 03:53:02 -0500 Received: by smtp.corp.redhat.com (Postfix) id 816695D9E2; Wed, 8 Jan 2020 08:53:02 +0000 (UTC) Received: from moe.redhat.com (unknown [10.43.2.30]) by smtp.corp.redhat.com (Postfix) with ESMTP id 0A4F45D9E1 for ; Wed, 8 Jan 2020 08:53:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1578473596; 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=fH+KmoCZpD4Zrn7q1Grlb9gFcNKWyq2XaV0QPb3uOZQ=; b=R/r54GnKTqS69sHWWL1ENUG0tFpp2HlNX8UE+7JqE4lMxuHbsPS1Vw/SGHLygModS38MkO 4P2hxdVj6TBtovIOgFaLahKTOFHzDOqxCUYCzd8JDZffExOn7VcDwZTNnMTMU4A1Z405VY /YdTGSX1+5kjxR/dA3l4N0gYnEoMT3s= From: Michal Privoznik To: libvir-list@redhat.com Date: Wed, 8 Jan 2020 09:52:11 +0100 Message-Id: <3c735e29b8807e93a3c8fdfca9e0d90bb25be38c.1578473344.git.mprivozn@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH 1/2] qemu_firmware: Accept int in qemuFirmwareOSInterfaceTypeFromOsDefFirmware() 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.79 on 10.5.11.13 X-MC-Unique: _s2hQUszN06q8kiBMjsj8g-1 X-Mimecast-Spam-Score: 0 Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) Content-Type: text/plain; charset="utf-8" The point of this function is to translate virDomainOsDefFirmware enum to qemuFirmwareOSInterface enum. However, with my commit of v5.10.0-507-g8e1804f9f6 we are passing a variable type of virDomainLoader enum. Make the function accept both enums and make the enum members correspond to each other. This fixes clang build. Signed-off-by: Michal Privoznik Reviewed-by: J=C3=A1n Tomko --- src/conf/domain_conf.h | 4 ++-- src/qemu/qemu_firmware.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/conf/domain_conf.h b/src/conf/domain_conf.h index e6b06a8eba..6a61c9603f 100644 --- a/src/conf/domain_conf.h +++ b/src/conf/domain_conf.h @@ -1927,8 +1927,8 @@ struct _virDomainOSEnv { =20 typedef enum { VIR_DOMAIN_OS_DEF_FIRMWARE_NONE =3D 0, - VIR_DOMAIN_OS_DEF_FIRMWARE_BIOS, - VIR_DOMAIN_OS_DEF_FIRMWARE_EFI, + VIR_DOMAIN_OS_DEF_FIRMWARE_BIOS =3D VIR_DOMAIN_LOADER_TYPE_ROM, + VIR_DOMAIN_OS_DEF_FIRMWARE_EFI =3D VIR_DOMAIN_LOADER_TYPE_PFLASH, =20 VIR_DOMAIN_OS_DEF_FIRMWARE_LAST } virDomainOsDefFirmware; diff --git a/src/qemu/qemu_firmware.c b/src/qemu/qemu_firmware.c index a835fe6b4a..7fb57913e8 100644 --- a/src/qemu/qemu_firmware.c +++ b/src/qemu/qemu_firmware.c @@ -929,7 +929,7 @@ qemuFirmwareMatchesMachineArch(const qemuFirmware *fw, =20 =20 static qemuFirmwareOSInterface -qemuFirmwareOSInterfaceTypeFromOsDefFirmware(virDomainOsDefFirmware fw) +qemuFirmwareOSInterfaceTypeFromOsDefFirmware(int fw) { switch (fw) { case VIR_DOMAIN_OS_DEF_FIRMWARE_BIOS: --=20 2.24.1 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list