From nobody Mon Sep 8 21:40:30 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.libvirt.org designates 8.43.85.245 as permitted sender) client-ip=8.43.85.245; envelope-from=devel-bounces@lists.libvirt.org; helo=lists.libvirt.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of lists.libvirt.org designates 8.43.85.245 as permitted sender) smtp.mailfrom=devel-bounces@lists.libvirt.org; dmarc=pass(p=reject dis=none) header.from=lists.libvirt.org ARC-Seal: i=1; a=rsa-sha256; t=1747232708; cv=none; d=zohomail.com; s=zohoarc; b=MkVm06IQCp16hRhfMGx/nL93yc3wCHDgnzFbmYZsXDO3YqENwJGKQfPVtTjvIEegw7Fj1Un4PZrZDPQAny9IN05y3ClhQRdSCMb8sAemvE7fYTzjlYYkFtiYAzB7d7LOsTdkLWlwo3/JYZWUtnwh7rv4Z7+bIFTq2ry6/o4h+v8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1747232708; 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:Reply-To:Reply-To:References:Subject:Subject:To:To:Message-Id:Cc; bh=mENr0fQEfz8I+JQXAbvh78zDcO+8o9qiyf9zXQiOiFs=; b=cW+CgiEHwr8EUnQfLe4g3mA/COdwok5ZMYLZUkHORMxfv2TQhtA58wYMGXAT9dZ6tjM6JcNL1/lmAaCZrP6/GUwiI/lQWTv4izyGgNSry1Kx8/2F8rDZxMzbJRY5r5/7GsUwDNGXlzpsFB+aJlGMvDDBBvSX8DjvZAYtZS+Zkeg= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of lists.libvirt.org designates 8.43.85.245 as permitted sender) smtp.mailfrom=devel-bounces@lists.libvirt.org; dmarc=pass header.from= (p=reject dis=none) Return-Path: Received: from lists.libvirt.org (lists.libvirt.org [8.43.85.245]) by mx.zohomail.com with SMTPS id 1747232708083415.6188020040174; Wed, 14 May 2025 07:25:08 -0700 (PDT) Received: by lists.libvirt.org (Postfix, from userid 996) id 6516CD76; Wed, 14 May 2025 10:25:07 -0400 (EDT) Received: from lists.libvirt.org (localhost [IPv6:::1]) by lists.libvirt.org (Postfix) with ESMTP id 3E91AE5A; Wed, 14 May 2025 10:24:29 -0400 (EDT) Received: by lists.libvirt.org (Postfix, from userid 996) id A01E1CA1; Wed, 14 May 2025 10:24:24 -0400 (EDT) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by lists.libvirt.org (Postfix) with ESMTPS id 29021CA5 for ; Wed, 14 May 2025 10:24:24 -0400 (EDT) Received: from mx-prod-mc-08.mail-002.prod.us-west-2.aws.redhat.com (ec2-35-165-154-97.us-west-2.compute.amazonaws.com [35.165.154.97]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-356-0oWDIWlbP8-O0ofXeF2msA-1; Wed, 14 May 2025 10:24:22 -0400 Received: from mx-prod-int-02.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-02.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.15]) (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 mx-prod-mc-08.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 8E37118001EA for ; Wed, 14 May 2025 14:24:21 +0000 (UTC) Received: from moe.brq.redhat.com (unknown [10.43.3.236]) by mx-prod-int-02.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id CBB331955F24 for ; Wed, 14 May 2025 14:24:20 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on lists.libvirt.org X-Spam-Level: X-Spam-Status: No, score=-0.8 required=5.0 tests=DKIM_INVALID,DKIM_SIGNED, MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H5, RCVD_IN_MSPIKE_WL,RCVD_IN_VALIDITY_RPBL_BLOCKED, RCVD_IN_VALIDITY_SAFE_BLOCKED,SPF_HELO_NONE autolearn=unavailable autolearn_force=no version=3.4.4 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1747232663; h=from:from: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; bh=PqpNOoNVITWSACa7SE1yCG/tGBev+0HlN9U6MmeE6g4=; b=ZEtF2anPQAuS4MS1/oBiB6UquH8cYQ7MdrZUOXpUr1b1qaeSxOdyX71wyVa2/hL8woWvVy 6ikhf6DQ/tkS/+pOdHDSwjxbZDwFWAifJW5Q5KDvXtkSh0wW9Fi/HYMsNu4uhzQ7teQ2xl yVVsXdZ80M0zhoqL0GGlgOH5j8+epfQ= X-MC-Unique: 0oWDIWlbP8-O0ofXeF2msA-1 X-Mimecast-MFC-AGG-ID: 0oWDIWlbP8-O0ofXeF2msA_1747232661 To: devel@lists.libvirt.org Subject: [PATCH 1/7] storage_backend_rbd.c: Make virStorageBackendRBDSetAllocation() stub report an error Date: Wed, 14 May 2025 16:24:10 +0200 Message-ID: <5ca42e2271b9e508fcf8df217d5b8457b963f355.1747232412.git.mprivozn@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.0 on 10.30.177.15 X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: lhFV3dqlCWf3noVA5l_efgRx4LqslGNbHFKJCp-fnjA_1747232661 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable Message-ID-Hash: BMTHTH5OKPO7MTPFE45Z3MCB4TS6DFQP X-Message-ID-Hash: BMTHTH5OKPO7MTPFE45Z3MCB4TS6DFQP X-MailFrom: mprivozn@redhat.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-config-1; header-match-config-2; header-match-config-3; header-match-devel.lists.libvirt.org-0; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; suspicious-header X-Mailman-Version: 3.2.2 Precedence: list List-Id: Development discussions about the libvirt library & tools Archived-At: List-Archive: List-Help: List-Post: List-Subscribe: List-Unsubscribe: From: Michal Privoznik via Devel Reply-To: Michal Privoznik X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1747232711267019000 Content-Type: text/plain; charset="utf-8"; x-default="true" From: Michal Privoznik Inside of storage_backend_rbd.c there are two implementations of virStorageBackendRBDSetAllocation(). One reports an error on failure, so the stub implementation should report an error too. Signed-off-by: Michal Privoznik Reviewed-by: Peter Krempa --- src/storage/storage_backend_rbd.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/storage/storage_backend_rbd.c b/src/storage/storage_backen= d_rbd.c index 832f48df16..c2dbf3a307 100644 --- a/src/storage/storage_backend_rbd.c +++ b/src/storage/storage_backend_rbd.c @@ -515,6 +515,7 @@ virStorageBackendRBDSetAllocation(virStorageVolDef *vol= G_GNUC_UNUSED, rbd_image_t *image G_GNUC_UNUSED, rbd_image_info_t *info G_GNUC_UNUSED) { + virReportUnsupportedError(); return false; } #endif --=20 2.49.0 From nobody Mon Sep 8 21:40:30 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.libvirt.org designates 8.43.85.245 as permitted sender) client-ip=8.43.85.245; envelope-from=devel-bounces@lists.libvirt.org; helo=lists.libvirt.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of lists.libvirt.org designates 8.43.85.245 as permitted sender) smtp.mailfrom=devel-bounces@lists.libvirt.org; dmarc=pass(p=reject dis=none) header.from=lists.libvirt.org ARC-Seal: i=1; a=rsa-sha256; t=1747232727; cv=none; d=zohomail.com; s=zohoarc; b=AIT9v2X/bqHJk4s1NQZSu4APJx8/vuK5A+9O7Ip0dAXg8h2cb5t80BZFcSY4j9GhdsOSAVtqa3oyS3l3B6qAEwlky4KxxkQaBjF136DKDTk2O+zSqCPzl9UdZIE3FyngdFnGhSEg7iqttkx0izfOBB0xwDBmndrgscygJGUlLTQ= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1747232727; 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:Reply-To:Reply-To:References:Subject:Subject:To:To:Message-Id:Cc; bh=pk2YXjmWm3HqAhsB32Po4gACs7D21KhDHs9yMUN+ilo=; b=Qn8hvARmZnvWlS25YOo47ZDqyVzhfQrgjD9vcP7/hng6LYGB755JJLzX/x4CugAZBDx13Ivt9x4JHMqd0gv4YeZccuCFIp9nxKLfchAe10jRgcU24/SB6Q+qMyXh77Llpq7HneiC/uDpz+J72eM7qrUxCYa8B1YVIS2IUmUHreI= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of lists.libvirt.org designates 8.43.85.245 as permitted sender) smtp.mailfrom=devel-bounces@lists.libvirt.org; dmarc=pass header.from= (p=reject dis=none) Return-Path: Received: from lists.libvirt.org (lists.libvirt.org [8.43.85.245]) by mx.zohomail.com with SMTPS id 1747232727268925.5218344272205; Wed, 14 May 2025 07:25:27 -0700 (PDT) Received: by lists.libvirt.org (Postfix, from userid 996) id 9810C1259; Wed, 14 May 2025 10:25:26 -0400 (EDT) Received: from lists.libvirt.org (localhost [IPv6:::1]) by lists.libvirt.org (Postfix) with ESMTP id 2F85CD3A; Wed, 14 May 2025 10:24:32 -0400 (EDT) Received: by lists.libvirt.org (Postfix, from userid 996) id B437BCA9; Wed, 14 May 2025 10:24:25 -0400 (EDT) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by lists.libvirt.org (Postfix) with ESMTPS id 3E283C5D for ; Wed, 14 May 2025 10:24:25 -0400 (EDT) Received: from mx-prod-mc-04.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-321-detEBgblOLaRIFhjY37zjA-1; Wed, 14 May 2025 10:24:23 -0400 Received: from mx-prod-int-02.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-02.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.15]) (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 mx-prod-mc-04.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id B68301955DD0 for ; Wed, 14 May 2025 14:24:22 +0000 (UTC) Received: from moe.brq.redhat.com (unknown [10.43.3.236]) by mx-prod-int-02.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 0C94E1955F24 for ; Wed, 14 May 2025 14:24:21 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on lists.libvirt.org X-Spam-Level: X-Spam-Status: No, score=-0.8 required=5.0 tests=DKIM_INVALID,DKIM_SIGNED, MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H5, RCVD_IN_MSPIKE_WL,RCVD_IN_VALIDITY_RPBL_BLOCKED, RCVD_IN_VALIDITY_SAFE_BLOCKED,SPF_HELO_NONE autolearn=unavailable autolearn_force=no version=3.4.4 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1747232665; h=from:from: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; bh=3JNnuGkFNytHc2mwi6IH1JUiKmOQjw+MpbayLLdda/o=; b=LbeUBww4Uku3qA1E/bgUpwJMG574ZzLBTi1QSW/81jVuqkwl6/EtUDGNSUmxZ/2B/7aWoy kbHfsvuZcyQShPgayi1L30W8zaeiUYF1Nnkzo3E60KcqI1E4gAcIy4kShYkkfSc1WI5dvH ruc9FAKQdKFZsVKJFi8FpgBLSThWhzc= X-MC-Unique: detEBgblOLaRIFhjY37zjA-1 X-Mimecast-MFC-AGG-ID: detEBgblOLaRIFhjY37zjA_1747232662 To: devel@lists.libvirt.org Subject: [PATCH 2/7] nwfilter: Fix return type of virNWFilterCanApplyBasicRules callback Date: Wed, 14 May 2025 16:24:11 +0200 Message-ID: In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.0 on 10.30.177.15 X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: UTcTPN3MFGqlHMWi9EPwuk9akvHkJhaL70RTLFlTJAg_1747232662 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable Message-ID-Hash: SXXPSOVQHMBPKM3NDN6NK4LYQONSX3RW X-Message-ID-Hash: SXXPSOVQHMBPKM3NDN6NK4LYQONSX3RW X-MailFrom: mprivozn@redhat.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-config-1; header-match-config-2; header-match-config-3; header-match-devel.lists.libvirt.org-0; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; suspicious-header X-Mailman-Version: 3.2.2 Precedence: list List-Id: Development discussions about the libvirt library & tools Archived-At: List-Archive: List-Help: List-Post: List-Subscribe: List-Unsubscribe: From: Michal Privoznik via Devel Reply-To: Michal Privoznik X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1747232728161019000 Content-Type: text/plain; charset="utf-8"; x-default="true" From: Michal Privoznik The virNWFilterCanApplyBasicRules() callback returns an int but in fact its return type is a boolean. Even its only implementation (ebiptablesCanApplyBasicRules()) returns a boolean. Switch the return type from integer to boolean. Signed-off-by: Michal Privoznik Reviewed-by: Peter Krempa --- src/nwfilter/nwfilter_ebiptables_driver.c | 2 +- src/nwfilter/nwfilter_tech_driver.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/nwfilter/nwfilter_ebiptables_driver.c b/src/nwfilter/nwfil= ter_ebiptables_driver.c index 5082b62577..067df6e612 100644 --- a/src/nwfilter/nwfilter_ebiptables_driver.c +++ b/src/nwfilter/nwfilter_ebiptables_driver.c @@ -2797,7 +2797,7 @@ ebtablesRenameTmpSubAndRootChainsFW(virFirewall *fw, * run ebtablesApplyBasicRules and ebtablesApplyDHCPOnlyRules. * In case of this driver we need the ebtables tool available. */ -static int +static bool ebiptablesCanApplyBasicRules(void) { return true; diff --git a/src/nwfilter/nwfilter_tech_driver.h b/src/nwfilter/nwfilter_te= ch_driver.h index 8de9eda947..a4af0bf6d5 100644 --- a/src/nwfilter/nwfilter_tech_driver.h +++ b/src/nwfilter/nwfilter_tech_driver.h @@ -51,7 +51,7 @@ typedef int (*virNWFilterRuleTeardownOldRules)(const char= *ifname); =20 typedef int (*virNWFilterRuleAllTeardown)(const char *ifname); =20 -typedef int (*virNWFilterCanApplyBasicRules)(void); +typedef bool (*virNWFilterCanApplyBasicRules)(void); =20 typedef int (*virNWFilterApplyBasicRules)(const char *ifname, const virMacAddr *macaddr); --=20 2.49.0 From nobody Mon Sep 8 21:40:30 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.libvirt.org designates 8.43.85.245 as permitted sender) client-ip=8.43.85.245; envelope-from=devel-bounces@lists.libvirt.org; helo=lists.libvirt.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of lists.libvirt.org designates 8.43.85.245 as permitted sender) smtp.mailfrom=devel-bounces@lists.libvirt.org; dmarc=pass(p=reject dis=none) header.from=lists.libvirt.org ARC-Seal: i=1; a=rsa-sha256; t=1747232745; cv=none; d=zohomail.com; s=zohoarc; b=F0jpZQd5rDrYb+hUvBe/PdKWiWYSOaQbpaCZgx8g2dc0bGBWK7IVEkd3Ic2X1UASTzmgfUIx9QJhOAJXSQje1uNur+xUCHWPWlj23i/uOpCSsQ9ojQYylM/kXhoRE87+OoILIKJrXRFua713EEVDWTTQK3iSIT6cjRTkDwe+0tQ= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1747232745; 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:Reply-To:Reply-To:References:Subject:Subject:To:To:Message-Id:Cc; bh=gYWJXdX4jNNtFsG+muB194cAVa1ApKAkNEQs/qX8bRY=; b=YHtBqvm5XKE6FcpMHTTzKUufroFClM46zMDhztU1cW+UcGMBWNpL4JHY0Bdrqdfwofh0XO33Nme85k/ywXzf2IYw0gp0KucLK0+pVCf6+STQVTDiaeWr+LDTyWd098vnB4f4ZNh1YYQ+b5fIBuR5TVQFvN2ctAfhDeALnwkPlS4= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of lists.libvirt.org designates 8.43.85.245 as permitted sender) smtp.mailfrom=devel-bounces@lists.libvirt.org; dmarc=pass header.from= (p=reject dis=none) Return-Path: Received: from lists.libvirt.org (lists.libvirt.org [8.43.85.245]) by mx.zohomail.com with SMTPS id 1747232744998358.9600361054635; Wed, 14 May 2025 07:25:44 -0700 (PDT) Received: by lists.libvirt.org (Postfix, from userid 996) id 6718A1214; Wed, 14 May 2025 10:25:44 -0400 (EDT) Received: from lists.libvirt.org (localhost [IPv6:::1]) by lists.libvirt.org (Postfix) with ESMTP id D08661212; Wed, 14 May 2025 10:24:33 -0400 (EDT) Received: by lists.libvirt.org (Postfix, from userid 996) id B85E8CA5; Wed, 14 May 2025 10:24:26 -0400 (EDT) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by lists.libvirt.org (Postfix) with ESMTPS id 44940CA1 for ; Wed, 14 May 2025 10:24:26 -0400 (EDT) Received: from mx-prod-mc-06.mail-002.prod.us-west-2.aws.redhat.com (ec2-35-165-154-97.us-west-2.compute.amazonaws.com [35.165.154.97]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-428-CR-CSG0HOmOnlfo38Dn_5A-1; Wed, 14 May 2025 10:24:24 -0400 Received: from mx-prod-int-02.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-02.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.15]) (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 mx-prod-mc-06.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id DF2B5180035F for ; Wed, 14 May 2025 14:24:23 +0000 (UTC) Received: from moe.brq.redhat.com (unknown [10.43.3.236]) by mx-prod-int-02.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 2B5241955F24 for ; Wed, 14 May 2025 14:24:22 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on lists.libvirt.org X-Spam-Level: X-Spam-Status: No, score=-0.8 required=5.0 tests=DKIM_INVALID,DKIM_SIGNED, MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H5, RCVD_IN_MSPIKE_WL,RCVD_IN_VALIDITY_RPBL_BLOCKED, RCVD_IN_VALIDITY_SAFE_BLOCKED,SPF_HELO_NONE autolearn=unavailable autolearn_force=no version=3.4.4 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1747232666; h=from:from: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; bh=c1sA9ONSx6uDyFL+8o7K3No3b3CtRNZzo5S3DCxhO5I=; b=TOAOUgsi/VndHQy3HEmXiPKSsSYtue2A4bH9V9zHIFw3TI0Txib3xUUrx0ANnnGO32HsuM hGNZzxfQnlx6n0kDdXi8EJ6fNsBZ2DT5eSUXPttNHpSUA75FdeWXkSn+xWgrCfBjvzr3lZ 7ZLbT18DVgJINsV3gHb0juXejHKQ1mY= X-MC-Unique: CR-CSG0HOmOnlfo38Dn_5A-1 X-Mimecast-MFC-AGG-ID: CR-CSG0HOmOnlfo38Dn_5A_1747232664 To: devel@lists.libvirt.org Subject: [PATCH 3/7] qemu_process: Fix return type of qemuDomainHasHotpluggableStartupVcpus() Date: Wed, 14 May 2025 16:24:12 +0200 Message-ID: In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.0 on 10.30.177.15 X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: OZzu3sdQm18SgIMrnWo4ddgOR9Mb3iRTbAFv_whw6pU_1747232664 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable Message-ID-Hash: 7YNYRAXXXPTFHZECD65BE3MF5L34ZU2W X-Message-ID-Hash: 7YNYRAXXXPTFHZECD65BE3MF5L34ZU2W X-MailFrom: mprivozn@redhat.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-config-1; header-match-config-2; header-match-config-3; header-match-devel.lists.libvirt.org-0; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; suspicious-header X-Mailman-Version: 3.2.2 Precedence: list List-Id: Development discussions about the libvirt library & tools Archived-At: List-Archive: List-Help: List-Post: List-Subscribe: List-Unsubscribe: From: Michal Privoznik via Devel Reply-To: Michal Privoznik X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1747232746178019000 Content-Type: text/plain; charset="utf-8"; x-default="true" From: Michal Privoznik The qemuDomainHasHotpluggableStartupVcpus() function is declared to return an int but in fact its return type is a boolean. Even its only caller (qemuProcessLaunch()) threads its retval as a boolean. Switch the return type from integer to boolean. Signed-off-by: Michal Privoznik Reviewed-by: Peter Krempa --- src/qemu/qemu_process.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/qemu/qemu_process.c b/src/qemu/qemu_process.c index 1af91c5909..7fe49adfb4 100644 --- a/src/qemu/qemu_process.c +++ b/src/qemu/qemu_process.c @@ -6405,7 +6405,7 @@ qemuProcessValidateHotpluggableVcpus(virDomainDef *de= f) } =20 =20 -static int +static bool qemuDomainHasHotpluggableStartupVcpus(virDomainDef *def) { size_t maxvcpus =3D virDomainDefGetVcpusMax(def); --=20 2.49.0 From nobody Mon Sep 8 21:40:30 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.libvirt.org designates 8.43.85.245 as permitted sender) client-ip=8.43.85.245; envelope-from=devel-bounces@lists.libvirt.org; helo=lists.libvirt.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of lists.libvirt.org designates 8.43.85.245 as permitted sender) smtp.mailfrom=devel-bounces@lists.libvirt.org; dmarc=pass(p=reject dis=none) header.from=lists.libvirt.org ARC-Seal: i=1; a=rsa-sha256; t=1747232761; cv=none; d=zohomail.com; s=zohoarc; b=Lp88tCq8KGlnmWJUF1b8SXb0WIOhEwLcgp4lSxiuj5zgrXaIfsQdg7t5rksFqoYzkyKHr5vmV2iEADKxL37gMB0men/AJxFVt7xz2d6zQ173XjSYId1XsdNFUq0cvYGI7wCfxg9nbt29yUBwvO9yz9C5yWD6X3yK9emQTlOJ0bU= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1747232761; 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:Reply-To:Reply-To:References:Subject:Subject:To:To:Message-Id:Cc; bh=E6q+hwJ4gjat/GafJN4fCeePd6hVF9+2ZY34viJB3TY=; b=MxJwKo6BhgjFiTNwXR5+H6HN7vw6JEPGJs+F1jdWuet04/yNUVyTBNHpvZ3e38Ai+qpOBNsTzXAAMuZpeU4hrIgGJh1V1/TldU288ParJkEUWcZCiIqYwxYj0cAVctmpvD8N9del4LHabcEV3lmT0AzvSRqWP5PUmVMUFxQ7jpI= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of lists.libvirt.org designates 8.43.85.245 as permitted sender) smtp.mailfrom=devel-bounces@lists.libvirt.org; dmarc=pass header.from= (p=reject dis=none) Return-Path: Received: from lists.libvirt.org (lists.libvirt.org [8.43.85.245]) by mx.zohomail.com with SMTPS id 1747232761622223.93686482299097; Wed, 14 May 2025 07:26:01 -0700 (PDT) Received: by lists.libvirt.org (Postfix, from userid 996) id 14CFBBFB; Wed, 14 May 2025 10:26:01 -0400 (EDT) Received: from lists.libvirt.org (localhost [IPv6:::1]) by lists.libvirt.org (Postfix) with ESMTP id AB59DE72; Wed, 14 May 2025 10:24:36 -0400 (EDT) Received: by lists.libvirt.org (Postfix, from userid 996) id 22A00D0D; Wed, 14 May 2025 10:24:28 -0400 (EDT) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by lists.libvirt.org (Postfix) with ESMTPS id 68F92CA1 for ; Wed, 14 May 2025 10:24:27 -0400 (EDT) Received: from mx-prod-mc-05.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-100-2DCxzhCLO52puPSlybSGPA-1; Wed, 14 May 2025 10:24:25 -0400 Received: from mx-prod-int-02.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-02.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.15]) (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 mx-prod-mc-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 145CC195608B for ; Wed, 14 May 2025 14:24:25 +0000 (UTC) Received: from moe.brq.redhat.com (unknown [10.43.3.236]) by mx-prod-int-02.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 5417E1955F24 for ; Wed, 14 May 2025 14:24:24 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on lists.libvirt.org X-Spam-Level: X-Spam-Status: No, score=-0.8 required=5.0 tests=DKIM_INVALID,DKIM_SIGNED, MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H5, RCVD_IN_MSPIKE_WL,RCVD_IN_VALIDITY_RPBL_BLOCKED, RCVD_IN_VALIDITY_SAFE_BLOCKED,SPF_HELO_NONE autolearn=unavailable autolearn_force=no version=3.4.4 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1747232667; h=from:from: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; bh=iPNFk+OJ6b4NndfVVX8fQdh2Ya2errZCGtJvclLbuTw=; b=hq4zPbal/hL+MS6TTW0vQQ4R5LON2ne40w0J6ZchatFFDxGkvVHY71Mxl6ZVFVn/eamqIU 4LtzHKYAXKSCjq5p34qSYIpVUxRyl58sEwT8Xr+Jlr7HJPM6k4CcPYkMHgJINM87ef2MNI 6Mz53ejiJ5/MxEON+co5Q35YH364DbY= X-MC-Unique: 2DCxzhCLO52puPSlybSGPA-1 X-Mimecast-MFC-AGG-ID: 2DCxzhCLO52puPSlybSGPA_1747232665 To: devel@lists.libvirt.org Subject: [PATCH 4/7] storage_backend_rbd.C: Fix return type of a volStorageBackendRBDUseFastDiff() stub Date: Wed, 14 May 2025 16:24:13 +0200 Message-ID: <96ee96e85404fde1a7bb80d4cb9e2de5914d72f6.1747232412.git.mprivozn@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.0 on 10.30.177.15 X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: j-oSXGCz3psk_dPY6-UNjiVB_ZOGrb5LOdeAuz3GBdM_1747232665 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable Message-ID-Hash: 2KYKXURS6GUSGVSSGHMGU3VQVHKPN4JW X-Message-ID-Hash: 2KYKXURS6GUSGVSSGHMGU3VQVHKPN4JW X-MailFrom: mprivozn@redhat.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-config-1; header-match-config-2; header-match-config-3; header-match-devel.lists.libvirt.org-0; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; suspicious-header X-Mailman-Version: 3.2.2 Precedence: list List-Id: Development discussions about the libvirt library & tools Archived-At: List-Archive: List-Help: List-Post: List-Subscribe: List-Unsubscribe: From: Michal Privoznik via Devel Reply-To: Michal Privoznik X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1747232762279019000 Content-Type: text/plain; charset="utf-8"; x-default="true" From: Michal Privoznik Inside of storage_backend.c there are two implementations of volStorageBackendRBDUseFastDiff() function: one when librbd is new enough and one when it isn't. The former returns a bool, but the latter is declared to return an int despite it returning a boolean. Fix the latter. Signed-off-by: Michal Privoznik Reviewed-by: Peter Krempa --- src/storage/storage_backend_rbd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/storage/storage_backend_rbd.c b/src/storage/storage_backen= d_rbd.c index c2dbf3a307..fd46c8be55 100644 --- a/src/storage/storage_backend_rbd.c +++ b/src/storage/storage_backend_rbd.c @@ -503,7 +503,7 @@ volStorageBackendRBDGetFlags(rbd_image_t image G_GNUC_U= NUSED, return 0; } =20 -static int +static bool volStorageBackendRBDUseFastDiff(uint64_t features G_GNUC_UNUSED, uint64_t feature_flags G_GNUC_UNUSED) { --=20 2.49.0 From nobody Mon Sep 8 21:40:30 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.libvirt.org designates 8.43.85.245 as permitted sender) client-ip=8.43.85.245; envelope-from=devel-bounces@lists.libvirt.org; helo=lists.libvirt.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of lists.libvirt.org designates 8.43.85.245 as permitted sender) smtp.mailfrom=devel-bounces@lists.libvirt.org; dmarc=pass(p=reject dis=none) header.from=lists.libvirt.org ARC-Seal: i=1; a=rsa-sha256; t=1747232782; cv=none; d=zohomail.com; s=zohoarc; b=TVzKpZmYdXMiwTqXBbwmDXSv+PFMb7mOFMLvYGXXp42/5uTSJ4WHmMQXpRBGgQ4WAaIgFhMrUYITjRhrnfIM6i9kj+jmt5bP5BnC/62kHgsukgouzQrxB1ZUlWoBBnOGnB6ilnm2rKg2f5rcNifvIafzYYC8sTzOZhBxz1THMhY= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1747232782; 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:Reply-To:Reply-To:References:Subject:Subject:To:To:Message-Id:Cc; bh=ooWuAe5sZAk+KKqmmv9+ftfE9rhQZ0Cq5pYSVxCFcjA=; b=FMjWwSs+7e0SSTPdoIiEQd+ePyHkq7EQreTFzmsjzt4aS4+KWJspYBpAjBAS706rOr8q+m4paJd2YrritCQxo843/cwHzSiGjT13xWrl+iq0EtirHVmIejYJzbIT5N/XroiEZhUlvOLPlfPc2BlAVADbkUhj6BPtuvtCnD2VmBo= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of lists.libvirt.org designates 8.43.85.245 as permitted sender) smtp.mailfrom=devel-bounces@lists.libvirt.org; dmarc=pass header.from= (p=reject dis=none) Return-Path: Received: from lists.libvirt.org (lists.libvirt.org [8.43.85.245]) by mx.zohomail.com with SMTPS id 1747232782690453.497311971865; Wed, 14 May 2025 07:26:22 -0700 (PDT) Received: by lists.libvirt.org (Postfix, from userid 996) id 9E472E68; Wed, 14 May 2025 10:26:21 -0400 (EDT) Received: from lists.libvirt.org (localhost [IPv6:::1]) by lists.libvirt.org (Postfix) with ESMTP id DA1A61235; Wed, 14 May 2025 10:24:40 -0400 (EDT) Received: by lists.libvirt.org (Postfix, from userid 996) id E0A93E74; Wed, 14 May 2025 10:24:34 -0400 (EDT) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by lists.libvirt.org (Postfix) with ESMTPS id 0649ED8F for ; Wed, 14 May 2025 10:24:28 -0400 (EDT) Received: from mx-prod-mc-08.mail-002.prod.us-west-2.aws.redhat.com (ec2-35-165-154-97.us-west-2.compute.amazonaws.com [35.165.154.97]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-142-BkKFs3GkO6WLy-uSlDtsdg-1; Wed, 14 May 2025 10:24:27 -0400 Received: from mx-prod-int-02.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-02.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.15]) (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 mx-prod-mc-08.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 33F18180036D for ; Wed, 14 May 2025 14:24:26 +0000 (UTC) Received: from moe.brq.redhat.com (unknown [10.43.3.236]) by mx-prod-int-02.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 7DBB01955F24 for ; Wed, 14 May 2025 14:24:25 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on lists.libvirt.org X-Spam-Level: X-Spam-Status: No, score=-0.8 required=5.0 tests=DKIM_INVALID,DKIM_SIGNED, MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H5, RCVD_IN_MSPIKE_WL,RCVD_IN_VALIDITY_RPBL_BLOCKED, RCVD_IN_VALIDITY_SAFE_BLOCKED,SPF_HELO_NONE autolearn=unavailable autolearn_force=no version=3.4.4 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1747232668; h=from:from: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; bh=qAU3EoLguHPD7QKEb2EnsdYxs9GEHRzJx7LZk/WVCtE=; b=ZSrD/At3oL/6GOf9ifH8LzZ4tw/iHRqHxIdrXkVSuPhK/1a9VGovCl+IVRMTli3m4khawf NTbJXxzlaHlQpU3xuQsWBDGHhau1vR+H99qW0MUm+Oc5HHTGVy0DCXkk4QPUlyx3ag/aki ZdsutBpiigEfcC/YOm/ddq0VIPDZc2g= X-MC-Unique: BkKFs3GkO6WLy-uSlDtsdg-1 X-Mimecast-MFC-AGG-ID: BkKFs3GkO6WLy-uSlDtsdg_1747232666 To: devel@lists.libvirt.org Subject: [PATCH 5/7] virnetdevvlan: Fix return type of virNetDevVlanEqual() Date: Wed, 14 May 2025 16:24:14 +0200 Message-ID: <69e5b3da5bce10412de46f350b7aa0710c042916.1747232412.git.mprivozn@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.0 on 10.30.177.15 X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: fYKkPeLQsEy0JxOZ2C2hwxK7BGdZv7yNFQCncu3sVn8_1747232666 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable Message-ID-Hash: GE4MILUWLNTPJKNJVAGDNRBRABWQEMCB X-Message-ID-Hash: GE4MILUWLNTPJKNJVAGDNRBRABWQEMCB X-MailFrom: mprivozn@redhat.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-config-1; header-match-config-2; header-match-config-3; header-match-devel.lists.libvirt.org-0; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; suspicious-header X-Mailman-Version: 3.2.2 Precedence: list List-Id: Development discussions about the libvirt library & tools Archived-At: List-Archive: List-Help: List-Post: List-Subscribe: List-Unsubscribe: From: Michal Privoznik via Devel Reply-To: Michal Privoznik X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1747232784210116600 Content-Type: text/plain; charset="utf-8"; x-default="true" From: Michal Privoznik The virNetDevVlanEqual() function is declared to return an int but in fact its return type is a boolean. Even its only caller (qemuDomainChangeNet()) threads its retval as a boolean. Switch the return type from integer to boolean. Signed-off-by: Michal Privoznik Reviewed-by: Peter Krempa --- src/util/virnetdevvlan.c | 2 +- src/util/virnetdevvlan.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/util/virnetdevvlan.c b/src/util/virnetdevvlan.c index b0e05d8ffe..453b8d0ac9 100644 --- a/src/util/virnetdevvlan.c +++ b/src/util/virnetdevvlan.c @@ -41,7 +41,7 @@ virNetDevVlanFree(virNetDevVlan *vlan) g_free(vlan); } =20 -int +bool virNetDevVlanEqual(const virNetDevVlan *a, const virNetDevVlan *b) { int ai, bi; diff --git a/src/util/virnetdevvlan.h b/src/util/virnetdevvlan.h index fd2f8023f5..59f7fa523d 100644 --- a/src/util/virnetdevvlan.h +++ b/src/util/virnetdevvlan.h @@ -41,7 +41,7 @@ struct _virNetDevVlan { =20 void virNetDevVlanClear(virNetDevVlan *vlan); void virNetDevVlanFree(virNetDevVlan *vlan); -int virNetDevVlanEqual(const virNetDevVlan *a, const virNetDevVlan *b); +bool virNetDevVlanEqual(const virNetDevVlan *a, const virNetDevVlan *b); void virNetDevVlanCopy(virNetDevVlan *dst, const virNetDevVlan *src); =20 G_DEFINE_AUTOPTR_CLEANUP_FUNC(virNetDevVlan, virNetDevVlanFree); --=20 2.49.0 From nobody Mon Sep 8 21:40:30 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.libvirt.org designates 8.43.85.245 as permitted sender) client-ip=8.43.85.245; envelope-from=devel-bounces@lists.libvirt.org; helo=lists.libvirt.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of lists.libvirt.org designates 8.43.85.245 as permitted sender) smtp.mailfrom=devel-bounces@lists.libvirt.org; dmarc=pass(p=reject dis=none) header.from=lists.libvirt.org ARC-Seal: i=1; a=rsa-sha256; t=1747232827; cv=none; d=zohomail.com; s=zohoarc; b=fNRQSpMMH0ox/V4w60ILYQRkAdSBTyUCaUm3GErcq8uYp7Ik5cUw5JnUt35U0HndhPXK/x2zG3qwVcOWZtKnZBAcWfyhWBsux/UGtF+sKmefTxxmfwxjCSIYRrEYL5izXGDbNtrb2pTp6qVglROfj9hJNz5qxiiwPh5kHzyVXls= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1747232827; 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:Reply-To:Reply-To:References:Subject:Subject:To:To:Message-Id:Cc; bh=/CEdqu4JR2QRnjJ80QKeQjflKs9yL54zRIlEzxwomaQ=; b=Q8vVkqPUUxSGs7IJ9Juiyz7HUmPTJHM4PrDoFszPrexeSkmj2Qf69dLosQHjvc1uwSNSCUedL04voZbiaYVMncnuxuzCEY7qRHGrrZD/snpl+eRppmC/n0Qe7igfYDsNegbouJ2Tcccyqh3z/9R0uXq4g9xBvMuiltpJ0dXJtBY= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of lists.libvirt.org designates 8.43.85.245 as permitted sender) smtp.mailfrom=devel-bounces@lists.libvirt.org; dmarc=pass header.from= (p=reject dis=none) Return-Path: Received: from lists.libvirt.org (lists.libvirt.org [8.43.85.245]) by mx.zohomail.com with SMTPS id 1747232827452654.065014366135; Wed, 14 May 2025 07:27:07 -0700 (PDT) Received: by lists.libvirt.org (Postfix, from userid 996) id 88CF5CA1; Wed, 14 May 2025 10:27:06 -0400 (EDT) Received: from lists.libvirt.org (localhost [IPv6:::1]) by lists.libvirt.org (Postfix) with ESMTP id D732D123A; Wed, 14 May 2025 10:24:50 -0400 (EDT) Received: by lists.libvirt.org (Postfix, from userid 996) id 18A7C11E4; Wed, 14 May 2025 10:24:45 -0400 (EDT) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by lists.libvirt.org (Postfix) with ESMTPS id 386DA11EE for ; Wed, 14 May 2025 10:24:31 -0400 (EDT) Received: from mx-prod-mc-06.mail-002.prod.us-west-2.aws.redhat.com (ec2-35-165-154-97.us-west-2.compute.amazonaws.com [35.165.154.97]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-537-RGb6-eEWN9uyHPAC1bjYLg-1; Wed, 14 May 2025 10:24:29 -0400 Received: from mx-prod-int-02.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-02.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.15]) (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 mx-prod-mc-06.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 6038818004AD for ; Wed, 14 May 2025 14:24:27 +0000 (UTC) Received: from moe.brq.redhat.com (unknown [10.43.3.236]) by mx-prod-int-02.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 9E1231955F24 for ; Wed, 14 May 2025 14:24:26 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on lists.libvirt.org X-Spam-Level: X-Spam-Status: No, score=-0.8 required=5.0 tests=DKIM_INVALID,DKIM_SIGNED, MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H5, RCVD_IN_MSPIKE_WL,RCVD_IN_VALIDITY_RPBL_BLOCKED, RCVD_IN_VALIDITY_SAFE_BLOCKED,SPF_HELO_NONE autolearn=unavailable autolearn_force=no version=3.4.4 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1747232670; h=from:from: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; bh=zO3iVeHiCYUU9sTXHT1INkilY2k60j/DwM6m+kTKLMU=; b=P+6jPscVsb8dex2Mcn+Zk2Nmiw9vYpshLSYw/v29sbK0phxAnpIi7ASgszfPPM1w/nCWwc mjFZhMG3CSFSP+7djD82PT6rObhPsFkQHGwoHxtgFrgCnITJ3/q7kpEBCtfzqpHWRj9Vb3 4AeQvsJhbcmAZrvLTL9Oq2KHwrK6Cow= X-MC-Unique: RGb6-eEWN9uyHPAC1bjYLg-1 X-Mimecast-MFC-AGG-ID: RGb6-eEWN9uyHPAC1bjYLg_1747232667 To: devel@lists.libvirt.org Subject: [PATCH 6/7] virsh-pool.c: Fix return type of virshBuildPoolXML() Date: Wed, 14 May 2025 16:24:15 +0200 Message-ID: <4f69826e2f251da27b9504657165f55e0e5c1418.1747232412.git.mprivozn@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.0 on 10.30.177.15 X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: UYEaz7mR-N38G4RMEREvU_vHlkMM-pSOBVeCRTM3XZI_1747232667 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable Message-ID-Hash: N3LEHWQKLZYSCG756TBLWARMLLNNCT6U X-Message-ID-Hash: N3LEHWQKLZYSCG756TBLWARMLLNNCT6U X-MailFrom: mprivozn@redhat.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-config-1; header-match-config-2; header-match-config-3; header-match-devel.lists.libvirt.org-0; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; suspicious-header X-Mailman-Version: 3.2.2 Precedence: list List-Id: Development discussions about the libvirt library & tools Archived-At: List-Archive: List-Help: List-Post: List-Subscribe: List-Unsubscribe: From: Michal Privoznik via Devel Reply-To: Michal Privoznik X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1747232828505116600 Content-Type: text/plain; charset="utf-8"; x-default="true" From: Michal Privoznik The virshBuildPoolXML() function is declared to return an int but in fact its return type is a boolean. Even its both callers (cmdPoolCreateAs() and cmdPoolDefineAs()) thread its retval as a boolean. Switch the return type from integer to boolean. Signed-off-by: Michal Privoznik Reviewed-by: Peter Krempa --- tools/virsh-pool.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/virsh-pool.c b/tools/virsh-pool.c index 33b130564e..089fde55e2 100644 --- a/tools/virsh-pool.c +++ b/tools/virsh-pool.c @@ -322,7 +322,7 @@ static const vshCmdOptDef opts_pool_define_as[] =3D { {.name =3D NULL} }; =20 -static int +static bool virshBuildPoolXML(vshControl *ctl, const vshCmd *cmd, const char **retname, --=20 2.49.0 From nobody Mon Sep 8 21:40:30 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.libvirt.org designates 8.43.85.245 as permitted sender) client-ip=8.43.85.245; envelope-from=devel-bounces@lists.libvirt.org; helo=lists.libvirt.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of lists.libvirt.org designates 8.43.85.245 as permitted sender) smtp.mailfrom=devel-bounces@lists.libvirt.org; dmarc=pass(p=reject dis=none) header.from=lists.libvirt.org ARC-Seal: i=1; a=rsa-sha256; t=1747232811; cv=none; d=zohomail.com; s=zohoarc; b=GpN0FzDmIxkod6LOY3NK2zwMw82Jnqb4TQH5pKeEhIbCTmeaeCI6+WePxNwfkrw8alRetfLVqS2Ou0DjlZ0V6LsNM+GadaXlSQ+hm+oTVPiLPqjazZGiVghwgA3YRqqb5g2+4pRWceB04r/BECf/tFjr2VrBAyDN+PM84ruxn4Q= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1747232811; 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:Reply-To:Reply-To:References:Subject:Subject:To:To:Message-Id:Cc; bh=CJ3v37lY7SBsgRfnpRg9fa09B27mbCqoEkqFMMSnojc=; b=bDRMnJHdi2WbjQ8leXVuPBQacCULSuHhh58ZUQsUZi/rlc5d+8eVjaqNGDLWwQkAP7ynlueG3Il0pHsEBis3zAphysjZdqes19OW1UkQi9piWPf19mCf3flbViZ1GEnSv8UZf2tzcBFw7VSiAgpzk+Jf9pSr7RMIM/SVZ7XonFA= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of lists.libvirt.org designates 8.43.85.245 as permitted sender) smtp.mailfrom=devel-bounces@lists.libvirt.org; dmarc=pass header.from= (p=reject dis=none) Return-Path: Received: from lists.libvirt.org (lists.libvirt.org [8.43.85.245]) by mx.zohomail.com with SMTPS id 1747232811506629.6328111581909; Wed, 14 May 2025 07:26:51 -0700 (PDT) Received: by lists.libvirt.org (Postfix, from userid 996) id 768FD11B6; Wed, 14 May 2025 10:26:50 -0400 (EDT) Received: from lists.libvirt.org (localhost [IPv6:::1]) by lists.libvirt.org (Postfix) with ESMTP id 360F4DF3; Wed, 14 May 2025 10:24:49 -0400 (EDT) Received: by lists.libvirt.org (Postfix, from userid 996) id 85114CEE; Wed, 14 May 2025 10:24:44 -0400 (EDT) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by lists.libvirt.org (Postfix) with ESMTPS id D3B47CEE for ; Wed, 14 May 2025 10:24:30 -0400 (EDT) Received: from mx-prod-mc-02.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-587-QvsLInz1PT6bXSeaIVwX4w-1; Wed, 14 May 2025 10:24:29 -0400 Received: from mx-prod-int-02.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-02.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.15]) (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 mx-prod-mc-02.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 804BE195608A for ; Wed, 14 May 2025 14:24:28 +0000 (UTC) Received: from moe.brq.redhat.com (unknown [10.43.3.236]) by mx-prod-int-02.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id C901A1955F24 for ; Wed, 14 May 2025 14:24:27 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on lists.libvirt.org X-Spam-Level: X-Spam-Status: No, score=-0.8 required=5.0 tests=DKIM_INVALID,DKIM_SIGNED, MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H5, RCVD_IN_MSPIKE_WL,RCVD_IN_VALIDITY_RPBL_BLOCKED, RCVD_IN_VALIDITY_SAFE_BLOCKED,SPF_HELO_NONE autolearn=unavailable autolearn_force=no version=3.4.4 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1747232670; h=from:from: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; bh=9NOc8agBnqYRgtScMNpCiTA3CXW1TbGODsX2kzI7bbQ=; b=MXO3I72VCiw3IKfXDTCzV6d7YPLGteSargQ6nlcUZGPAVCm5vmBN27O4P2TzZ4h+xMewqc 1vRh1GOIxM7pekyrOYcDmqU4bVZzGZAFdEcrzHWEw4dIlhMwA3nSTc6PXGQybRM2eQO/kO BXAMwJmHSH6ST83k9e0Vw75/e0cCBT8= X-MC-Unique: QvsLInz1PT6bXSeaIVwX4w-1 X-Mimecast-MFC-AGG-ID: QvsLInz1PT6bXSeaIVwX4w_1747232668 To: devel@lists.libvirt.org Subject: [PATCH 7/7] src: Fix retval of some functions declared to return an int Date: Wed, 14 May 2025 16:24:16 +0200 Message-ID: <73a8a9a50149905ac3a9f27b2d3fe69af5b188fe.1747232412.git.mprivozn@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.0 on 10.30.177.15 X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: EGPPL2QoXfXaCD7Rw5r3VDu1C0oHX41kfSI3-8Wm8mU_1747232668 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable Message-ID-Hash: OWNJRHB5JNHDH2JFVJQMGULPRAMKNIVZ X-Message-ID-Hash: OWNJRHB5JNHDH2JFVJQMGULPRAMKNIVZ X-MailFrom: mprivozn@redhat.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-config-1; header-match-config-2; header-match-config-3; header-match-devel.lists.libvirt.org-0; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; suspicious-header X-Mailman-Version: 3.2.2 Precedence: list List-Id: Development discussions about the libvirt library & tools Archived-At: List-Archive: List-Help: List-Post: List-Subscribe: List-Unsubscribe: From: Michal Privoznik via Devel Reply-To: Michal Privoznik X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1747232812460116600 Content-Type: text/plain; charset="utf-8"; x-default="true" From: Michal Privoznik There are couple of functions (virCHDomainPrepareHostdevPCI(), qemuDomainPrepareHostdevPCI(), virStorageBackendRBDSetAllocation(), virCommandHandshakeChild()) that are declared to return an integer, but in fact return a boolean. This may lead to incorrect behaviour. Fix their retvals. This diff was generated using the following semantic patch: @@ identifier foo; @@ int foo(...) { <+... ( - return true; + return 0; | - return false; + return -1; ) ...+> } Each function and its callers were then inspected to see what retvals are expected. Signed-off-by: Michal Privoznik Reviewed-by: Peter Krempa --- src/ch/ch_hostdev.c | 8 ++++---- src/qemu/qemu_domain.c | 8 ++++---- src/storage/storage_backend_rbd.c | 2 +- src/util/vircommand.c | 2 +- 4 files changed, 10 insertions(+), 10 deletions(-) diff --git a/src/ch/ch_hostdev.c b/src/ch/ch_hostdev.c index 641032de30..34eb025c97 100644 --- a/src/ch/ch_hostdev.c +++ b/src/ch/ch_hostdev.c @@ -69,20 +69,20 @@ virCHDomainPrepareHostdevPCI(virDomainHostdevDef *hostd= ev) if (!supportsPassthroughVFIO) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s", _("host doesn't support VFIO PCI passthrough")); - return false; + return -1; } break; =20 case VIR_DEVICE_HOSTDEV_PCI_DRIVER_NAME_KVM: virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s", _("host doesn't support legacy PCI passthrough")); - return false; + return -1; =20 case VIR_DEVICE_HOSTDEV_PCI_DRIVER_NAME_XEN: virReportError(VIR_ERR_CONFIG_UNSUPPORTED, _("CH does not support device assignment mode '%1$s= '"), virDeviceHostdevPCIDriverNameTypeToString(*driverNa= me)); - return false; + return -1; =20 default: case VIR_DEVICE_HOSTDEV_PCI_DRIVER_NAME_LAST: @@ -90,7 +90,7 @@ virCHDomainPrepareHostdevPCI(virDomainHostdevDef *hostdev) break; } =20 - return true; + return 0; } =20 int diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c index 52da234343..7a34bc1c7f 100644 --- a/src/qemu/qemu_domain.c +++ b/src/qemu/qemu_domain.c @@ -9945,20 +9945,20 @@ qemuDomainPrepareHostdevPCI(virDomainHostdevDef *ho= stdev, if (!supportsPassthroughVFIO) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s", _("host doesn't support VFIO PCI passthrough")); - return false; + return -1; } break; =20 case VIR_DEVICE_HOSTDEV_PCI_DRIVER_NAME_KVM: virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s", _("host doesn't support legacy PCI passthrough")); - return false; + return -1; =20 case VIR_DEVICE_HOSTDEV_PCI_DRIVER_NAME_XEN: virReportError(VIR_ERR_CONFIG_UNSUPPORTED, _("QEMU does not support device assignment mode '%1= $s'"), virDeviceHostdevPCIDriverNameTypeToString(*driverNa= me)); - return false; + return -1; =20 default: case VIR_DEVICE_HOSTDEV_PCI_DRIVER_NAME_LAST: @@ -9966,7 +9966,7 @@ qemuDomainPrepareHostdevPCI(virDomainHostdevDef *host= dev, break; } =20 - return true; + return 0; } =20 =20 diff --git a/src/storage/storage_backend_rbd.c b/src/storage/storage_backen= d_rbd.c index fd46c8be55..038a1a9e34 100644 --- a/src/storage/storage_backend_rbd.c +++ b/src/storage/storage_backend_rbd.c @@ -516,7 +516,7 @@ virStorageBackendRBDSetAllocation(virStorageVolDef *vol= G_GNUC_UNUSED, rbd_image_info_t *info G_GNUC_UNUSED) { virReportUnsupportedError(); - return false; + return -1; } #endif =20 diff --git a/src/util/vircommand.c b/src/util/vircommand.c index ea52acfbb8..d9e4c0181f 100644 --- a/src/util/vircommand.c +++ b/src/util/vircommand.c @@ -397,7 +397,7 @@ virCommandHandshakeChild(virCommand *cmd) int rv; =20 if (!cmd->handshake) - return true; + return 0; =20 VIR_DEBUG("Notifying parent for handshake start on %d", cmd->handshakeWait[1]); --=20 2.49.0