From nobody Mon Feb 9 10:51:41 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 170.10.129.124 as permitted sender) client-ip=170.10.129.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.129.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=1698234012; cv=none; d=zohomail.com; s=zohoarc; b=G7LyAVR5reCcONgE8T8iOmh+VceBza6g7FT08ObsYzQcMW0yrin9gVQNh/BN0G3wzpkUzGYwcpy6jQrzKNH0Xc3tYe/cc2UIUM9w6hRHSqq3NoTU0VDxoKotkjXQvQccSv3JkAcAWp391GZ7KZG7/XOOT9EPBRGpMACDz7H9GZE= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1698234012; h=Content-Type:Content-Transfer-Encoding:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To:Cc; bh=cnCsTDOylwbmemF32OpKG5k8adKmFsNJJBdx9FsIFGs=; b=O/Kjo7yOvpGS4Kofhuk24QeIuRwCAV/Seyz7WfBg7/Clp2mrye1jTot7iF3o3xPa7D/OJ3qAgKDfTf1wbkISwfF8xLZVygRO98hSxrdwyTjl/Fn7uKeE0I91vv+s26Xlegw+pxMOC6z9Prm4+aY04ZkcSzvAjI3nHF4GOXOU18o= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.129.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.129.124]) by mx.zohomail.com with SMTPS id 1698234012975347.1822387956113; Wed, 25 Oct 2023 04:40:12 -0700 (PDT) Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-149-J3AiK0K6MJi4KvTZ8PD6Fg-1; Wed, 25 Oct 2023 07:40:07 -0400 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.rdu2.redhat.com [10.11.54.7]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id D3CCD80D629; Wed, 25 Oct 2023 11:39:55 +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 BA3BE1C060BA; Wed, 25 Oct 2023 11:39: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 9F4751946595; Wed, 25 Oct 2023 11:39:55 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx10.intmail.prod.int.rdu2.redhat.com [10.11.54.10]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id 0E835194658D for ; Wed, 25 Oct 2023 11:39:55 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id 022C4492BFB; Wed, 25 Oct 2023 11:39:55 +0000 (UTC) Received: from speedmetal.lan (unknown [10.45.242.14]) by smtp.corp.redhat.com (Postfix) with ESMTP id 851CE492BFC for ; Wed, 25 Oct 2023 11:39:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1698234012; 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=cnCsTDOylwbmemF32OpKG5k8adKmFsNJJBdx9FsIFGs=; b=do2Hem1a+aOEvq/Kntdi4ENN3JkymIk9wQrf3JpO3XGiT9dlpDg3LvOlGDY7b05LUupn4o Xrp79fQ9iPJL5+klG/TIlRHjzvjorvVOKz7eC3xA/itzeaiS+m9j3voru6AcK8aa2PDWEz em+Ltxq9k/dPmc08ZZ7QgJsR5CsW2z4= X-MC-Unique: J3AiK0K6MJi4KvTZ8PD6Fg-1 X-Original-To: libvir-list@listman.corp.redhat.com From: Peter Krempa To: libvir-list@redhat.com Subject: [PATCH 14/22] virDomainDiskGetDetectZeroesMode: Return proper type Date: Wed, 25 Oct 2023 13:39:24 +0200 Message-ID: <0c0b5b0e83850901448c0b7d788e874c49171b24.1698233503.git.pkrempa@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.10 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.4.1 on 10.11.54.7 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: 1698234013299100001 Content-Type: text/plain; charset="utf-8" Change the return value type to 'virDomainDiskGetDetectZeroes'. Signed-off-by: Peter Krempa --- src/conf/domain_conf.c | 2 +- src/conf/domain_conf.h | 2 +- src/qemu/qemu_block.c | 4 ++-- src/qemu/qemu_command.c | 4 ++-- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index 80f467ae7a..fa97def9f7 100644 --- a/src/conf/domain_conf.c +++ b/src/conf/domain_conf.c @@ -30592,7 +30592,7 @@ virDomainDiskTranslateSourcePool(virDomainDiskDef *= def) * don't change it in the XML for easier adjustments. This behaviour is * documented. */ -int +virDomainDiskDetectZeroes virDomainDiskGetDetectZeroesMode(virDomainDiskDiscard discard, virDomainDiskDetectZeroes detect_zeroes) { diff --git a/src/conf/domain_conf.h b/src/conf/domain_conf.h index 98f99721f0..7c0e017038 100644 --- a/src/conf/domain_conf.h +++ b/src/conf/domain_conf.h @@ -4406,7 +4406,7 @@ virDomainNetResolveActualType(virDomainNetDef *iface) int virDomainDiskTranslateSourcePool(virDomainDiskDef *def); -int +virDomainDiskDetectZeroes virDomainDiskGetDetectZeroesMode(virDomainDiskDiscard discard, virDomainDiskDetectZeroes detect_zeroes); diff --git a/src/qemu/qemu_block.c b/src/qemu/qemu_block.c index ca68b9ab66..1fa9627444 100644 --- a/src/qemu/qemu_block.c +++ b/src/qemu/qemu_block.c @@ -1270,8 +1270,8 @@ qemuBlockStorageSourceGetBlockdevFormatCommonProps(vi= rStorageSource *src) { const char *detectZeroes =3D NULL; const char *discard =3D NULL; - int detectZeroesMode =3D virDomainDiskGetDetectZeroesMode(src->discard, - src->detect_ze= roes); + virDomainDiskDetectZeroes detectZeroesMode =3D virDomainDiskGetDetectZ= eroesMode(src->discard, + = src->detect_zeroes); g_autoptr(virJSONValue) props =3D NULL; g_autoptr(virJSONValue) cache =3D NULL; diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c index fd0f12f304..98e7fa3d80 100644 --- a/src/qemu/qemu_command.c +++ b/src/qemu/qemu_command.c @@ -1680,8 +1680,8 @@ static char * qemuBuildDriveStr(virDomainDiskDef *disk) { g_auto(virBuffer) opt =3D VIR_BUFFER_INITIALIZER; - int detect_zeroes =3D virDomainDiskGetDetectZeroesMode(disk->discard, - disk->detect_zero= es); + virDomainDiskDetectZeroes detect_zeroes =3D virDomainDiskGetDetectZero= esMode(disk->discard, + = disk->detect_zeroes); if (qemuBuildDriveSourceStr(disk, &opt) < 0) return NULL; --=20 2.41.0