From nobody Fri Apr 19 16:48:04 2024 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=1669122197; cv=none; d=zohomail.com; s=zohoarc; b=g6txWhiA2AGwUR1KPSYw8DwRnWEqCq/mYdrNHH5O1f8JZWOGI3iPzJ0Gf2Stzk4WVHgLG0phl9o/iUaatqNx4KgC3xbMJIpxSU6YHvmfPJ1CAfn0iyIk8YQvWYnSpS9CWat8E0crEOttKlS8gGm6ho/ECBZPZoaanRJiJ0CkfqQ= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1669122197; 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=flwiqerZgNtnkbYjzd5gdFnM65UNFBSEAwZMurFAD64=; b=RKoOYfV8ePBx8RDYulaKT1UbQ/Q9nrhLVZ8kwPw3oEIYqjqDp+JGTrCGRh+1S2EX/knJWEYU7FQJtZbq/Ka2Phc9dkJUXl8lT6FmVSgDXFXfwhNrMn5H1W4PA1QwQeVAsHJBQYQ6cOymWFBLESioO9AZLa0FTZ35z4mkXzS4sqg= 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 1669122197976977.613350547047; Tue, 22 Nov 2022 05:03:17 -0800 (PST) Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [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-526-GxVWEm15MECmp1jv5LxYsg-1; Tue, 22 Nov 2022 08:03:13 -0500 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.rdu2.redhat.com [10.11.54.7]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 0286C3C01DE3; Tue, 22 Nov 2022 13:03:10 +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 E4362140EBF3; Tue, 22 Nov 2022 13:03:09 +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 C75331946589; Tue, 22 Nov 2022 13:03:09 +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 59E3C1946587 for ; Tue, 22 Nov 2022 13:03:07 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id 3ACCF492B2C; Tue, 22 Nov 2022 13:03:07 +0000 (UTC) Received: from speedmetal.redhat.com (ovpn-208-20.brq.redhat.com [10.40.208.20]) by smtp.corp.redhat.com (Postfix) with ESMTP id B0A8D492B2A for ; Tue, 22 Nov 2022 13:03:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1669122197; 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=flwiqerZgNtnkbYjzd5gdFnM65UNFBSEAwZMurFAD64=; b=JrK/mmbR560phq4fjWKt3btw4KoPlRnzq3cPPJOZqBUAkLUMQ3P+ahLCgguQBwtX0uGd5o LVqMWHg+vlUH+OCUh1+0qfzEKxKFB47A9QyA8vKIpZpVrIGnqn0KuMhSZ+0RS7iIgLnP5p YK73eacOGJXzloCUJJ6VlhtyGmATJXo= X-MC-Unique: GxVWEm15MECmp1jv5LxYsg-1 X-Original-To: libvir-list@listman.corp.redhat.com From: Peter Krempa To: libvir-list@redhat.com Subject: [PATCH 1/5] internal: Refuse values exceeding range of 'unsigned int' in virCheckFlags Date: Tue, 22 Nov 2022 14:02:54 +0100 Message-Id: <94b5d762ffea808ad59955c62a0ff0c1a9c11561.1669122136.git.pkrempa@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.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.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: 1669122198796100001 Content-Type: text/plain; charset="utf-8" Historically our migration APIs declare 'unsigned long flags'. Since it's baked into our API we can't change that but we can avoid compatibility problems by preemptively refusing the extra range on certain arches to prevent future surprise. Modify the macro to verify that value passed inside 'flags' doesn't exceed the range of 'unsigned int'. Signed-off-by: Peter Krempa Reviewed-by: J=C3=A1n Tomko --- src/internal.h | 22 ++++++++++++++++++---- 1 file changed, 18 insertions(+), 4 deletions(-) diff --git a/src/internal.h b/src/internal.h index 35cc22ee3d..9dc34a0bf5 100644 --- a/src/internal.h +++ b/src/internal.h @@ -269,10 +269,17 @@ */ #define virCheckFlags(supported, retval) \ do { \ - unsigned long __unsuppflags =3D flags & ~(supported); \ + unsigned int __uiflags =3D flags; \ + unsigned int __unsuppflags =3D flags & ~(supported); \ + if (__uiflags !=3D flags) { \ + virReportInvalidArg(flags, \ + _("unsupported use of long flags in functi= on %s"), \ + __FUNCTION__); \ + return retval; \ + } \ if (__unsuppflags) { \ virReportInvalidArg(flags, \ - _("unsupported flags (0x%lx) in function %= s"), \ + _("unsupported flags (0x%x) in function %s= "), \ __unsuppflags, __FUNCTION__); \ return retval; \ } \ @@ -291,10 +298,17 @@ */ #define virCheckFlagsGoto(supported, label) \ do { \ - unsigned long __unsuppflags =3D flags & ~(supported); \ + unsigned int __uiflags =3D flags; \ + unsigned int __unsuppflags =3D flags & ~(supported); \ + if (__uiflags !=3D flags) { \ + virReportInvalidArg(flags, \ + _("unsupported use of long flags in functi= on %s"), \ + __FUNCTION__); \ + goto label; \ + } \ if (__unsuppflags) { \ virReportInvalidArg(flags, \ - _("unsupported flags (0x%lx) in function %= s"), \ + _("unsupported flags (0x%x) in function %s= "), \ __unsuppflags, __FUNCTION__); \ goto label; \ } \ --=20 2.37.3 From nobody Fri Apr 19 16:48:04 2024 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=1669122200; cv=none; d=zohomail.com; s=zohoarc; b=GOnRSw3JN4oQTK4hlpHUPXFnGEDKIfv2/huEFDkDYjs9DAQAMaJxSRh8EtHVZ++Scre75zuvE0EzFvboecwMdfZvgqJe+9V1e85Wkd/xfz49hX3t814oroYM5n08zKVZkFsCTEMoDkwolPm9egkzo9ZLq7VAde69jMp+3rJt4a8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1669122200; 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=QS2Uj9INNW+zaFr6Ajjeh74ojDJlDPou9YjzsQW9OYs=; b=JC2U+NIEi84pPEqbWrB2R8T3mSPzdAKju+YV1llPJytfSXsqcuE2G+lnA/SZDwdvQ2f12se9l0FqGHdiVLkZxod5xwGCEpbCjIFNkuVYCVJZjuRjv0FEKypZ3oFMVwCvDxOP7YX0yaveWZBwJ8IlVUEGpz59nh4ozg8TkwvYOEU= 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 1669122200354602.9524891449756; Tue, 22 Nov 2022 05:03:20 -0800 (PST) Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-228-3yBcqfG5PdaNjrre9fDTqw-1; Tue, 22 Nov 2022 08:03:15 -0500 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.rdu2.redhat.com [10.11.54.4]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 6E6AE88436B; Tue, 22 Nov 2022 13:03:10 +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 553312027062; Tue, 22 Nov 2022 13:03:10 +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 2146119465B9; Tue, 22 Nov 2022 13:03:10 +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 353E91946589 for ; Tue, 22 Nov 2022 13:03:08 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id 26099492B2A; Tue, 22 Nov 2022 13:03:08 +0000 (UTC) Received: from speedmetal.redhat.com (ovpn-208-20.brq.redhat.com [10.40.208.20]) by smtp.corp.redhat.com (Postfix) with ESMTP id 90BB4492B17 for ; Tue, 22 Nov 2022 13:03:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1669122199; 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=QS2Uj9INNW+zaFr6Ajjeh74ojDJlDPou9YjzsQW9OYs=; b=OJV5FCQvDanJm/3p5MRTs6+S/nBHZ/YP3fSMi7+2yV9HpLnS52H3pgZVHuJBHtf4AbbfZF wdl3/TFzYXtRY8Kq+g0BKHhN9z/dqds12kIrGsM/KdLEGFV8EIfHQ7xdANBtGzYAY/XSSP 6Mt8C3g8E0YWn9k1pY6fVOHijI9yapI= X-MC-Unique: 3yBcqfG5PdaNjrre9fDTqw-1 X-Original-To: libvir-list@listman.corp.redhat.com From: Peter Krempa To: libvir-list@redhat.com Subject: [PATCH 2/5] virsh: vol-create-as: Use 'unsigned int' for flags Date: Tue, 22 Nov 2022 14:02:55 +0100 Message-Id: In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.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.1 on 10.11.54.4 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: 1669122200820100003 Content-Type: text/plain; charset="utf-8" The API itself uses 'unsigned int' so use the same type for the local variable in virsh. Signed-off-by: Peter Krempa Reviewed-by: J=C3=A1n Tomko --- tools/virsh-volume.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/virsh-volume.c b/tools/virsh-volume.c index 4f23481180..2df23c9b6f 100644 --- a/tools/virsh-volume.c +++ b/tools/virsh-volume.c @@ -236,7 +236,7 @@ cmdVolCreateAs(vshControl *ctl, const vshCmd *cmd) const char *snapshotStrVol =3D NULL, *snapshotStrFormat =3D NULL; unsigned long long capacity, allocation =3D 0; g_auto(virBuffer) buf =3D VIR_BUFFER_INITIALIZER; - unsigned long flags =3D 0; + unsigned int flags =3D 0; virshControl *priv =3D ctl->privData; if (vshCommandOptBool(cmd, "prealloc-metadata")) --=20 2.37.3 From nobody Fri Apr 19 16:48:04 2024 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=1669122204; cv=none; d=zohomail.com; s=zohoarc; b=n/1bsk9c0P8I7oz2kJeh4gE0S6LH+lqAxyS9lGEFt4EcK4ISj4QVGkoMRNWnEAL3Ebm42GbClBRGpc6OEDX9dH4OFbmteHDXbQDFeq37BOH59T+qjEHL0zSYs6UfQNzNNwnAkgu6/pL/7RdcKZWA00wdHszTx37MaTnuRiaWIjY= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1669122204; 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=lzHtL+sUWZbjFLnAlGEM16MIFJHP5T+1Xu6q8V2wqQM=; b=Ca1pKVYoBWVjDQ4Jna9ow2+U8IYRXJ+c88Wb6vlrbY0Oc+LJjLDimblDpmWIhqu068SDruAU30RpwPjObVfmQ+5jDM7tRVmwinrByNe6tZXf889XDAIUSkydoLXgm7xqfEMnulAf5JBznepyDNRGA9n7xKJJg0qANDfaO5VKmCw= 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 166912220432231.40598751481889; Tue, 22 Nov 2022 05:03:24 -0800 (PST) Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-260-Q5FK_SekPXq9uxywG97wJg-1; Tue, 22 Nov 2022 08:03:16 -0500 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 E7352185A794; Tue, 22 Nov 2022 13:03:11 +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 D337E2166B2E; Tue, 22 Nov 2022 13:03:11 +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 B598A1946589; Tue, 22 Nov 2022 13:03:11 +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 3FC731946587 for ; Tue, 22 Nov 2022 13:03:09 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id 25A80492B2A; Tue, 22 Nov 2022 13:03:09 +0000 (UTC) Received: from speedmetal.redhat.com (ovpn-208-20.brq.redhat.com [10.40.208.20]) by smtp.corp.redhat.com (Postfix) with ESMTP id 86FB1492B17 for ; Tue, 22 Nov 2022 13:03:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1669122203; 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=lzHtL+sUWZbjFLnAlGEM16MIFJHP5T+1Xu6q8V2wqQM=; b=YJWfT5KNBEG7Btn0WUHukh0yWB5J8BbOd63jcE8cvplTiCcwh5I5KHOdQL1SC9ftIDlRPx 3Mrg+EivqE15kd/yIYsgsnOy32jwjsF4Pjw7idBQ4jY9A01gDRcEa3PgsLRbYmPMGsYGJ1 lT18yCnjhVinpYkcsTsjx2tNibgcR9A= X-MC-Unique: Q5FK_SekPXq9uxywG97wJg-1 X-Original-To: libvir-list@listman.corp.redhat.com From: Peter Krempa To: libvir-list@redhat.com Subject: [PATCH 3/5] qemu: processGuestPanicEvent: Use 'unsigned int' for flags Date: Tue, 22 Nov 2022 14:02:56 +0100 Message-Id: In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.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.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: 1669122204809100008 Content-Type: text/plain; charset="utf-8" No need to use 'long'. Signed-off-by: Peter Krempa Reviewed-by: J=C3=A1n Tomko --- src/qemu/qemu_driver.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c index ff5a743716..50bc62f1ab 100644 --- a/src/qemu/qemu_driver.c +++ b/src/qemu/qemu_driver.c @@ -3497,7 +3497,7 @@ processGuestPanicEvent(virQEMUDriver *driver, qemuDomainObjPrivate *priv =3D vm->privateData; virObjectEvent *event =3D NULL; bool removeInactive =3D false; - unsigned long flags =3D VIR_DUMP_MEMORY_ONLY; + unsigned int flags =3D VIR_DUMP_MEMORY_ONLY; if (virDomainObjBeginAsyncJob(vm, VIR_ASYNC_JOB_DUMP, VIR_DOMAIN_JOB_OPERATION_DUMP, flags) <= 0) --=20 2.37.3 From nobody Fri Apr 19 16:48:04 2024 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=1669122249; cv=none; d=zohomail.com; s=zohoarc; b=UPHCxAoPTQKCsr9CAUUEPhYl/1uBqIsn8D36bt61fvV6i8oBc29kwLjHgjMMmjm2YS+w9qecN4lEtfWg+FOOrJ5hWIQk/aF9JQrKdTj/kHk0jn7I/o0147VElunvstr2HTWhDD7ED4w7GwQ/NTwfYuoLk9vcm3XNXAjEAOIh1dA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1669122249; 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=OSCwvAfa0Swhtez/e3n3pJoaHkbAbSMepCEiXb0BqcU=; b=IPY+TMRu2tkbXncc9HOcPw7MuhLNpBDV7wBbnawfYLB0/HHRpRKkxulgJ/N5hBuxsGHZi5SfSVAPkFjNucfXQ9ft39tP2uXtzt1fOTv/cYei0Vudm+RXPSoFa45DtCYsuCDsBR34i32DuQOT/u6ZJZodT9r2n4ljvfHvElgKwj4= 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 166912224926476.70400729700873; Tue, 22 Nov 2022 05:04:09 -0800 (PST) Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [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-302-9kUgjfBkPPOSe_N_1uaUlA-1; Tue, 22 Nov 2022 08:03:16 -0500 Received: from smtp.corp.redhat.com (int-mx09.intmail.prod.int.rdu2.redhat.com [10.11.54.9]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 67E522A5957F; Tue, 22 Nov 2022 13:03:12 +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 4C7D04B401B; Tue, 22 Nov 2022 13:03:12 +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 08D7619465B9; Tue, 22 Nov 2022 13:03:12 +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 7127B1946589 for ; Tue, 22 Nov 2022 13:03:10 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id 531A7492B2A; Tue, 22 Nov 2022 13:03:10 +0000 (UTC) Received: from speedmetal.redhat.com (ovpn-208-20.brq.redhat.com [10.40.208.20]) by smtp.corp.redhat.com (Postfix) with ESMTP id 87745492B17 for ; Tue, 22 Nov 2022 13:03:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1669122247; 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=OSCwvAfa0Swhtez/e3n3pJoaHkbAbSMepCEiXb0BqcU=; b=NGTIqSufCIcFxsdpYFPI33qyWFienZ0dLED+iGLrh/jeFddTfITiqmk6M/GKPCCEUugTJ+ PfVVjffdrCmVvxw5QVKQt2cHrKrkDql6NYD4//dzAqtxVbpvZFZXhRc7kGFDki/3a+Kl5g 1HOs4BmWv9w2i18BXGjIweba9fSAlbk= X-MC-Unique: 9kUgjfBkPPOSe_N_1uaUlA-1 X-Original-To: libvir-list@listman.corp.redhat.com From: Peter Krempa To: libvir-list@redhat.com Subject: [PATCH 4/5] qemu: migration: Use 'unsigned int' for flags Date: Tue, 22 Nov 2022 14:02:57 +0100 Message-Id: In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.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.1 on 10.11.54.9 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: 1669122251197100001 Content-Type: text/plain; charset="utf-8" Don't continue with the historical mistake and fix all internal functions to use a sane type for flags. Signed-off-by: Peter Krempa Reviewed-by: J=C3=A1n Tomko --- src/qemu/qemu_migration.c | 82 ++++++++++++++++---------------- src/qemu/qemu_migration.h | 10 ++-- src/qemu/qemu_migration_params.c | 6 +-- src/qemu/qemu_migration_params.h | 4 +- 4 files changed, 51 insertions(+), 51 deletions(-) diff --git a/src/qemu/qemu_migration.c b/src/qemu/qemu_migration.c index bba4e1dbf3..acdfce9935 100644 --- a/src/qemu/qemu_migration.c +++ b/src/qemu/qemu_migration.c @@ -2471,7 +2471,7 @@ qemuMigrationSrcBeginXML(virDomainObj *vm, unsigned int cookieFlags, const char **migrate_disks, size_t nmigrate_disks, - unsigned long flags) + unsigned int flags) { qemuDomainObjPrivate *priv =3D vm->privateData; virQEMUDriver *driver =3D priv->driver; @@ -2527,14 +2527,14 @@ qemuMigrationSrcBeginPhase(virQEMUDriver *driver, int *cookieoutlen, size_t nmigrate_disks, const char **migrate_disks, - unsigned long flags) + unsigned int flags) { qemuDomainObjPrivate *priv =3D vm->privateData; unsigned int cookieFlags =3D QEMU_MIGRATION_COOKIE_LOCKSTATE; VIR_DEBUG("driver=3D%p, vm=3D%p, xmlin=3D%s, dname=3D%s," " cookieout=3D%p, cookieoutlen=3D%p," - " nmigrate_disks=3D%zu, migrate_disks=3D%p, flags=3D0x%lx", + " nmigrate_disks=3D%zu, migrate_disks=3D%p, flags=3D0x%x", driver, vm, NULLSTR(xmlin), NULLSTR(dname), cookieout, cookieoutlen, nmigrate_disks, migrate_disks, flags); @@ -2647,10 +2647,10 @@ qemuMigrationSrcBeginPhase(virQEMUDriver *driver, static bool qemuMigrationAnyCanResume(virDomainObj *vm, virDomainAsyncJob job, - unsigned long flags, + unsigned int flags, qemuMigrationJobPhase expectedPhase) { - VIR_DEBUG("vm=3D%p, job=3D%s, flags=3D0x%lx, expectedPhase=3D%s", + VIR_DEBUG("vm=3D%p, job=3D%s, flags=3D0x%x, expectedPhase=3D%s", vm, virDomainAsyncJobTypeToString(job), flags, qemuDomainAsyncJobPhaseToString(VIR_ASYNC_JOB_MIGRATION_OUT, expectedPhase)); @@ -2715,7 +2715,7 @@ qemuMigrationSrcBeginResume(virDomainObj *vm, const char *xmlin, char **cookieout, int *cookieoutlen, - unsigned long flags) + unsigned int flags) { virDomainJobStatus status; @@ -2741,7 +2741,7 @@ qemuMigrationSrcBeginResumePhase(virConnectPtr conn, const char *xmlin, char **cookieout, int *cookieoutlen, - unsigned long flags) + unsigned int flags) { g_autofree char *xml =3D NULL; @@ -2781,7 +2781,7 @@ qemuMigrationSrcBegin(virConnectPtr conn, int *cookieoutlen, size_t nmigrate_disks, const char **migrate_disks, - unsigned long flags) + unsigned int flags) { virQEMUDriver *driver =3D conn->privateData; g_autoptr(virQEMUDriverConfig) cfg =3D virQEMUDriverGetConfig(driver); @@ -3050,7 +3050,7 @@ qemuMigrationDstPrepareActive(virQEMUDriver *driver, int nbdPort, const char *nbdURI, qemuMigrationParams *migParams, - unsigned long flags) + unsigned int flags) { qemuDomainObjPrivate *priv =3D vm->privateData; qemuDomainJobPrivate *jobPriv =3D vm->job->privateData; @@ -3249,7 +3249,7 @@ qemuMigrationDstPrepareFresh(virQEMUDriver *driver, int nbdPort, const char *nbdURI, qemuMigrationParams *migParams, - unsigned long flags) + unsigned int flags) { virDomainObj *vm =3D NULL; virErrorPtr origErr; @@ -3261,7 +3261,7 @@ qemuMigrationDstPrepareFresh(virQEMUDriver *driver, bool taint_hook =3D false; VIR_DEBUG("name=3D%s, origname=3D%s, protocol=3D%s, port=3D%hu, " - "listenAddress=3D%s, nbdPort=3D%d, nbdURI=3D%s, flags=3D0x%l= x", + "listenAddress=3D%s, nbdPort=3D%d, nbdURI=3D%s, flags=3D0x%x= ", (*def)->name, NULLSTR(origname), protocol, port, listenAddress, nbdPort, NULLSTR(nbdURI), flags); @@ -3424,7 +3424,7 @@ qemuMigrationDstPrepareResume(virQEMUDriver *driver, unsigned short port, bool autoPort, const char *listenAddress, - unsigned long flags) + unsigned int flags) { g_autoptr(qemuMigrationCookie) mig =3D NULL; qemuProcessIncomingDef *incoming =3D NULL; @@ -3434,7 +3434,7 @@ qemuMigrationDstPrepareResume(virQEMUDriver *driver, int ret =3D -1; VIR_DEBUG("name=3D%s, origname=3D%s, protocol=3D%s, port=3D%hu, " - "listenAddress=3D%s, flags=3D0x%lx", + "listenAddress=3D%s, flags=3D0x%x", def->name, NULLSTR(origname), protocol, port, NULLSTR(listenAddress), flags); @@ -3529,7 +3529,7 @@ qemuMigrationDstPrepareAny(virQEMUDriver *driver, int nbdPort, const char *nbdURI, qemuMigrationParams *migParams, - unsigned long flags) + unsigned int flags) { g_autoptr(virQEMUDriverConfig) cfg =3D virQEMUDriverGetConfig(driver); @@ -3608,11 +3608,11 @@ qemuMigrationDstPrepareTunnel(virQEMUDriver *driver, virDomainDef **def, const char *origname, qemuMigrationParams *migParams, - unsigned long flags) + unsigned int flags) { VIR_DEBUG("driver=3D%p, dconn=3D%p, cookiein=3D%s, cookieinlen=3D%d, " "cookieout=3D%p, cookieoutlen=3D%p, st=3D%p, def=3D%p, " - "origname=3D%s, flags=3D0x%lx", + "origname=3D%s, flags=3D0x%x", driver, dconn, NULLSTR(cookiein), cookieinlen, cookieout, cookieoutlen, st, *def, origname, flags); @@ -3668,7 +3668,7 @@ qemuMigrationDstPrepareDirect(virQEMUDriver *driver, int nbdPort, const char *nbdURI, qemuMigrationParams *migParams, - unsigned long flags) + unsigned int flags) { unsigned short port =3D 0; bool autoPort =3D true; @@ -3682,7 +3682,7 @@ qemuMigrationDstPrepareDirect(virQEMUDriver *driver, "cookieout=3D%p, cookieoutlen=3D%p, uri_in=3D%s, uri_out=3D%= p, " "def=3D%p, origname=3D%s, listenAddress=3D%s, " "nmigrate_disks=3D%zu, migrate_disks=3D%p, nbdPort=3D%d, " - "nbdURI=3D%s, flags=3D0x%lx", + "nbdURI=3D%s, flags=3D0x%x", driver, dconn, NULLSTR(cookiein), cookieinlen, cookieout, cookieoutlen, NULLSTR(uri_in), uri_out, *def, origname, NULLSTR(listenAddress), @@ -4683,7 +4683,7 @@ qemuMigrationSrcRun(virQEMUDriver *driver, int cookieinlen, char **cookieout, int *cookieoutlen, - unsigned long flags, + unsigned int flags, unsigned long resource, qemuMigrationSpec *spec, virConnectPtr dconn, @@ -4713,7 +4713,7 @@ qemuMigrationSrcRun(virQEMUDriver *driver, priv->migMaxBandwidth =3D resource; VIR_DEBUG("driver=3D%p, vm=3D%p, cookiein=3D%s, cookieinlen=3D%d, " - "cookieout=3D%p, cookieoutlen=3D%p, flags=3D0x%lx, resource= =3D%lu, " + "cookieout=3D%p, cookieoutlen=3D%p, flags=3D0x%x, resource= =3D%lu, " "spec=3D%p (dest=3D%d, fwd=3D%d), dconn=3D%p, graphicsuri=3D= %s, " "nmigrate_disks=3D%zu, migrate_disks=3D%p", driver, vm, NULLSTR(cookiein), cookieinlen, @@ -5043,7 +5043,7 @@ qemuMigrationSrcResume(virDomainObj *vm, char **cookieout, int *cookieoutlen, qemuMigrationSpec *spec, - unsigned long flags) + unsigned int flags) { qemuDomainObjPrivate *priv =3D vm->privateData; virQEMUDriver *driver =3D priv->driver; @@ -5095,7 +5095,7 @@ qemuMigrationSrcPerformNative(virQEMUDriver *driver, int cookieinlen, char **cookieout, int *cookieoutlen, - unsigned long flags, + unsigned int flags, unsigned long resource, virConnectPtr dconn, const char *graphicsuri, @@ -5110,7 +5110,7 @@ qemuMigrationSrcPerformNative(virQEMUDriver *driver, qemuMigrationSpec spec; VIR_DEBUG("driver=3D%p, vm=3D%p, uri=3D%s, cookiein=3D%s, cookieinlen= =3D%d, " - "cookieout=3D%p, cookieoutlen=3D%p, flags=3D0x%lx, resource= =3D%lu, " + "cookieout=3D%p, cookieoutlen=3D%p, flags=3D0x%x, resource= =3D%lu, " "graphicsuri=3D%s, nmigrate_disks=3D%zu migrate_disks=3D%p", driver, vm, uri, NULLSTR(cookiein), cookieinlen, cookieout, cookieoutlen, flags, resource, @@ -5200,7 +5200,7 @@ qemuMigrationSrcPerformTunnel(virQEMUDriver *driver, int cookieinlen, char **cookieout, int *cookieoutlen, - unsigned long flags, + unsigned int flags, unsigned long resource, virConnectPtr dconn, const char *graphicsuri, @@ -5213,7 +5213,7 @@ qemuMigrationSrcPerformTunnel(virQEMUDriver *driver, int fds[2] =3D { -1, -1 }; VIR_DEBUG("driver=3D%p, vm=3D%p, st=3D%p, cookiein=3D%s, cookieinlen= =3D%d, " - "cookieout=3D%p, cookieoutlen=3D%p, flags=3D0x%lx, resource= =3D%lu, " + "cookieout=3D%p, cookieoutlen=3D%p, flags=3D0x%x, resource= =3D%lu, " "graphicsuri=3D%s, nmigrate_disks=3D%zu, migrate_disks=3D%p", driver, vm, st, NULLSTR(cookiein), cookieinlen, cookieout, cookieoutlen, flags, resource, @@ -5264,7 +5264,7 @@ qemuMigrationSrcPerformPeer2Peer2(virQEMUDriver *driv= er, virConnectPtr dconn, virDomainObj *vm, const char *dconnuri, - unsigned long flags, + unsigned int flags, const char *dname, unsigned long resource, qemuMigrationParams *migParams) @@ -5280,7 +5280,7 @@ qemuMigrationSrcPerformPeer2Peer2(virQEMUDriver *driv= er, unsigned long destflags; VIR_DEBUG("driver=3D%p, sconn=3D%p, dconn=3D%p, vm=3D%p, dconnuri=3D%s= , " - "flags=3D0x%lx, dname=3D%s, resource=3D%lu", + "flags=3D0x%x, dname=3D%s, resource=3D%lu", driver, sconn, dconn, vm, NULLSTR(dconnuri), flags, NULLSTR(dname), resource); @@ -5419,7 +5419,7 @@ qemuMigrationSrcPerformPeer2Peer3(virQEMUDriver *driv= er, qemuMigrationParams *migParams, unsigned long long bandwidth, bool useParams, - unsigned long flags) + unsigned int flags) { virDomainPtr ddomain =3D NULL; char *uri_out =3D NULL; @@ -5442,7 +5442,7 @@ qemuMigrationSrcPerformPeer2Peer3(virQEMUDriver *driv= er, VIR_DEBUG("driver=3D%p, sconn=3D%p, dconn=3D%p, dconnuri=3D%s, vm=3D%p= , xmlin=3D%s, " "dname=3D%s, uri=3D%s, graphicsuri=3D%s, listenAddress=3D%s,= " "nmigrate_disks=3D%zu, migrate_disks=3D%p, nbdPort=3D%d, nbd= URI=3D%s, " - "bandwidth=3D%llu, useParams=3D%d, flags=3D0x%lx", + "bandwidth=3D%llu, useParams=3D%d, flags=3D0x%x", driver, sconn, dconn, NULLSTR(dconnuri), vm, NULLSTR(xmlin), NULLSTR(dname), NULLSTR(uri), NULLSTR(graphicsuri), NULLSTR(listenAddress), nmigrate_disks, migrate_disks, nbdPo= rt, @@ -5784,7 +5784,7 @@ qemuMigrationSrcPerformPeer2Peer(virQEMUDriver *drive= r, int nbdPort, const char *nbdURI, qemuMigrationParams *migParams, - unsigned long flags, + unsigned int flags, const char *dname, unsigned long resource, bool *v3proto) @@ -5801,7 +5801,7 @@ qemuMigrationSrcPerformPeer2Peer(virQEMUDriver *drive= r, VIR_DEBUG("driver=3D%p, sconn=3D%p, vm=3D%p, xmlin=3D%s, dconnuri=3D%s= , uri=3D%s, " "graphicsuri=3D%s, listenAddress=3D%s, nmigrate_disks=3D%zu,= " - "migrate_disks=3D%p, nbdPort=3D%d, nbdURI=3D%s, flags=3D0x%l= x, " + "migrate_disks=3D%p, nbdPort=3D%d, nbdURI=3D%s, flags=3D0x%x= , " "dname=3D%s, resource=3D%lu", driver, sconn, vm, NULLSTR(xmlin), NULLSTR(dconnuri), NULLSTR(uri), NULLSTR(graphicsuri), NULLSTR(listenAddress), @@ -5955,7 +5955,7 @@ qemuMigrationSrcPerformJob(virQEMUDriver *driver, int cookieinlen, char **cookieout, int *cookieoutlen, - unsigned long flags, + unsigned int flags, const char *dname, unsigned long resource, bool v3proto) @@ -6076,7 +6076,7 @@ qemuMigrationSrcPerformResume(virQEMUDriver *driver, int cookieinlen, char **cookieout, int *cookieoutlen, - unsigned long flags) + unsigned int flags) { int ret; @@ -6127,7 +6127,7 @@ qemuMigrationSrcPerformPhase(virQEMUDriver *driver, int cookieinlen, char **cookieout, int *cookieoutlen, - unsigned long flags, + unsigned int flags, unsigned long resource, const char *nbdURI) { @@ -6206,7 +6206,7 @@ qemuMigrationSrcPerform(virQEMUDriver *driver, int cookieinlen, char **cookieout, int *cookieoutlen, - unsigned long flags, + unsigned int flags, const char *dname, unsigned long resource, bool v3proto) @@ -6218,7 +6218,7 @@ qemuMigrationSrcPerform(virQEMUDriver *driver, "nmigrate_disks=3D%zu, migrate_disks=3D%p, nbdPort=3D%d, " "nbdURI=3D%s, " "cookiein=3D%s, cookieinlen=3D%d, cookieout=3D%p, cookieoutl= en=3D%p, " - "flags=3D0x%lx, dname=3D%s, resource=3D%lu, v3proto=3D%d", + "flags=3D0x%x, dname=3D%s, resource=3D%lu, v3proto=3D%d", driver, conn, vm, NULLSTR(xmlin), NULLSTR(dconnuri), NULLSTR(uri), NULLSTR(graphicsuri), NULLSTR(listenAddress), nmigrate_disks, migrate_disks, nbdPort, NULLSTR(nbdURI), @@ -6478,7 +6478,7 @@ static int qemuMigrationDstFinishFresh(virQEMUDriver *driver, virDomainObj *vm, qemuMigrationCookie *mig, - unsigned long flags, + unsigned int flags, bool v3proto, unsigned long long timeReceived, bool *doKill, @@ -6627,7 +6627,7 @@ qemuMigrationDstFinishActive(virQEMUDriver *driver, int cookieinlen, char **cookieout, int *cookieoutlen, - unsigned long flags, + unsigned int flags, int retcode, bool v3proto, unsigned long long timeReceived, @@ -6643,7 +6643,7 @@ qemuMigrationDstFinishActive(virQEMUDriver *driver, bool doKill =3D vm->job->phase !=3D QEMU_MIGRATION_PHASE_FINISH_RESUME; int rc; - VIR_DEBUG("vm=3D%p, flags=3D0x%lx, retcode=3D%d", + VIR_DEBUG("vm=3D%p, flags=3D0x%x, retcode=3D%d", vm, flags, retcode); if (!(mig =3D qemuMigrationCookieParse(driver, vm->def, priv->origname= , priv, @@ -6733,7 +6733,7 @@ qemuMigrationDstFinish(virQEMUDriver *driver, int cookieinlen, char **cookieout, int *cookieoutlen, - unsigned long flags, + unsigned int flags, int retcode, bool v3proto) { @@ -6746,7 +6746,7 @@ qemuMigrationDstFinish(virQEMUDriver *driver, : QEMU_MIGRATION_PHASE_FINISH2; VIR_DEBUG("driver=3D%p, dconn=3D%p, vm=3D%p, cookiein=3D%s, cookieinle= n=3D%d, " - "cookieout=3D%p, cookieoutlen=3D%p, flags=3D0x%lx, retcode= =3D%d", + "cookieout=3D%p, cookieoutlen=3D%p, flags=3D0x%x, retcode=3D= %d", driver, dconn, vm, NULLSTR(cookiein), cookieinlen, cookieout, cookieoutlen, flags, retcode); diff --git a/src/qemu/qemu_migration.h b/src/qemu/qemu_migration.h index 3d7c2702aa..38a961f4e9 100644 --- a/src/qemu/qemu_migration.h +++ b/src/qemu/qemu_migration.h @@ -122,7 +122,7 @@ qemuMigrationSrcBegin(virConnectPtr conn, int *cookieoutlen, size_t nmigrate_disks, const char **migrate_disks, - unsigned long flags); + unsigned int flags); virDomainDef * qemuMigrationAnyPrepareDef(virQEMUDriver *driver, @@ -142,7 +142,7 @@ qemuMigrationDstPrepareTunnel(virQEMUDriver *driver, virDomainDef **def, const char *origname, qemuMigrationParams *migParams, - unsigned long flags); + unsigned int flags); int qemuMigrationDstPrepareDirect(virQEMUDriver *driver, @@ -161,7 +161,7 @@ qemuMigrationDstPrepareDirect(virQEMUDriver *driver, int nbdPort, const char *nbdURI, qemuMigrationParams *migParams, - unsigned long flags); + unsigned int flags); int qemuMigrationSrcPerform(virQEMUDriver *driver, @@ -182,7 +182,7 @@ qemuMigrationSrcPerform(virQEMUDriver *driver, int cookieinlen, char **cookieout, int *cookieoutlen, - unsigned long flags, + unsigned int flags, const char *dname, unsigned long resource, bool v3proto); @@ -195,7 +195,7 @@ qemuMigrationDstFinish(virQEMUDriver *driver, int cookieinlen, char **cookieout, int *cookieoutlen, - unsigned long flags, + unsigned int flags, int retcode, bool v3proto); diff --git a/src/qemu/qemu_migration_params.c b/src/qemu/qemu_migration_par= ams.c index bee0af9fca..bd09dcfb23 100644 --- a/src/qemu/qemu_migration_params.c +++ b/src/qemu/qemu_migration_params.c @@ -509,7 +509,7 @@ qemuMigrationParamsSetTPString(qemuMigrationParams *mig= Params, static int qemuMigrationParamsSetCompression(virTypedParameterPtr params, int nparams, - unsigned long flags, + unsigned int flags, qemuMigrationParams *migParams) { size_t i; @@ -596,7 +596,7 @@ qemuMigrationParamsSetBlockDirtyBitmapMapping(qemuMigra= tionParams *migParams, qemuMigrationParams * qemuMigrationParamsFromFlags(virTypedParameterPtr params, int nparams, - unsigned long flags, + unsigned int flags, qemuMigrationParty party) { g_autoptr(qemuMigrationParams) migParams =3D NULL; @@ -681,7 +681,7 @@ qemuMigrationParamsDump(qemuMigrationParams *migParams, virTypedParameterPtr *params, int *nparams, int *maxparams, - unsigned long *flags) + unsigned int *flags) { size_t i; diff --git a/src/qemu/qemu_migration_params.h b/src/qemu/qemu_migration_par= ams.h index 5612a4d283..e7c65f6a21 100644 --- a/src/qemu/qemu_migration_params.h +++ b/src/qemu/qemu_migration_params.h @@ -77,7 +77,7 @@ qemuMigrationParamsGetAlwaysOnCaps(qemuMigrationParty par= ty); qemuMigrationParams * qemuMigrationParamsFromFlags(virTypedParameterPtr params, int nparams, - unsigned long flags, + unsigned int flags, qemuMigrationParty party); int @@ -85,7 +85,7 @@ qemuMigrationParamsDump(qemuMigrationParams *migParams, virTypedParameterPtr *params, int *nparams, int *maxparams, - unsigned long *flags); + unsigned int *flags); qemuMigrationParams * qemuMigrationParamsNew(void); --=20 2.37.3 From nobody Fri Apr 19 16:48:04 2024 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=1669122204; cv=none; d=zohomail.com; s=zohoarc; b=HNmepxif6PBHKXd/yfALvm+gF5uaiAZbQQMW4pCl+T+oP/50fgkpQ7xucZqwUJ9E4GSQtBetMsnvL7pnRsiKlh4bAxYnPaSufvkOiSovEa+sQjQToQcLHUeQL3krMNvEjHKc1bxKkdO1VYFdGbLzrVZMzb5N+1QMv2FwsMqyJEo= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1669122204; 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=oWDrlMvyZqJskAWIf54DFVvVnnuR1klHFNLspvTQ2NQ=; b=B2mqrqSmAduaPWfIsWaLd8gLKBTVD8c4U/t9P2EvGkZKNm+lwJguS9xFHwjXYrPDZJYytG6SIdQNtZL7iMGS6zvvAvuAnKab/pzyJbAHQx0nhiwxGLCQEzQoyPg2rJWbXuXaWbJf3sd3PeLqm+yyXYml4p2TgqJXKzAL7u2pUus= 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 1669122204353812.4225961705077; Tue, 22 Nov 2022 05:03:24 -0800 (PST) Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-363-Jd-45rHxOCyNtgtbhS0c2Q-1; Tue, 22 Nov 2022 08:03:17 -0500 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.rdu2.redhat.com [10.11.54.7]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 96558802D32; Tue, 22 Nov 2022 13:03:13 +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 83B35140EBF3; Tue, 22 Nov 2022 13:03:13 +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 781A61946589; Tue, 22 Nov 2022 13:03:13 +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 88E691946587 for ; Tue, 22 Nov 2022 13:03:11 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id 7F40E492B2A; Tue, 22 Nov 2022 13:03:11 +0000 (UTC) Received: from speedmetal.redhat.com (ovpn-208-20.brq.redhat.com [10.40.208.20]) by smtp.corp.redhat.com (Postfix) with ESMTP id DE43A492B17 for ; Tue, 22 Nov 2022 13:03:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1669122203; 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=oWDrlMvyZqJskAWIf54DFVvVnnuR1klHFNLspvTQ2NQ=; b=fBoRvFWDia6n3+owZKeAfJ/o3c622hhbKWYwiv3ZZCtCvKlLFjoq2O5bGPiKu5ErU4plRu jfHFQ2wqR08RAXBa++99D+PToMAbZUt7W+pRJ090xAfictFmvApsoSUbuLIF/i4Maft5aO JHSNLIRnGy1hAnCyHLNr4bLLWMSGOLs= X-MC-Unique: Jd-45rHxOCyNtgtbhS0c2Q-1 X-Original-To: libvir-list@listman.corp.redhat.com From: Peter Krempa To: libvir-list@redhat.com Subject: [PATCH 5/5] libxl: migration: Use 'unsigned int' for flags Date: Tue, 22 Nov 2022 14:02:58 +0100 Message-Id: In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.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.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: 1669122204805100007 Content-Type: text/plain; charset="utf-8" Fix the type for few internal functions. Externally the APIs were already limiting 'flags' to 'unsigned int'. Signed-off-by: Peter Krempa Reviewed-by: J=C3=A1n Tomko --- src/libxl/libxl_migration.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/libxl/libxl_migration.c b/src/libxl/libxl_migration.c index 6048540334..0867194d9e 100644 --- a/src/libxl/libxl_migration.c +++ b/src/libxl/libxl_migration.c @@ -329,7 +329,7 @@ libxlMigrateDstReceive(virNetSocket *sock, static int libxlDoMigrateSrcSend(libxlDriverPrivate *driver, virDomainObj *vm, - unsigned long flags, + unsigned int flags, int sockfd) { libxlDriverConfig *cfg =3D libxlDriverConfigGet(driver); @@ -877,7 +877,7 @@ struct libxlTunnelControl { static int libxlMigrationSrcStartTunnel(libxlDriverPrivate *driver, virDomainObj *vm, - unsigned long flags, + unsigned int flags, virStreamPtr st, struct libxlTunnelControl **tnl) { --=20 2.37.3