From nobody Tue Apr 23 22:25:37 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=fail(p=quarantine dis=quarantine) header.from=huawei.com ARC-Seal: i=1; a=rsa-sha256; t=1668850881; cv=none; d=zohomail.com; s=zohoarc; b=VwEr09Hl5JdgLHZa+wXl/Px2VYxWsGsbSvTS6PewzBEtOcYqYqT/Ds1EoIsadAwv+fmLtQmJdeXw/d+39tTmnRzF9qmCAa8VYA9HIcoRcz8hcPeNQuovfEW/F8ZKDCXHjbp4SR4CqemEdPJbMfibCwPuvGMCjw4GJF6T3Wo0J+4= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1668850881; h=Content-Type:Content-Transfer-Encoding:Cc: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=0dFg7OjytoiAn1k5uMDZbwTVQK4u8LouE1h88y/VLx0=; b=KrqrnnNW1FXUk58OX+/C9XLOrtHH4Y4lCjqNzYThNj9GnisUGYWnF6Fg4dEl4MZkNTCE4ixyZRTyEGlttb7sfplH/PCo0nezVynCeG4IxJOSK3MR8P7uWCxHmPeqCJIWsGpPRuek4uCUfxJ714IgI2r8UO6asvfL/qag7Hz/4jQ= 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=fail header.from= (p=quarantine dis=quarantine) 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 1668850881115311.0813204314002; Sat, 19 Nov 2022 01:41:21 -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-621-7HJVq_wMOtmHX-zJjotOVw-1; Sat, 19 Nov 2022 04:41:15 -0500 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.rdu2.redhat.com [10.11.54.8]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 6E39A1C05B17; Sat, 19 Nov 2022 09:41: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 4B646C15BAB; Sat, 19 Nov 2022 09:41: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 294C51946587; Sat, 19 Nov 2022 09:41:10 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id C24211946587 for ; Sat, 19 Nov 2022 09:41:08 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id 794B72166B4C; Sat, 19 Nov 2022 09:41:08 +0000 (UTC) Received: from mimecast-mx02.redhat.com (mimecast03.extmail.prod.ext.rdu2.redhat.com [10.11.55.19]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 7275F2166B26 for ; Sat, 19 Nov 2022 09:41:08 +0000 (UTC) Received: from us-smtp-1.mimecast.com (us-smtp-2.mimecast.com [205.139.110.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 54692811E87 for ; Sat, 19 Nov 2022 09:41:08 +0000 (UTC) Received: from szxga02-in.huawei.com (szxga02-in.huawei.com [45.249.212.188]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-642-blljHZ8uNC-KBJCKMP8jKw-1; Sat, 19 Nov 2022 04:41:05 -0500 Received: from dggpeml500022.china.huawei.com (unknown [172.30.72.55]) by szxga02-in.huawei.com (SkyGuard) with ESMTP id 4NDpYK5ZwCzRpJ7 for ; Sat, 19 Nov 2022 17:40:37 +0800 (CST) Received: from localhost.localdomain (10.175.124.27) by dggpeml500022.china.huawei.com (7.185.36.66) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.31; Sat, 19 Nov 2022 17:41:01 +0800 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1668850880; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc: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=0dFg7OjytoiAn1k5uMDZbwTVQK4u8LouE1h88y/VLx0=; b=hryOjfdxiOtPbKnwWF+URDsMBJAZMcMboDH+837bvB1Z2HDWRC8AT/gDDK5NxY4SKYZNUS N8GZsxR8OKo9EEbhencOiO9lg5I7MI+30UZJoe8xij+wo873EPq+949x1eHXmGsL5M2Tg2 afEiEJE056D2SKcSiSfkfYV/5TsXCEk= X-MC-Unique: 7HJVq_wMOtmHX-zJjotOVw-1 X-Original-To: libvir-list@listman.corp.redhat.com X-MC-Unique: blljHZ8uNC-KBJCKMP8jKw-1 From: Jiang Jiacheng To: Subject: [PATCH 1/2] qemu: convert the flags type to unsigned long Date: Sat, 19 Nov 2022 17:31:27 +0800 Message-ID: <20221119093128.4047045-2-jiangjiacheng@huawei.com> In-Reply-To: <20221119093128.4047045-1-jiangjiacheng@huawei.com> References: <20221119093128.4047045-1-jiangjiacheng@huawei.com> MIME-Version: 1.0 X-Originating-IP: [10.175.124.27] X-ClientProxiedBy: dggems701-chm.china.huawei.com (10.3.19.178) To dggpeml500022.china.huawei.com (7.185.36.66) X-CFilter-Loop: Reflected X-Mimecast-Impersonation-Protect: Policy=CLT - Impersonation Protection Definition; Similar Internal Domain=false; Similar Monitored External Domain=false; Custom External Domain=false; Mimecast External Domain=false; Newly Observed Domain=false; Internal User Name=false; Custom Display Name List=false; Reply-to Address Mismatch=false; Targeted Threat Dictionary=false; Mimecast Threat Dictionary=false; Custom Threat Dictionary=false X-Scanned-By: MIMEDefang 3.1 on 10.11.54.6 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: , Cc: yubihong@huawei.com, zhengchuan@huawei.com, linyilu@huawei.com, xiexiangyou@huawei.com Errors-To: libvir-list-bounces@redhat.com Sender: "libvir-list" X-Scanned-By: MIMEDefang 3.1 on 10.11.54.8 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: 1668850881370100003 Content-Type: text/plain; charset="utf-8" The flags type is unsigend long but passed as unsigend int when invoke 'qemuMigrationSrcNBDStorageCopy'. Modify it to prevent data truncation. Signed-off-by: Jiang Jiacheng --- src/qemu/qemu_migration.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/qemu/qemu_migration.c b/src/qemu/qemu_migration.c index bba4e1dbf3..ba6c933885 100644 --- a/src/qemu/qemu_migration.c +++ b/src/qemu/qemu_migration.c @@ -1077,7 +1077,7 @@ qemuMigrationSrcNBDStorageCopyOne(virDomainObj *vm, bool mirror_shallow, const char *tlsAlias, const char *tlsHostname, - unsigned int flags) + unsigned long flags) { qemuDomainDiskPrivate *diskPriv =3D QEMU_DOMAIN_DISK_PRIVATE(disk); qemuBlockJobData *job =3D NULL; @@ -1142,7 +1142,7 @@ qemuMigrationSrcNBDStorageCopy(virQEMUDriver *driver, const char *tlsAlias, const char *tlsHostname, const char *nbdURI, - unsigned int flags) + unsigned long flags) { qemuDomainObjPrivate *priv =3D vm->privateData; int port; --=20 2.33.0 From nobody Tue Apr 23 22:25:37 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=fail(p=quarantine dis=quarantine) header.from=huawei.com ARC-Seal: i=1; a=rsa-sha256; t=1668850881; cv=none; d=zohomail.com; s=zohoarc; b=kv0s2fEVYzyKibZUktAmVgggJHbdiziWWFS+uvqlmR1cxP/xBRF+M7uoJ4UhxawIIxtS+j88FTBGuKTFk4PQG7AZPh3EshXIjopnXC93hcLZ2IPRMKdJGn/VJ3DWh+Qd1ul9ZrVMjGMt11MyOSXcmaNYMnjFs8NoS6TDpfL3uW8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1668850881; h=Content-Type:Content-Transfer-Encoding:Cc: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=BpEx75eLUKjrp1aAu3nd1405MBBOdJsmfk3kybCt5Y4=; b=ZNi8+6D+VqhvpxDopsks4IvIgxCnrdegkj7/2ui4MhmR48wQEEFHB52NFXzXF1OIVpya4rrFAgxWu2UtKZhjSz4RSdHFcXMUbSphcg1HynfnMOfcssXbSvOw7eX5ry0CWMETAvSJVYcuuo7CbIFYz8SU4U2LVhxK1owYVdLw1l4= 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=fail header.from= (p=quarantine dis=quarantine) 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 1668850881310738.0985455469396; Sat, 19 Nov 2022 01:41:21 -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-248-cKszXCj-NmuSLmiib-gtQQ-1; Sat, 19 Nov 2022 04:41:14 -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 E3B983804074; Sat, 19 Nov 2022 09:41: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 D060D1415123; Sat, 19 Nov 2022 09:41: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 7909C19465A8; Sat, 19 Nov 2022 09:41:12 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id DB8451946587 for ; Sat, 19 Nov 2022 09:41:09 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id BA9752166B4D; Sat, 19 Nov 2022 09:41:09 +0000 (UTC) Received: from mimecast-mx02.redhat.com (mimecast03.extmail.prod.ext.rdu2.redhat.com [10.11.55.19]) by smtp.corp.redhat.com (Postfix) with ESMTPS id B23C32166B26 for ; Sat, 19 Nov 2022 09:41:09 +0000 (UTC) Received: from us-smtp-1.mimecast.com (us-smtp-2.mimecast.com [207.211.31.81]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 96AFF811E87 for ; Sat, 19 Nov 2022 09:41:09 +0000 (UTC) Received: from szxga01-in.huawei.com (szxga01-in.huawei.com [45.249.212.187]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-131-eX6NCDk6ML6YDI7TYprpBg-1; Sat, 19 Nov 2022 04:41:06 -0500 Received: from dggpeml500022.china.huawei.com (unknown [172.30.72.54]) by szxga01-in.huawei.com (SkyGuard) with ESMTP id 4NDpTM15KwzqSWc for ; Sat, 19 Nov 2022 17:37:11 +0800 (CST) Received: from localhost.localdomain (10.175.124.27) by dggpeml500022.china.huawei.com (7.185.36.66) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.31; Sat, 19 Nov 2022 17:41:01 +0800 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1668850880; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc: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=BpEx75eLUKjrp1aAu3nd1405MBBOdJsmfk3kybCt5Y4=; b=J7BoAgq9d30XbIwcBdGI6ct8fDTMpLgxgQRSo+BzrcsHWmha+P8fvj5WfR/CNbsrEtrfFz 4h3jkzmAp9h5UEg/3ypzEVMo2NXKklbHnOzraibpegZL+3RiWMkTC/78gHqnC5diIthtqk kqgJJyQcop7/IjgptJmF7+kNKfdvoe8= X-MC-Unique: cKszXCj-NmuSLmiib-gtQQ-1 X-Original-To: libvir-list@listman.corp.redhat.com X-MC-Unique: eX6NCDk6ML6YDI7TYprpBg-1 From: Jiang Jiacheng To: Subject: [PATCH 2/2] coding-style: Use the same style in the same structure Date: Sat, 19 Nov 2022 17:31:28 +0800 Message-ID: <20221119093128.4047045-3-jiangjiacheng@huawei.com> In-Reply-To: <20221119093128.4047045-1-jiangjiacheng@huawei.com> References: <20221119093128.4047045-1-jiangjiacheng@huawei.com> MIME-Version: 1.0 X-Originating-IP: [10.175.124.27] X-ClientProxiedBy: dggems701-chm.china.huawei.com (10.3.19.178) To dggpeml500022.china.huawei.com (7.185.36.66) X-CFilter-Loop: Reflected X-Mimecast-Impersonation-Protect: Policy=CLT - Impersonation Protection Definition; Similar Internal Domain=false; Similar Monitored External Domain=false; Custom External Domain=false; Mimecast External Domain=false; Newly Observed Domain=false; Internal User Name=false; Custom Display Name List=false; Reply-to Address Mismatch=false; Targeted Threat Dictionary=false; Mimecast Threat Dictionary=false; Custom Threat Dictionary=false X-Scanned-By: MIMEDefang 3.1 on 10.11.54.6 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: , Cc: yubihong@huawei.com, zhengchuan@huawei.com, linyilu@huawei.com, xiexiangyou@huawei.com 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: 1668850883376100005 Content-Type: text/plain; charset="utf-8" Coding-style of members in the same structure should be unified. Signed-off-by: Jiang Jiacheng --- src/locking/lock_daemon.c | 12 ++++++------ src/logging/log_daemon.c | 12 ++++++------ src/remote/remote_daemon.c | 14 +++++++------- 3 files changed, 19 insertions(+), 19 deletions(-) diff --git a/src/locking/lock_daemon.c b/src/locking/lock_daemon.c index c997d327c4..5eed6b7c26 100644 --- a/src/locking/lock_daemon.c +++ b/src/locking/lock_daemon.c @@ -809,14 +809,14 @@ int main(int argc, char **argv) { int rv; =20 struct option opts[] =3D { - { "verbose", no_argument, &verbose, 'v'}, - { "daemon", no_argument, &godaemon, 'd'}, - { "config", required_argument, NULL, 'f'}, - { "timeout", required_argument, NULL, 't'}, - { "pid-file", required_argument, NULL, 'p'}, + { "verbose", no_argument, &verbose, 'v' }, + { "daemon", no_argument, &godaemon, 'd' }, + { "config", required_argument, NULL, 'f' }, + { "timeout", required_argument, NULL, 't' }, + { "pid-file", required_argument, NULL, 'p' }, { "version", no_argument, NULL, 'V' }, { "help", no_argument, NULL, 'h' }, - {0, 0, 0, 0} + { 0, 0, 0, 0 }, }; =20 privileged =3D geteuid() =3D=3D 0; diff --git a/src/logging/log_daemon.c b/src/logging/log_daemon.c index 00fc4148fd..9b70ffad2f 100644 --- a/src/logging/log_daemon.c +++ b/src/logging/log_daemon.c @@ -613,14 +613,14 @@ int main(int argc, char **argv) { int rv; =20 struct option opts[] =3D { - { "verbose", no_argument, &verbose, 'v'}, - { "daemon", no_argument, &godaemon, 'd'}, - { "config", required_argument, NULL, 'f'}, - { "timeout", required_argument, NULL, 't'}, - { "pid-file", required_argument, NULL, 'p'}, + { "verbose", no_argument, &verbose, 'v' }, + { "daemon", no_argument, &godaemon, 'd' }, + { "config", required_argument, NULL, 'f' }, + { "timeout", required_argument, NULL, 't' }, + { "pid-file", required_argument, NULL, 'p' }, { "version", no_argument, NULL, 'V' }, { "help", no_argument, NULL, 'h' }, - {0, 0, 0, 0} + { 0, 0, 0, 0 }, }; =20 privileged =3D geteuid() =3D=3D 0; diff --git a/src/remote/remote_daemon.c b/src/remote/remote_daemon.c index f369d09d35..dd9344168b 100644 --- a/src/remote/remote_daemon.c +++ b/src/remote/remote_daemon.c @@ -807,17 +807,17 @@ int main(int argc, char **argv) { mode_t old_umask; =20 struct option opts[] =3D { - { "verbose", no_argument, &verbose, 'v'}, - { "daemon", no_argument, &godaemon, 'd'}, + { "verbose", no_argument, &verbose, 'v' }, + { "daemon", no_argument, &godaemon, 'd' }, #if defined(WITH_IP) && defined(LIBVIRTD) - { "listen", no_argument, &ipsock, 'l'}, + { "listen", no_argument, &ipsock, 'l' }, #endif /* !(WITH_IP && LIBVIRTD) */ - { "config", required_argument, NULL, 'f'}, - { "timeout", required_argument, NULL, 't'}, - { "pid-file", required_argument, NULL, 'p'}, + { "config", required_argument, NULL, 'f' }, + { "timeout", required_argument, NULL, 't' }, + { "pid-file", required_argument, NULL, 'p' }, { "version", no_argument, NULL, 'V' }, { "help", no_argument, NULL, 'h' }, - {0, 0, 0, 0} + { 0, 0, 0, 0 }, }; =20 if (virGettextInitialize() < 0 || --=20 2.33.0