From nobody Mon Feb 9 22:18:42 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) client-ip=170.10.133.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.133.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=1691686267; cv=none; d=zohomail.com; s=zohoarc; b=c+r4hd9nv2RoHbWVxI5PtpWG2RMzUA0aCACRzc/rqDxieYebYgHaUsTmlkdoyV/4NUSj2n31V9K9jPBbxMTQPfvN4AqB7iGk9q7HpF2zYWzCxraUkHKhFDwaBxuYA9uPhL/8jE/b7N7Ll6qifW75fafulXMidQlEd60+KHy4nCg= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1691686267; 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=1oR2DqQz4X/R58GfIDOm9uYLBqDCGdSwwzjGK4FXk5A=; b=LYOsrlevr3OBzgWHgUYSvMWSn7NhvRVeMkQIU/2vMoTBsJz/63ZJ15tW7orrCIQVmRDfHyhoJwo+sw6jvSgQFdvxu3AiS8P5kD7d9PPwyNMyMrvttUsCI3/N4j0kH5+oNoRQ9gNpYoIViPuTNcgL2pW+QvZ5mjG3EklCP6WMGTA= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.133.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.133.124]) by mx.zohomail.com with SMTPS id 1691686267595390.6008970660089; Thu, 10 Aug 2023 09:51:07 -0700 (PDT) Received: from mimecast-mx02.redhat.com (66.187.233.73 [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-180-wgPEmRb9N0Kg89FYm4Ke3A-1; Thu, 10 Aug 2023 12:51:00 -0400 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 1113B28237D2; Thu, 10 Aug 2023 16:50:56 +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 ED89E2166B25; Thu, 10 Aug 2023 16:50:55 +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 B35501946A69; Thu, 10 Aug 2023 16:50:49 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.rdu2.redhat.com [10.11.54.7]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id 4A08E1946A62 for ; Thu, 10 Aug 2023 16:50:46 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id 29F54140E971; Thu, 10 Aug 2023 16:50:46 +0000 (UTC) Received: from harajuku.usersys.redhat.com.homenet.telecomitalia.it (unknown [10.45.224.46]) by smtp.corp.redhat.com (Postfix) with ESMTPS id A85BA140E96F for ; Thu, 10 Aug 2023 16:50:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1691686266; 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=1oR2DqQz4X/R58GfIDOm9uYLBqDCGdSwwzjGK4FXk5A=; b=TYy1UFunVSADeCqQrAIwaJlWjN6tHR+4RwPq778NTq5fLVmMY7EzJUWB6RXCvJuw1imhQY jD3S1U6k3z4ctKeIaTi5nqxTf8uHfoHCGjeYzRn9viXNL6KlruhIQeLqx+9BBUvy+vDw0Q obAcqZMF1Lc18jpgSVbmzoS1qw3t0bY= X-MC-Unique: wgPEmRb9N0Kg89FYm4Ke3A-1 X-Original-To: libvir-list@listman.corp.redhat.com From: Andrea Bolognani To: libvir-list@redhat.com Subject: [libvirt PATCH 07/21] qemu: Fix return value for qemuFirmwareFillDomainLegacy() Date: Thu, 10 Aug 2023 18:50:24 +0200 Message-ID: <20230810165038.169700-8-abologna@redhat.com> In-Reply-To: <20230810165038.169700-1-abologna@redhat.com> References: <20230810165038.169700-1-abologna@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.7 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 3.1 on 10.11.54.6 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: 1691686268274100003 Content-Type: text/plain; charset="utf-8"; x-default="true" The documentation states that, just like the Modern() variant, this function should return 1 if a match wasn't found. It currently doesn't do that, and returns 0 instead. Signed-off-by: Andrea Bolognani --- src/qemu/qemu_firmware.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/qemu/qemu_firmware.c b/src/qemu/qemu_firmware.c index cf9a45dc39..5f030ebce4 100644 --- a/src/qemu/qemu_firmware.c +++ b/src/qemu/qemu_firmware.c @@ -1575,17 +1575,17 @@ qemuFirmwareFillDomainLegacy(virQEMUDriver *driver, size_t i; =20 if (!loader) - return 0; + return 1; =20 if (loader->type !=3D VIR_DOMAIN_LOADER_TYPE_PFLASH) { VIR_DEBUG("Ignoring legacy entries for '%s' loader", virDomainLoaderTypeToString(loader->type)); - return 0; + return 1; } =20 if (loader->stateless =3D=3D VIR_TRISTATE_BOOL_YES) { VIR_DEBUG("Ignoring legacy entries for stateless loader"); - return 0; + return 1; } =20 if (loader->format !=3D VIR_STORAGE_FILE_RAW) { --=20 2.41.0