From patchwork Wed Mar 17 03:22:12 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Michael Roth X-Patchwork-Id: 12144635 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-18.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,MSGID_FROM_MTA_HEADER,SPF_HELO_NONE, SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id E46CCC433DB for ; Wed, 17 Mar 2021 03:24:00 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 8164861481 for ; Wed, 17 Mar 2021 03:24:00 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 8164861481 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=amd.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:38404 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lMMmt-0006cL-LV for qemu-devel@archiver.kernel.org; Tue, 16 Mar 2021 23:23:59 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:36980) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lMMlj-0005K5-Le for qemu-devel@nongnu.org; Tue, 16 Mar 2021 23:22:47 -0400 Received: from mail-eopbgr750053.outbound.protection.outlook.com ([40.107.75.53]:4470 helo=NAM02-BL2-obe.outbound.protection.outlook.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lMMlh-00011A-Dz for qemu-devel@nongnu.org; Tue, 16 Mar 2021 23:22:47 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=oEAXonHL1CjxVVgkNr2Q/ZzdEJj0Hd1MK/ZSMxOo0Nv1NIrNo1hFop5jtw4jvdf+nX814bhbLLMaYriYSq0PSzBPm3sZEYoWP4ilieq/Q6UTgyksXGrm15+jlqwe7scx55pc4QGcIglyAuvyQcxfcBIgyXhUXMNseRwoTHFLvQoLYC2mTVUJ4GyEGf8fZ/Ji4RBUOuyM0MxrJeSMvmbVdn70aeFwg7oDrL1do+kGwJ4pn7kDIGk0v0mdnsrTgylaXEBA4rPeVLMHyOP1mLkKXYMne85ywT5CHWNGniM5oe48H7fTLscFn0E9b7bm28MwTPC0jlQzdRPrTBUfvDyQCA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=BLVHNmWfKpS5wSleofmGWUNZKm7XvJTuwf1TL5fCeJQ=; b=PQMX4alW4OFh/6G96q/GnrJdt0cbkM1sS79CLU4KFp3qvJ9wgxx8zOQpG0ZAYClwum0QHfB8VCQKMWwiaNuOEMZ+nGFIRYApcATQppO//lFV2FdVJnviOWl4tpQbC4ngrYrUTYe2ZSk6O4R63qjvm2MK/BXXEDKeNUFZrTHlGiwytqV4hqBXcAAtMwpgrK+F1HgOdY2pesdkNguuyMzQVOAnFhlRfTd7uWR39FyZB06xKaosEDCcYQN/aHSz9NiywlpR1Sy+qtaI7CEO0gAiEu21kMmhMRJ8oiIwxGW16nXvl7WGiENgbeLaVvrqBM6vitXxE8vaXZYgRuASnWnB2A== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=amd.com; dmarc=pass action=none header.from=amd.com; dkim=pass header.d=amd.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amd.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=BLVHNmWfKpS5wSleofmGWUNZKm7XvJTuwf1TL5fCeJQ=; b=H0MIYfEd41WYdXHOb0/Od1nL6dGDht2qm+BZ3JvLeRPm8t6i16/czh/m/StZafZFj4HOHdO95EMNs24YG9Lbrov3zPkIBoWNozZeOwE1Yrp28o0Dkv6BUW0wjDYckdXxO6fwMpD4mSKJlpCZw+JnZP7Ce8jl16pOQ63C7IsiIWM= Authentication-Results: nongnu.org; dkim=none (message not signed) header.d=none;nongnu.org; dmarc=none action=none header.from=amd.com; Received: from CH2PR12MB4133.namprd12.prod.outlook.com (2603:10b6:610:7a::13) by CH2PR12MB4954.namprd12.prod.outlook.com (2603:10b6:610:63::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3955.18; Wed, 17 Mar 2021 03:22:37 +0000 Received: from CH2PR12MB4133.namprd12.prod.outlook.com ([fe80::81f6:605c:f345:b99f]) by CH2PR12MB4133.namprd12.prod.outlook.com ([fe80::81f6:605c:f345:b99f%3]) with mapi id 15.20.3955.018; Wed, 17 Mar 2021 03:22:36 +0000 From: Michael Roth To: qemu-devel@nongnu.org Subject: [PULL for-6.0 1/6] qga: Correct loop count in qmp_guest_get_vcpus() Date: Tue, 16 Mar 2021 22:22:12 -0500 Message-Id: <20210317032217.1460684-2-michael.roth@amd.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210317032217.1460684-1-michael.roth@amd.com> References: <20210317032217.1460684-1-michael.roth@amd.com> X-Originating-IP: [165.204.84.11] X-ClientProxiedBy: BN9PR03CA0304.namprd03.prod.outlook.com (2603:10b6:408:112::9) To CH2PR12MB4133.namprd12.prod.outlook.com (2603:10b6:610:7a::13) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from localhost (165.204.84.11) by BN9PR03CA0304.namprd03.prod.outlook.com (2603:10b6:408:112::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3933.32 via Frontend Transport; Wed, 17 Mar 2021 03:22:36 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: 12d4e74f-0cbf-468d-309a-08d8e8f3e986 X-MS-TrafficTypeDiagnostic: CH2PR12MB4954: X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:651; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: eyCuQ07y2TDcYd7RCOmAyrVekbgDCPIH2NpOVByLL06OTVw7gp4PjKHIUe6U2Gwmi+YbJhXoExoM2s04DIxH+4H+dQ3JLwjUK+EvgO2TRMHCBE3KM/oMq73yuz3DT5K74Ij5cfuyFd/x/3l5Cv2c3HFyxRoB/Wk7YCmVGwBpaaTLxwaBITUFIGIXovKSlUiP8h59XAcm572pNlGruUuZuJIt2+d+19qOWIMnX7MzlsIVoNME1laDZkVGLUfWFuzYuBoLetzx83tf0aADA+K2gKHJLo4SXwQf5cdEFzDgvLV4DL2PA6PkH2mxM89BTBCQbPuNwDuI8/Fihz+vN1MuL/5uRTGwfzRECs82yY6ldj9drBpwZve+mOcRMWdxWdSJ7nY03p+KT4qiRzoXoIRrJQALqDUcGyRUJOGwddtLuCSjGM4BHZE+u7lN2h6T9PKzn43IJQxZZ2yqtsU18nsJAwU51iljwFAQkbTQngAw4L9QaJpUHxzQsskLbLfVxKIyARLVljkc1cGjSjwQI3sFqIBVNohUrn7zJtCjouWxAa4m1JBoICE4g5KdwslhKhgH X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:CH2PR12MB4133.namprd12.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(396003)(376002)(136003)(39860400002)(346002)(366004)(186003)(8676002)(8936002)(4326008)(478600001)(316002)(26005)(66946007)(54906003)(83380400001)(1076003)(2616005)(66476007)(956004)(66556008)(86362001)(6916009)(36756003)(44832011)(6666004)(6486002)(52116002)(16526019)(6496006)(5660300002)(2906002); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData: =?utf-8?q?PZiNAw4fMKCBRQdP95ebtfZK7KuEpw?= =?utf-8?q?zaoL1t+Mj5fdfhl+Eb2StVXPGi2HrzAXjFFn8hQUKeLBG6ymIsY8XXZE0nDYjnTfb?= =?utf-8?q?BhxGNT+LHFBa9wCXIc+liPCwVsytiGlth60f+6TR6wj+YJOCwV11kryDAy0Kr1FMW?= =?utf-8?q?V+ZYm5TajeJOaTljjbSwFfi/HX3Sbx8XOxJ1ZMcfE5Z8gsHbSPbm27UDmfi2kRhVn?= =?utf-8?q?ogAN/3AT5S5gqqO1luEm917nkkvhZOIHyz2a9d2SASrJ10L3NodpdUOgCPWAUFhEI?= =?utf-8?q?vM70WWdODmYz8vVpP2B8TbMmHobTMMppK/q4BkjMNfxW/u6LomwrOwEwBFz8qd7lW?= =?utf-8?q?1nLs8ESfR8hjbTojBqsO8ykQs7vjO4GrDApOMzH9/I9wdZZUnISgTP6no63dPV8Bd?= =?utf-8?q?GLaIedA+nUUf5GX8RcjjVvSNpqKQr90hCePIuMDhO2xYX/VMLXCIhLCL9SkiO8hs8?= =?utf-8?q?Vk+jHsd8bGEtOLaz5bnF6DJ2F02AaST6OefZ4vt/yQTp+m2ngG/8hX7a8QDvHLr0O?= =?utf-8?q?PvhGnC/SoHRp3ntwudyFPceiiKckI2A/dH81y/GkyHfbDJHOeADxEUBlS8yLIMvXT?= =?utf-8?q?eACZAviYtpD24g2aNsZYwNu0d9NJBVZXgaWQ6+WflWfXv7hEXGwFGnrqwrV4/zTwL?= =?utf-8?q?O2+H4ySoaJCE/W5Eg8FWpV23It1C0l/srqvcw8YsaSOO80JdNAHm/bQpXofLNx5DK?= =?utf-8?q?mB4kXNBxK9wmqt03EyTPcaFWXRnxKZU4jXIE9v3cnIYCgLm5PVpYFhE4CASELMNQJ?= =?utf-8?q?zI9dt+1xj1LVlU2yxh3ksD8BcweRYz3xi0YIJ+7UgBnS7tZsq53VcsGUkpcpzEq2K?= =?utf-8?q?0Jxfd/gRfLr8TsWvzl6LaZVO3x+RCB0PW+LEB8B7EE8IGZyYgkttlj+sdae+aKuSG?= =?utf-8?q?8Vj/Wb6GQnmFewqcjWKYHMBoN7Egn5lI9teB5qiSWrxjvET1xtGQ2NcHBlNt3AAjH?= =?utf-8?q?LGvZw8PrqIIQlDONzOvDzLMJ3yvT7GntQ6dPNuIYpoov+0awMBTGj7F77Gu8Rtpmd?= =?utf-8?q?j+oVVxupZ5eS+7TPHkXmOyr7MKfZ5PeZmTQqYjK1FQ8++a7Bov88GhM+veKhkH4Dh?= =?utf-8?q?z+R7tdfBZUaWFy43Cv3VmpyuCdF00h+kGzWq0GSQ6VXsymAqEFhxsrU0xDZnHvAF6?= =?utf-8?q?t1IIWn11w4Ui3qU776dRBmWyLfjFLvykd31y/nCsIDiPfciTaBeVwMn5YzMoAfmDc?= =?utf-8?q?kPmvkYPI7dtfwZWMetiXN8g169043NkHyB89NIAeiQDIy1Bh8dTXsevjtzx/7KTPw?= =?utf-8?q?VeeLY4QaAkBXe9?= X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-Network-Message-Id: 12d4e74f-0cbf-468d-309a-08d8e8f3e986 X-MS-Exchange-CrossTenant-AuthSource: CH2PR12MB4133.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 17 Mar 2021 03:22:36.8096 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: O/PykS3gHDxI+ADeLJ+4ucV1zMw56+JLKSPBNqix4csvXBP2hgt4kHKmKZGz9vYc1MNdy0UMQklkhnSBO5cM/w== X-MS-Exchange-Transport-CrossTenantHeadersStamped: CH2PR12MB4954 Received-SPF: softfail client-ip=40.107.75.53; envelope-from=Michael.Roth@amd.com; helo=NAM02-BL2-obe.outbound.protection.outlook.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, MSGID_FROM_MTA_HEADER=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: peter.maydell@linaro.org, =?utf-8?q?Marc-Andr=C3=A9_Lureau?= , Lin Ma Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" From: Lin Ma The guest-get-vcpus returns incorrect vcpu info in case we hotunplug vcpus(not the last one). e.g.: A VM has 4 VCPUs: cpu0 + 3 hotunpluggable online vcpus(cpu1, cpu2 and cpu3). Hotunplug cpu2, Now only cpu0, cpu1 and cpu3 are present & online. ./qmp-shell /tmp/qmp-monitor.sock (QEMU) query-hotpluggable-cpus {"return": [ {"props": {"core-id": 0, "thread-id": 0, "socket-id": 3}, "vcpus-count": 1, "qom-path": "/machine/peripheral/cpu3", "type": "host-x86_64-cpu"}, {"props": {"core-id": 0, "thread-id": 0, "socket-id": 2}, "vcpus-count": 1, "qom-path": "/machine/peripheral/cpu2", "type": "host-x86_64-cpu"}, {"props": {"core-id": 0, "thread-id": 0, "socket-id": 1}, "vcpus-count": 1, "qom-path": "/machine/peripheral/cpu1", "type": "host-x86_64-cpu"}, {"props": {"core-id": 0, "thread-id": 0, "socket-id": 0}, "vcpus-count": 1, "qom-path": "/machine/unattached/device[0]", "type": "host-x86_64-cpu"} ]} (QEMU) device_del id=cpu2 {"return": {}} (QEMU) query-hotpluggable-cpus {"return": [ {"props": {"core-id": 0, "thread-id": 0, "socket-id": 3}, "vcpus-count": 1, "qom-path": "/machine/peripheral/cpu3", "type": "host-x86_64-cpu"}, {"props": {"core-id": 0, "thread-id": 0, "socket-id": 2}, "vcpus-count": 1, "type": "host-x86_64-cpu"}, {"props": {"core-id": 0, "thread-id": 0, "socket-id": 1}, "vcpus-count": 1, "qom-path": "/machine/peripheral/cpu1", "type": "host-x86_64-cpu"}, {"props": {"core-id": 0, "thread-id": 0, "socket-id": 0}, "vcpus-count": 1, "qom-path": "/machine/unattached/device[0]", "type": "host-x86_64-cpu"} ]} Before: ./qmp-shell -N /tmp/qmp-ga.sock Welcome to the QMP low-level shell! Connected (QEMU) guest-get-vcpus {"return": [ {"online": true, "can-offline": false, "logical-id": 0}, {"online": true, "can-offline": true, "logical-id": 1}]} After: ./qmp-shell -N /tmp/qmp-ga.sock Welcome to the QMP low-level shell! Connected (QEMU) guest-get-vcpus {"return": [ {"online": true, "can-offline": false, "logical-id": 0}, {"online": true, "can-offline": true, "logical-id": 1}, {"online": true, "can-offline": true, "logical-id": 3}]} Signed-off-by: Lin Ma Reviewed-by: Marc-André Lureau *fix build breakage by using PRId64 for sscanf Signed-off-by: Michael Roth --- qga/commands-posix.c | 43 ++++++++++++++----------------------------- 1 file changed, 14 insertions(+), 29 deletions(-) diff --git a/qga/commands-posix.c b/qga/commands-posix.c index 3f18df1bb6..665735fd09 100644 --- a/qga/commands-posix.c +++ b/qga/commands-posix.c @@ -2370,24 +2370,6 @@ error: return NULL; } -#define SYSCONF_EXACT(name, errp) sysconf_exact((name), #name, (errp)) - -static long sysconf_exact(int name, const char *name_str, Error **errp) -{ - long ret; - - errno = 0; - ret = sysconf(name); - if (ret == -1) { - if (errno == 0) { - error_setg(errp, "sysconf(%s): value indefinite", name_str); - } else { - error_setg_errno(errp, errno, "sysconf(%s)", name_str); - } - } - return ret; -} - /* Transfer online/offline status between @vcpu and the guest system. * * On input either @errp or *@errp must be NULL. @@ -2458,30 +2440,33 @@ static void transfer_vcpu(GuestLogicalProcessor *vcpu, bool sys2vcpu, GuestLogicalProcessorList *qmp_guest_get_vcpus(Error **errp) { - int64_t current; GuestLogicalProcessorList *head, **tail; - long sc_max; + const char *cpu_dir = "/sys/devices/system/cpu"; + const gchar *line; + g_autoptr(GDir) cpu_gdir = NULL; Error *local_err = NULL; - current = 0; head = NULL; tail = &head; - sc_max = SYSCONF_EXACT(_SC_NPROCESSORS_CONF, &local_err); + cpu_gdir = g_dir_open(cpu_dir, 0, NULL); - while (local_err == NULL && current < sc_max) { - GuestLogicalProcessor *vcpu; - int64_t id = current++; - char *path = g_strdup_printf("/sys/devices/system/cpu/cpu%" PRId64 "/", - id); + if (cpu_gdir == NULL) { + error_setg_errno(errp, errno, "failed to list entries: %s", cpu_dir); + return NULL; + } - if (g_file_test(path, G_FILE_TEST_EXISTS)) { + while (local_err == NULL && (line = g_dir_read_name(cpu_gdir)) != NULL) { + GuestLogicalProcessor *vcpu; + int64_t id; + if (sscanf(line, "cpu%" PRId64, &id)) { + g_autofree char *path = g_strdup_printf("/sys/devices/system/cpu/" + "cpu%" PRId64 "/", id); vcpu = g_malloc0(sizeof *vcpu); vcpu->logical_id = id; vcpu->has_can_offline = true; /* lolspeak ftw */ transfer_vcpu(vcpu, true, path, &local_err); QAPI_LIST_APPEND(tail, vcpu); } - g_free(path); } if (local_err == NULL) { From patchwork Wed Mar 17 03:22:13 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Michael Roth X-Patchwork-Id: 12144633 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-18.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,MSGID_FROM_MTA_HEADER,SPF_HELO_NONE, SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id A9EFFC433E0 for ; Wed, 17 Mar 2021 03:23:59 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 3345164F01 for ; Wed, 17 Mar 2021 03:23:59 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 3345164F01 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=amd.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:38268 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lMMms-0006Yu-6o for qemu-devel@archiver.kernel.org; Tue, 16 Mar 2021 23:23:58 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:36964) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lMMlh-0005K3-CE for qemu-devel@nongnu.org; Tue, 16 Mar 2021 23:22:46 -0400 Received: from mail-eopbgr750053.outbound.protection.outlook.com ([40.107.75.53]:4470 helo=NAM02-BL2-obe.outbound.protection.outlook.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lMMle-00011A-0E for qemu-devel@nongnu.org; Tue, 16 Mar 2021 23:22:45 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=f93MATt+KNWfdxyPFq6C7E8PX5oD1gk1dfdt3sS9VtsxwG0jrkAJPhkQgSpCSkRYJ7p5EusEHPGo8ixCXr/Mio1S4JbvAsEVtEGQMWe2fDRxYurB14aELekx8iiscc4V96wzqWSups1L22q0OM0hBgOQM3e9Ao9IeBTeJXLBc7MgKpf3JbuFtDCY0mRTmmbSC2+Fg2L7/H7oc97DPxfhFlty+v3HKb6yvWwQcKHVbTVwaBp48HwmUNVxkUHo/ovHBZ92qjs/Uku7PDYxh/FudeoNdCynQqb/LbuqinM17wY2a2tklYqm89Kpvzj89Cf53t7OF/Re2TQ4APP03BPmQw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=92jsJvuv8ElMBGIt++Co99O6cmWilu72GoEOAarhtRM=; b=J6eL8WVhnfBwudr5aS1Cv64fhNuJpz3XPmi8eoW5s/D0+yI+MYQVhRtkISMnQN6kLMitERF3vnWBIoKXZaWw4YS5JTEegDv9Z8ewF4QQ0I/bDkbCqsz8kKXAjbq/g4M1wNOCK8c+b6r+FK1ICenexu++k60hT61gimko4O6leZAMSm/YM6bn47nRtFTXc1PJ88pEiiTF8N4ppdfj9tf4hqKQFG3xbEUUj84tO+CzRjPNy0wl6skOUA7MgI9lO/oF/AyOMwkysuKwOv+vkpIs8VMTWdLGGNKRl0oWkD0DQVHUn/7PIUmxMJFPnQYnho7R8nmwvMhca7uYj/JycK9wfw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=amd.com; dmarc=pass action=none header.from=amd.com; dkim=pass header.d=amd.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amd.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=92jsJvuv8ElMBGIt++Co99O6cmWilu72GoEOAarhtRM=; b=bS2MdvZz6TwKLchCmxfAdcyPSDjFaIIHYgmSlZJbvS5CNHFKlHVrn3IAB1TrXt7GKYepsvOixMLTXqxm4aWD1+2a2nC5+esRPvuEz0sK190cGIfJrsVmIVo5gmeUyu9ZQmoomlx9B4fb9ra2hQeNrRjUS6mFzZ5zw8LYJNYA6j0= Authentication-Results: nongnu.org; dkim=none (message not signed) header.d=none;nongnu.org; dmarc=none action=none header.from=amd.com; Received: from CH2PR12MB4133.namprd12.prod.outlook.com (2603:10b6:610:7a::13) by CH2PR12MB4954.namprd12.prod.outlook.com (2603:10b6:610:63::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3955.18; Wed, 17 Mar 2021 03:22:39 +0000 Received: from CH2PR12MB4133.namprd12.prod.outlook.com ([fe80::81f6:605c:f345:b99f]) by CH2PR12MB4133.namprd12.prod.outlook.com ([fe80::81f6:605c:f345:b99f%3]) with mapi id 15.20.3955.018; Wed, 17 Mar 2021 03:22:39 +0000 From: Michael Roth To: qemu-devel@nongnu.org Subject: [PULL for-6.0 2/6] qga: Add spaces around operator Date: Tue, 16 Mar 2021 22:22:13 -0500 Message-Id: <20210317032217.1460684-3-michael.roth@amd.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210317032217.1460684-1-michael.roth@amd.com> References: <20210317032217.1460684-1-michael.roth@amd.com> X-Originating-IP: [165.204.84.11] X-ClientProxiedBy: BN9PR03CA0330.namprd03.prod.outlook.com (2603:10b6:408:112::35) To CH2PR12MB4133.namprd12.prod.outlook.com (2603:10b6:610:7a::13) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from localhost (165.204.84.11) by BN9PR03CA0330.namprd03.prod.outlook.com (2603:10b6:408:112::35) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3933.32 via Frontend Transport; Wed, 17 Mar 2021 03:22:39 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: fdab74c3-46ab-478a-3290-08d8e8f3eb22 X-MS-TrafficTypeDiagnostic: CH2PR12MB4954: X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:51; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: DPEM9e6uPuiHE9oi0jFBKHwObVwcx8LRqSZleqBu+GU6aEmkEuqjuMKOpdfq909G2glyMm+37bso0o+kP2i04uj5tC8rxS/fyLdk30x53kkYci5CgP5KVMPx2SGfhbDXaWFyZNELLrB6gM5YO6jHtnMsGGKBq2LXUUQlnYuohmOAvmPRDJx99rg349ldEvG/Zhn/gSx7MWjohr/XaiD/gSFqzzTsvqI7GyfLvIBc1JCzApKd7dxAVumM1l88qlO6ZcycbnUv6AF3UmS22e6Ll3X6FbD7f36aZ4HOEf7Tuynsdn8Mg4S9XY0c3xYRmr6RNepz2bMsXpregpJ325cIWzUhSS6AC5lrWg8VQb18+sL0WdkmKTBYGA0LA94bVf07AQNvaA5kNHpOFcRb2LgvucMfyB6Gh3ei+Hkn2dtXAFdWXkGa22NosJtBjl32uG+7E0v/CbImh7o6Q4CKCfSmKACl05ThDhAC7az/POZMZkKpkFrJTROoMZUZ8ewlp+xl/zIxed6bjGizrzGjE3W+nt28Pne5jEWikaKqQQgdAP6PgXcYsAdTBtg6oKc4brX5 X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:CH2PR12MB4133.namprd12.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(396003)(376002)(136003)(39860400002)(346002)(366004)(186003)(8676002)(8936002)(4326008)(478600001)(316002)(26005)(66946007)(54906003)(83380400001)(1076003)(2616005)(66476007)(956004)(66556008)(86362001)(6916009)(36756003)(44832011)(6666004)(6486002)(52116002)(16526019)(6496006)(5660300002)(2906002); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData: =?utf-8?q?h3T/EjTtZSVWUvYtQ0aIhZs9/Xg/qC?= =?utf-8?q?02NUhW2+S6PqjaLagLILhsoCG3BArlt55KvJ5SEwSMKEtQpbFu4wA0FKLNTzXB4m5?= =?utf-8?q?/q0XkQhbSR9jiXEZq/HYVjbEwZ3MTcGS4rsiu7nokVJHvkfR/IHPPOSNgoLlbmTjd?= =?utf-8?q?iCA4fCbX4QmDdZ34dgNn6bb8nDkMr6+kPUB7EgADcIA+nz+jtQPWsGxW4diURr6/w?= =?utf-8?q?O8/K7gF2HXu6CflqaaP3quhMYcM0jORwIvTxgt4jsjVkPfzVnICFyOLU0pip8OGZQ?= =?utf-8?q?wqwWAUfVsOP3jdgw3SLQ1t14fMa3XlCBhGe2pKSuQr8ycIeI0PAZ4Un9qEQRoNFp6?= =?utf-8?q?luEHeUhoIBIQpT0f2ODhisr2DDQd77d7pLmqy8sqHqkXxEQ8DEdCOwn9rb3TqvrJl?= =?utf-8?q?/ZwQk6kKp3oUMTlmiiyYtku5C4N/JkSzZde/LYWy1p9yuTDqdstDnjz7fBuAfAetn?= =?utf-8?q?Xrt7bWN75pUJLyJ4P/B2wK1PiSzTdZ/42t5b8vmlyOuiZeqjdKVPWnDKTvgd5ztSr?= =?utf-8?q?vriFMPEei5nKOEBK9szioOSR6Q6k7ylOAG4vavt8EuVTfLMwc4YAu54jAM6R46IAZ?= =?utf-8?q?NVPMieBozjDOnq2fAb6fZ/2WfK5+iHyTK49xudnVVoZotziwnOz5WrdtlsZe9yxoM?= =?utf-8?q?6urnGmpKKZuhkFeUB4sXdb4B7C83EEg2xUKr+MOYD4PT80Za0BkS285a1jzxe369f?= =?utf-8?q?87MIEF7yCY3xCl3IWfEiOGcFJ+e7DJ119XoT+AbK52FtD1bsW9khqd3IEGtmavGYr?= =?utf-8?q?hB1FlNP31Wu/HxvMJX5RrnTQGZOGmnp6wTnsJC9FtvDaaZ7MZJYzrfAgERZi0MRU1?= =?utf-8?q?gdVyh1nsjBVjvvN6v1iRAEDE7cm5g1CpJxGPDDzJEfDnaoTxYFD2IzBsBV5xgtPnd?= =?utf-8?q?5cnF7kZ4cROuI2/pBqQ5KayaOCIdqm4AsHi89i7MbG51xzFJCu6/Wy0EvJTwB9AsD?= =?utf-8?q?4QRx8uVZnTU5G6qRRZhGw+4KKZS3eMbOC0r8j3GA5v3CibxS9ruVh3YCBO2ZvdOwb?= =?utf-8?q?7+v5ARELgtFKpsQec5Q5wdQJDHd5Pli7ZAPrhmb2F7JWzecBZSZEEHVtvR1KqQC8z?= =?utf-8?q?OzOBs9tUz3vEyZ1I2Odl68MjQ39OQyfeoQV0bw3bSwW9pZSFP+vXEE8tiGTpWzFrd?= =?utf-8?q?b81uXTMdD9BffkpXXcFEbd9uCL3uBg7OZg6XysFOn1ch8qV4wg1hM/8bZeuGu4tL4?= =?utf-8?q?grxrjGe3ASzXdx/6C7BSY/UVxPm+20OweTP9bGT1kl50l0s0Sw0Sj6jIbqif8Z2/U?= =?utf-8?q?SNlncsoZHHdSZl?= X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-Network-Message-Id: fdab74c3-46ab-478a-3290-08d8e8f3eb22 X-MS-Exchange-CrossTenant-AuthSource: CH2PR12MB4133.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 17 Mar 2021 03:22:39.4888 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: qWo/0ZILlf8hhERfwWb0sABxvVI3uNOa0mwUcLsYm1UIOuIw7VcAyP84j9LKMH0hHQKtzSU3L2RCFYTzlYynAw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: CH2PR12MB4954 Received-SPF: softfail client-ip=40.107.75.53; envelope-from=Michael.Roth@amd.com; helo=NAM02-BL2-obe.outbound.protection.outlook.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, MSGID_FROM_MTA_HEADER=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: AlexChen , peter.maydell@linaro.org, =?utf-8?q?Mar?= =?utf-8?q?c-Andr=C3=A9_Lureau?= , Euler Robot Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" From: AlexChen Reported-by: Euler Robot Signed-off-by: AlexChen Reviewed-by: Marc-André Lureau *fix 80+ char violation while we're here *fix w32 build breakage from changing INVALID_SET_FILE_POINTER definition from a cast to a subtraction Signed-off-by: Michael Roth --- qga/channel-win32.c | 7 ++++--- qga/commands-posix.c | 4 ++-- qga/commands-win32.c | 22 +++++++++++----------- qga/commands.c | 4 ++-- qga/main.c | 4 ++-- 5 files changed, 21 insertions(+), 20 deletions(-) diff --git a/qga/channel-win32.c b/qga/channel-win32.c index 4f04868a76..779007e39b 100644 --- a/qga/channel-win32.c +++ b/qga/channel-win32.c @@ -292,9 +292,9 @@ static gboolean ga_channel_open(GAChannel *c, GAChannelMethod method, return false; } - if (method == GA_CHANNEL_ISA_SERIAL){ + if (method == GA_CHANNEL_ISA_SERIAL) { snprintf(newpath, sizeof(newpath), "\\\\.\\%s", path); - }else { + } else { g_strlcpy(newpath, path, sizeof(newpath)); } @@ -307,7 +307,8 @@ static gboolean ga_channel_open(GAChannel *c, GAChannelMethod method, return false; } - if (method == GA_CHANNEL_ISA_SERIAL && !SetCommTimeouts(c->handle,&comTimeOut)) { + if (method == GA_CHANNEL_ISA_SERIAL + && !SetCommTimeouts(c->handle, &comTimeOut)) { g_autofree gchar *emsg = g_win32_error_message(GetLastError()); g_critical("error setting timeout for com port: %s", emsg); CloseHandle(c->handle); diff --git a/qga/commands-posix.c b/qga/commands-posix.c index 665735fd09..4299ebd96f 100644 --- a/qga/commands-posix.c +++ b/qga/commands-posix.c @@ -110,7 +110,7 @@ void qmp_guest_shutdown(bool has_mode, const char *mode, Error **errp) reopen_fd_to_null(2); execle("/sbin/shutdown", "shutdown", "-h", shutdown_flag, "+0", - "hypervisor initiated shutdown", (char*)NULL, environ); + "hypervisor initiated shutdown", (char *)NULL, environ); _exit(EXIT_FAILURE); } else if (pid < 0) { error_setg_errno(errp, errno, "failed to create child process"); @@ -479,7 +479,7 @@ GuestFileRead *guest_file_read_unsafe(GuestFileHandle *gfh, gfh->state = RW_STATE_NEW; } - buf = g_malloc0(count+1); + buf = g_malloc0(count + 1); read_count = fread(buf, 1, count, fh); if (ferror(fh)) { error_setg_errno(errp, errno, "failed to read file"); diff --git a/qga/commands-win32.c b/qga/commands-win32.c index a00e6cb165..4f4c579a3b 100644 --- a/qga/commands-win32.c +++ b/qga/commands-win32.c @@ -110,15 +110,15 @@ static OpenFlags guest_file_open_modes[] = { {"w", GENERIC_WRITE, CREATE_ALWAYS}, {"wb", GENERIC_WRITE, CREATE_ALWAYS}, {"a", FILE_GENERIC_APPEND, OPEN_ALWAYS }, - {"r+", GENERIC_WRITE|GENERIC_READ, OPEN_EXISTING}, - {"rb+", GENERIC_WRITE|GENERIC_READ, OPEN_EXISTING}, - {"r+b", GENERIC_WRITE|GENERIC_READ, OPEN_EXISTING}, - {"w+", GENERIC_WRITE|GENERIC_READ, CREATE_ALWAYS}, - {"wb+", GENERIC_WRITE|GENERIC_READ, CREATE_ALWAYS}, - {"w+b", GENERIC_WRITE|GENERIC_READ, CREATE_ALWAYS}, - {"a+", FILE_GENERIC_APPEND|GENERIC_READ, OPEN_ALWAYS }, - {"ab+", FILE_GENERIC_APPEND|GENERIC_READ, OPEN_ALWAYS }, - {"a+b", FILE_GENERIC_APPEND|GENERIC_READ, OPEN_ALWAYS } + {"r+", GENERIC_WRITE | GENERIC_READ, OPEN_EXISTING}, + {"rb+", GENERIC_WRITE | GENERIC_READ, OPEN_EXISTING}, + {"r+b", GENERIC_WRITE | GENERIC_READ, OPEN_EXISTING}, + {"w+", GENERIC_WRITE | GENERIC_READ, CREATE_ALWAYS}, + {"wb+", GENERIC_WRITE | GENERIC_READ, CREATE_ALWAYS}, + {"w+b", GENERIC_WRITE | GENERIC_READ, CREATE_ALWAYS}, + {"a+", FILE_GENERIC_APPEND | GENERIC_READ, OPEN_ALWAYS }, + {"ab+", FILE_GENERIC_APPEND | GENERIC_READ, OPEN_ALWAYS }, + {"a+b", FILE_GENERIC_APPEND | GENERIC_READ, OPEN_ALWAYS } }; #define debug_error(msg) do { \ @@ -280,7 +280,7 @@ static void acquire_privilege(const char *name, Error **errp) Error *local_err = NULL; if (OpenProcessToken(GetCurrentProcess(), - TOKEN_ADJUST_PRIVILEGES|TOKEN_QUERY, &token)) + TOKEN_ADJUST_PRIVILEGES | TOKEN_QUERY, &token)) { if (!LookupPrivilegeValue(NULL, name, &priv.Privileges[0].Luid)) { error_setg(&local_err, QERR_QGA_COMMAND_FAILED, @@ -1116,7 +1116,7 @@ static GuestFilesystemInfo *build_guest_fsinfo(char *guid, Error **errp) len = strlen(mnt_point); mnt_point[len] = '\\'; - mnt_point[len+1] = 0; + mnt_point[len + 1] = 0; if (!GetVolumeInformationByHandleW(hLocalDiskHandle, vol_info, sizeof(vol_info), NULL, NULL, NULL, diff --git a/qga/commands.c b/qga/commands.c index e866fc7081..a6491d2cf8 100644 --- a/qga/commands.c +++ b/qga/commands.c @@ -22,9 +22,9 @@ #include "commands-common.h" /* Maximum captured guest-exec out_data/err_data - 16MB */ -#define GUEST_EXEC_MAX_OUTPUT (16*1024*1024) +#define GUEST_EXEC_MAX_OUTPUT (16 * 1024 * 1024) /* Allocation and I/O buffer for reading guest-exec out_data/err_data - 4KB */ -#define GUEST_EXEC_IO_SIZE (4*1024) +#define GUEST_EXEC_IO_SIZE (4 * 1024) /* * Maximum file size to read - 48MB * diff --git a/qga/main.c b/qga/main.c index e7f8f3b161..560490467b 100644 --- a/qga/main.c +++ b/qga/main.c @@ -586,7 +586,7 @@ end: static gboolean channel_event_cb(GIOCondition condition, gpointer data) { GAState *s = data; - gchar buf[QGA_READ_COUNT_DEFAULT+1]; + gchar buf[QGA_READ_COUNT_DEFAULT + 1]; gsize count; GIOStatus status = ga_channel_read(s->channel, buf, QGA_READ_COUNT_DEFAULT, &count); switch (status) { @@ -610,7 +610,7 @@ static gboolean channel_event_cb(GIOCondition condition, gpointer data) * host-side chardev. sleep a bit to mitigate this */ if (s->virtio) { - usleep(100*1000); + usleep(100 * 1000); } return true; default: From patchwork Wed Mar 17 03:22:14 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Michael Roth X-Patchwork-Id: 12144637 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-18.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,MSGID_FROM_MTA_HEADER,SPF_HELO_NONE, SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 2D537C433E6 for ; Wed, 17 Mar 2021 03:24:26 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id A617461481 for ; Wed, 17 Mar 2021 03:24:25 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org A617461481 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=amd.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:40522 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lMMnI-0007SN-OK for qemu-devel@archiver.kernel.org; Tue, 16 Mar 2021 23:24:24 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:37004) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lMMll-0005Kl-Eg for qemu-devel@nongnu.org; Tue, 16 Mar 2021 23:22:49 -0400 Received: from mail-eopbgr750053.outbound.protection.outlook.com ([40.107.75.53]:4470 helo=NAM02-BL2-obe.outbound.protection.outlook.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lMMlj-00011A-RY for qemu-devel@nongnu.org; Tue, 16 Mar 2021 23:22:49 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Q6ranWZzrsPe/y4oUQ4JWuSho1Kw//LmdDyP7UUlT5VKpEbRttsnXlRYFZg4WqrHPjX2oXQYV/Jwo7G+nCdR3p6QcTMe4jz4eZYO3mMSizEwO9F/t6TjC/xvBwA7DUOCO6UwBPBbG5XDO6b7iC/9n3Q19D52o4XecmjK6i/IVq79AJgmylBnbgp1oI2zUnJakaZFLTfqCtwpqY6qE4nGnFrfbyviv2BsM5nV3gM1NyhFLG8RCIv/4n8Is6zTAomLR5s7pCBPLeHyzwzXSrhNSQg/UiXdxyk1F+PQ7yHv3PGxAHrQ/iM6AUO3Mi6RmGyHg+QUziPzlWDWe091aU2abQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=/M5Df7a5YZoJfi5hhMwqO7Bg3WhQ2CfAgyynAi9HJDw=; b=lQ/56e8jJxc0TAtSx4HCXdy1bkjTCtxSGSJKFUbDAcJ8Ox+jmUiJ/odsQn5j0OnMa+6kpMVx2kCmplHP8kP2Ct/JG7f4h2JlZfzBScIW3RwSBTIfDSZsE9/MeCExWd5qfMjbAaM36ZCMSBDcEfBIyws4DPBln66o49zaiZAtKfVRxQ9yN8KgLr01biblDsb6ALiR0Xb8Nskk9G0TyL6vV8ln82/UQBX7W3ijMR0TH0RtPgWDHWuYaxHV2jaI47/zuvCvAwsb5VOOygedPuR0bD9XD8Z933OOoQFGXYj3k5ioh4lwOzk1rWi64o+pxFINGgdkmbv9G08EM2eVW+w43g== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=amd.com; dmarc=pass action=none header.from=amd.com; dkim=pass header.d=amd.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amd.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=/M5Df7a5YZoJfi5hhMwqO7Bg3WhQ2CfAgyynAi9HJDw=; b=bZlecJgGgyCuVNlaDmNPaAWRr3RxWJw9JMIaQkrO7VOs/xZFjZ6TR151+Vs6B6KC5UkZJH/zIyII56Dts3l59Hv2HF1/e5P2H3XkQS+PzxxLqnrIKgGiImnErueLNtgC/MO/q5DxWED4AFPmAZYAYXtJwhukvAxycR2+yqG0v9w= Authentication-Results: nongnu.org; dkim=none (message not signed) header.d=none;nongnu.org; dmarc=none action=none header.from=amd.com; Received: from CH2PR12MB4133.namprd12.prod.outlook.com (2603:10b6:610:7a::13) by CH2PR12MB4954.namprd12.prod.outlook.com (2603:10b6:610:63::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3955.18; Wed, 17 Mar 2021 03:22:43 +0000 Received: from CH2PR12MB4133.namprd12.prod.outlook.com ([fe80::81f6:605c:f345:b99f]) by CH2PR12MB4133.namprd12.prod.outlook.com ([fe80::81f6:605c:f345:b99f%3]) with mapi id 15.20.3955.018; Wed, 17 Mar 2021 03:22:43 +0000 From: Michael Roth To: qemu-devel@nongnu.org Subject: [PULL for-6.0 3/6] qga: Delete redundant spaces Date: Tue, 16 Mar 2021 22:22:14 -0500 Message-Id: <20210317032217.1460684-4-michael.roth@amd.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210317032217.1460684-1-michael.roth@amd.com> References: <20210317032217.1460684-1-michael.roth@amd.com> X-Originating-IP: [165.204.84.11] X-ClientProxiedBy: BN0PR03CA0015.namprd03.prod.outlook.com (2603:10b6:408:e6::20) To CH2PR12MB4133.namprd12.prod.outlook.com (2603:10b6:610:7a::13) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from localhost (165.204.84.11) by BN0PR03CA0015.namprd03.prod.outlook.com (2603:10b6:408:e6::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3955.18 via Frontend Transport; Wed, 17 Mar 2021 03:22:42 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: a8c5f4cd-0efd-4251-e29a-08d8e8f3ed56 X-MS-TrafficTypeDiagnostic: CH2PR12MB4954: X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:296; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: oXgLuDSFUYuPuU7w6Pnrrm+augvUVGtY41Yvuo6LQIEvVLmZVFpZKhR4T3sEAG/+SjS2vwGUASsSqHFC0z3FxGwgr2/VlIBqlfkt0IK9NXw9c4KVUyADT9VXIoQhMjISwCEkgBUH8TQ9xJU6/E0wEnA160TeZiWxa/hGPI6fRzb90gpMm8XQdJxJYs0t8+XtGVDF0XZnSvwtW0M8qGXfFex4ZxCqNKlUyKTRepCKFAC7DQH2kLp0kFLhcY4GJTMB7kDm+I81+kBhbwns/JugSuuE82a7fsU3ulCbBvdB6TucURTag25nn3zVBGpp1eviEERdf/iwPrpTkkykY+7zAFWRIXGronkArDmkkykg+wggUCGZwrPQ1u7PYzJodI973rCIqyaURtWTyFhm3YQe+F0vp6CPPqCmkeadslEXQHNSIcKrIEz/BPOit4QFO6yijhsvU0K8JbmUKXf8Or15BS42oJlsDy1BqoWkRLY8gny2jnajxVJEGsdU7IgCn6gxIwLefw4R5d2+UF1Gi7AyZBNIWUSU7kMfLyPalWgFOwHW+gcQeqw0J1dFvJ7dCWd+ X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:CH2PR12MB4133.namprd12.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(396003)(376002)(136003)(39860400002)(346002)(366004)(186003)(8676002)(8936002)(4326008)(478600001)(316002)(26005)(66946007)(54906003)(83380400001)(1076003)(2616005)(66476007)(956004)(66556008)(86362001)(6916009)(36756003)(44832011)(6666004)(6486002)(52116002)(16526019)(6496006)(5660300002)(2906002); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData: =?utf-8?q?CYiJwZRWJnCE2I76yMAiun/WyFzzYL?= =?utf-8?q?2WEum7QYZebHFX7wH2/NkZkoLR2eyHHeuwTdFkVi9uefJZYZP/cq+CVE6JGPqF2yf?= =?utf-8?q?w3dgJkkQsgLUkCIu15iKVKHmJBwzPGrWa4kI2fCkuTZH7d3Lp6rQAOmRWfHZDR68Y?= =?utf-8?q?2T5/7SLKlwazSxjpk8ZXCsdAHdTMFz1pbMITljJHBMBOVzbnL/JFDqq1cmHTmtWJt?= =?utf-8?q?xNEyB7czGdwZQRMPy+HP1bgZB3ZQ2J8mSs1cijxfimmTwpsKAdkHSY/Rp+FtwSZQ2?= =?utf-8?q?8wUYwIxp7ZUL2cILaet7i3MKMfccRQHBO58H4Mzd/tCsGmhgImt+I3gZISpsWmL6g?= =?utf-8?q?7jpz0Nubw1ABZrLvOZq8vuExGf3qqepEuEPSwfdeYekpVTPHGQzg3OI8rHeso1A79?= =?utf-8?q?sreIhRT+8FKRNFoO3AXPpkplsjgDw6o6xA27H5AIxbPUtrEGXZlILGN4AGFMhSpEx?= =?utf-8?q?g13FJVbugnFrD+pQ+A6bKW8+AHla7voKOIFo8nkV0R61x8wZezaKojsmaTcDh69Mo?= =?utf-8?q?bBao4NWupK/uXH8V5RKWO2OjO11X3jBuD1ZxZWW0ZxYY91minxYYI3NiWKhOgEqrT?= =?utf-8?q?KqnnIG/2Nd3jrNB1uDeST2EI+nWLTw7pm3B0tQrJqmISmAITJcx6LG6ic6eKUv9Dn?= =?utf-8?q?M6Rkg51UvYdZrLKoLCzU66jErCwMYYPcNSZqoIMecxv5V13+wqu/f6hI3e9kUvwyg?= =?utf-8?q?ZQujC/Dxo7bQcZ4iRXp6ZLqGJX4//98u18sNJLuSylpAabL2CRI6eXbva/UgKJarP?= =?utf-8?q?v3VOqydL+vwHx7Q0vcSAPxOUIsJvhjjJWaJ7yIsJLGPLCBuRD9gCP4q3zNQANktjj?= =?utf-8?q?+FUyu1NlFIveY10U9+TjWBdi0BDNQcAE0HBAe87hR/zYugWvp0fEj0wBB3HFfXoks?= =?utf-8?q?gg/qSOmrWQPk6S1cUT2bWrhzgF2lr+4SiDKVrvCJSmtFiKeJIzCZh+cqAiEezHqNK?= =?utf-8?q?JoABNh0xUHa6EsXUdyCQ9EU096vtEtF9/qNbiPwqTOKDTLl7SPuk9Fo+r3dUHeaU0?= =?utf-8?q?9cP+5AVKDbvewUXCTeDgW1tGtuZ2b4A/BSMpj65v3o2/LcmY+K7lsAWn4Rr/iFd35?= =?utf-8?q?nMpXiOh0Wee15cBmTU3F1H7NLtds6EdqoXSnfqRMoG+Y8Dojp8unSEfqXj6EIbGXf?= =?utf-8?q?HbUt+VhH0r136hfGXaLjXgHNBpJr9yxuH5j8r438mmnL1vmvPHVDaUZCbjAayqClY?= =?utf-8?q?1E4AOgKubtFtAAoBOnS2UDJGK12j4efOabGxcRFcI4HgIKNKEOA3pOniyd/yFFPhZ?= =?utf-8?q?2zgCtLJbTt0/Yg?= X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-Network-Message-Id: a8c5f4cd-0efd-4251-e29a-08d8e8f3ed56 X-MS-Exchange-CrossTenant-AuthSource: CH2PR12MB4133.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 17 Mar 2021 03:22:43.0800 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: zEO2k0hDVBXVt3VA/4S2hFGeutLbDdrz5PVXB41xk1+Qf7hgi/4bpYPa6jk8IybUn/BQU+llBTW3ocUzJ2aBtA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: CH2PR12MB4954 Received-SPF: softfail client-ip=40.107.75.53; envelope-from=Michael.Roth@amd.com; helo=NAM02-BL2-obe.outbound.protection.outlook.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, MSGID_FROM_MTA_HEADER=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: AlexChen , peter.maydell@linaro.org, =?utf-8?q?Mar?= =?utf-8?q?c-Andr=C3=A9_Lureau?= , Euler Robot Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" From: AlexChen Reported-by: Euler Robot Signed-off-by: AlexChen Reviewed-by: Marc-André Lureau Signed-off-by: Michael Roth --- qga/commands-win32.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/qga/commands-win32.c b/qga/commands-win32.c index 4f4c579a3b..27baf17d6c 100644 --- a/qga/commands-win32.c +++ b/qga/commands-win32.c @@ -1323,7 +1323,7 @@ qmp_guest_fstrim(bool has_minimum, int64_t minimum, Error **errp) DWORD char_count = 0; char *path, *out; GError *gerr = NULL; - gchar * argv[4]; + gchar *argv[4]; GetVolumePathNamesForVolumeNameW(guid, NULL, 0, &char_count); @@ -2174,7 +2174,7 @@ static ga_win_10_0_server_t const WIN_10_0_SERVER_VERSION_MATRIX[3] = { static void ga_get_win_version(RTL_OSVERSIONINFOEXW *info, Error **errp) { - typedef NTSTATUS(WINAPI * rtl_get_version_t)( + typedef NTSTATUS(WINAPI *rtl_get_version_t)( RTL_OSVERSIONINFOEXW *os_version_info_ex); info->dwOSVersionInfoSize = sizeof(RTL_OSVERSIONINFOEXW); From patchwork Wed Mar 17 03:22:15 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Michael Roth X-Patchwork-Id: 12144641 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-18.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,MSGID_FROM_MTA_HEADER,SPF_HELO_NONE, SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 186CEC433E0 for ; Wed, 17 Mar 2021 03:26:29 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id A7FE064F8B for ; Wed, 17 Mar 2021 03:26:28 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org A7FE064F8B Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=amd.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:45198 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lMMpH-00012N-Ra for qemu-devel@archiver.kernel.org; Tue, 16 Mar 2021 23:26:27 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:37030) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lMMln-0005O3-Aq for qemu-devel@nongnu.org; Tue, 16 Mar 2021 23:22:51 -0400 Received: from mail-eopbgr750053.outbound.protection.outlook.com ([40.107.75.53]:4470 helo=NAM02-BL2-obe.outbound.protection.outlook.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lMMll-00011A-LE for qemu-devel@nongnu.org; Tue, 16 Mar 2021 23:22:51 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Y4WREGwPwNnScweP7rBfNl6yPWTM2cvRRgP1nb4cU9rCi1rE4zJ2k5ihv1SPa1cMTpGey5mSQWAG2bfE9CXPtYqLX9L0WvbJXRPMDQSRTgerGiI2mBptY1G4ZUn2e3wdoI4SPJImAFmxNyOZMEc8+1cAJN64PefvR/erciNfH6jzg2u1eym/L2hdt9jqN5LpQF1K4iFAURShX/i4ZCpe94wH318oMQPtiIYc44vb5vHGdlwMQp2iXjkfWuxcXSePNQ8y4wtDIlAeMdO78/WVrsQkoD/2GJSYqXjiMi073pz7UBS6aW0I2c8wlZSMyFyixwgg1QnGiIqfZvCPHnGmTg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=6ni11o5P+K1UJycK+Snv4s8qZGFxZ6Z5ZyeEmtuvSy4=; b=k70iHwbhjYL7g95GKL6lCjHYjJ7CNP2/5kah+rn/pNyMU6DBYJ4bgQkjpDDkoLAOSojVyO15pVWiIGtv8h6AJ4xSaIk+H3EAsGrC4ZZVcWSFOG0QBxkdEKZBmptYwyQLAFIT5YC6h5/3hkTHBN/dTBBA5e6/9ttjPdj0vJYzpTwIPpax5SBA0yUBqPSKeZ+NLoXMjYx4NcqC9GsclKRBjeJg1J5C2wkoax1NsIyoY35s9AWVwtoRQjmy1cseww/caYYAaSEmELlfp9JfswxT/t223sCq3bsvzptrg0s2gaA52UvCmduEHJdsWcaB8CK2iI9aOd72+3HFhwa81ev78A== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=amd.com; dmarc=pass action=none header.from=amd.com; dkim=pass header.d=amd.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amd.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=6ni11o5P+K1UJycK+Snv4s8qZGFxZ6Z5ZyeEmtuvSy4=; b=B/EM02UEepyDRAJ9jThVlGgXuf0w2YpfHWhjRXj3sWLkiYAymdc+sVR2SnaeaofmxxKjioTySS5rAn5hscZLg2eMRwOAnSgijJ55+U9xOuu1godUj8F+OanDMhD3SHXTg89nMAP8yjpA4x+UF11pUCpet7YGLh0zVqL3nIIUQXE= Authentication-Results: nongnu.org; dkim=none (message not signed) header.d=none;nongnu.org; dmarc=none action=none header.from=amd.com; Received: from CH2PR12MB4133.namprd12.prod.outlook.com (2603:10b6:610:7a::13) by CH2PR12MB4954.namprd12.prod.outlook.com (2603:10b6:610:63::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3955.18; Wed, 17 Mar 2021 03:22:46 +0000 Received: from CH2PR12MB4133.namprd12.prod.outlook.com ([fe80::81f6:605c:f345:b99f]) by CH2PR12MB4133.namprd12.prod.outlook.com ([fe80::81f6:605c:f345:b99f%3]) with mapi id 15.20.3955.018; Wed, 17 Mar 2021 03:22:46 +0000 From: Michael Roth To: qemu-devel@nongnu.org Subject: [PULL for-6.0 4/6] qga: Open brace '{' following struct go on the same Date: Tue, 16 Mar 2021 22:22:15 -0500 Message-Id: <20210317032217.1460684-5-michael.roth@amd.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210317032217.1460684-1-michael.roth@amd.com> References: <20210317032217.1460684-1-michael.roth@amd.com> X-Originating-IP: [165.204.84.11] X-ClientProxiedBy: BN0PR03CA0020.namprd03.prod.outlook.com (2603:10b6:408:e6::25) To CH2PR12MB4133.namprd12.prod.outlook.com (2603:10b6:610:7a::13) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from localhost (165.204.84.11) by BN0PR03CA0020.namprd03.prod.outlook.com (2603:10b6:408:e6::25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3955.18 via Frontend Transport; Wed, 17 Mar 2021 03:22:46 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: aa6fadd5-a5ca-41f3-e2e7-08d8e8f3ef78 X-MS-TrafficTypeDiagnostic: CH2PR12MB4954: X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:117; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: NxKPIi/MU+7v17suUKxsNboV0ChGLB9UfmTnJvNpMz9mLfGERQ1zEV4k1HaD0gdJLxwbN91Z0yzYxwzfjD0LQEGeZwItUK5TvfskjJsV2eCLmUfpcauje4f9CVkACjZgnBeS/WXVY/+DOCWie5RFzrXyDySCZFspGzeMPvVeehmrNi4l4i5byYdmdYZbHKV51hh2HNJDVe9DMKPdVD6UObmLnHDMDmrsqJS0M3m+5ALqBrhQB1O3QdhVyKmazL4qUHAh4jEHnA80qA0MCd4a8k1wFBYDgjWsY9uRAkQHnb1DRyeSADN+dbC2vtF+p9iFN+nSlh5ZeXU95w+f5nxMuD4Ji1s6TEVsTHNt/I/sCD2ySvf4FySykjhhFqudkXmarrLs67xbEfa/9Aq+R18M96MmMIZ4P+5YTOtsMcKhimd7Mn30YJtBxJ8dtICQwtAKOVrRWIinztk2nlrJSytCqDeVqhmdcGr0QYoeamZ+NqqHhgHL/LEDjOnRBAjuLqf5jlXOaB29WU2193BJ8E1LoEo7zI20Y0RWkE3pouUOwEHzYkGJnEuZWlEwSEqORiM6 X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:CH2PR12MB4133.namprd12.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(396003)(376002)(136003)(39860400002)(346002)(366004)(186003)(8676002)(8936002)(4326008)(478600001)(316002)(26005)(66946007)(54906003)(83380400001)(1076003)(2616005)(66476007)(956004)(66556008)(86362001)(6916009)(36756003)(44832011)(6666004)(6486002)(52116002)(16526019)(6496006)(5660300002)(2906002)(4744005); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData: =?utf-8?q?nkBEKqSDIp7eWUKGBUnaJ+dcS7vro0?= =?utf-8?q?OXKdeHM2RvdzigEzEv46zZnDhg0+F40dmFMzTVAeKgGIcbpPFVziqjFOR8JId9Dfu?= =?utf-8?q?kBc7Cp2bFmAQ35CLzH0N/sOoRRD2znBMCmxjfMu0b2JXESCL8sEmvW0SzATZVQqTT?= =?utf-8?q?WU+TY+mGytPlNAN057t2n7FQiNAqwz68fULobI79lKoYWsjJhobJkH1IdwxZeFL6C?= =?utf-8?q?0US4m/ZHI+O6Y62uh/jQb2mYXRbTBn/rQx3MDGer7odA+QaUDaKwsStBPzhWHHy4A?= =?utf-8?q?WTipqsqP87VQwNSt1Ij1jt5Uw6ax6n9kBJsfutPaxGTKZ+wJM0/hrRMa7q2R0W/pB?= =?utf-8?q?O/9hc6b4DleOA7aBCdUMMipxPWxc2mit6WdTXwLwbIspf8RpT0eVpgkFN99jgeWMG?= =?utf-8?q?4rW3beqogmxUWpohSFiJzEQGD+EsGyyqk5h9fWpTeFg3d76daALGPzo6uCwbvnUEV?= =?utf-8?q?15N7A4YXp9ZJxpWhp3ytpeOGBCY6Zw6RGbG1zRy2Amc1mq6qJ4as9OyBcP30SDsL0?= =?utf-8?q?mbrNwLSc/apmWh/WiC+4eJQctSvvo5vh0FO/7IK2UoRTfkEFMdEEvbZy5aIHRQiaR?= =?utf-8?q?/iyYseGW+Nae/TtTZtPzmA/V+vaMKljDIzrZccVvCiJFsKASIH0lajOgRnOtltrJ9?= =?utf-8?q?VeAnOQQ3iZrbODnVHnxkrCO8kTMrR9QGc2ewH9p7gwg8mLMVkL/Qg9M+brYxGGini?= =?utf-8?q?WoUf13AZsKWFrPe3JY1BQl/QkcRLqt1H3mZQ8sjCPU+hKS28xPKPVZCtvQUXhM4vn?= =?utf-8?q?zxt2Gb6VPh8a/AUvZr5IcB31AkfooSC40fFcH1t77bsC9nBAEdCeDg8o8nJdsFgDE?= =?utf-8?q?TVJS+ih3Myx0GZRbrLLleTOfKTd+QWnp+dJeTCQq+i9BeMxbZZJJMf3kk0UtsBxwv?= =?utf-8?q?EVvqHaWlIyFsmY8/YyIas6AiZ4dP1w0uDAK2VWXlIKp2h9g6hq4+zeY9K8QyG0fkQ?= =?utf-8?q?BNlKEeIAkKIyz4bB5LNm3iST1IZNAesAOgF/zE+Ta5hoP6sqCTgeGCoswITD+NZ/K?= =?utf-8?q?mJdjSz4bXx9E6nBzv+R9xB6wU5iodRIj0AQQU1QawGRayKTm2+a8bPDRNMdiVaq+d?= =?utf-8?q?HH19YwQDN4mwXhI7gxHmS2nIc3WXvYF3GfQclceP+owuuidBZsqUkTv2R9HtxKSVw?= =?utf-8?q?x99iS1NO6hFOYKblvh2WQA+HtPeYnFIpw+n2/8lI8bhcNfARLTZHZFgIpCDMcbCJP?= =?utf-8?q?Hupcuy8v0cYTJA6FfDLq7am5wzJ4SHAxDTd6OWWccBOwyelpVaJRwX4v99SE+c4g3?= =?utf-8?q?UOm3SXKz9i1Nv3?= X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-Network-Message-Id: aa6fadd5-a5ca-41f3-e2e7-08d8e8f3ef78 X-MS-Exchange-CrossTenant-AuthSource: CH2PR12MB4133.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 17 Mar 2021 03:22:46.6971 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: 3E/ubV4gn2F/cYNuZDJAQrNHovJuXsRymKRY40NAo64BXMiJHA8gaB4UWW6T5dusxLcc752TzZY78IsB2++s+g== X-MS-Exchange-Transport-CrossTenantHeadersStamped: CH2PR12MB4954 Received-SPF: softfail client-ip=40.107.75.53; envelope-from=Michael.Roth@amd.com; helo=NAM02-BL2-obe.outbound.protection.outlook.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, MSGID_FROM_MTA_HEADER=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: AlexChen , peter.maydell@linaro.org, =?utf-8?q?Mar?= =?utf-8?q?c-Andr=C3=A9_Lureau?= , Euler Robot Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" From: AlexChen Reported-by: Euler Robot Signed-off-by: AlexChen Reviewed-by: Marc-André Lureau Signed-off-by: Michael Roth --- qga/main.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/qga/main.c b/qga/main.c index 560490467b..20db0058db 100644 --- a/qga/main.c +++ b/qga/main.c @@ -686,8 +686,7 @@ DWORD WINAPI service_ctrl_handler(DWORD ctrl, DWORD type, LPVOID data, DWORD ret = NO_ERROR; GAService *service = &ga_state->service; - switch (ctrl) - { + switch (ctrl) { case SERVICE_CONTROL_STOP: case SERVICE_CONTROL_SHUTDOWN: quit_handler(SIGTERM); From patchwork Wed Mar 17 03:22:16 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Michael Roth X-Patchwork-Id: 12144643 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-18.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,MSGID_FROM_MTA_HEADER,SPF_HELO_NONE, SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 7451CC433E0 for ; Wed, 17 Mar 2021 03:27:49 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id EBCFB64F8B for ; Wed, 17 Mar 2021 03:27:48 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org EBCFB64F8B Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=amd.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:47748 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lMMqa-000280-2U for qemu-devel@archiver.kernel.org; Tue, 16 Mar 2021 23:27:48 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:37060) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lMMlp-0005Sf-DO for qemu-devel@nongnu.org; Tue, 16 Mar 2021 23:22:53 -0400 Received: from mail-eopbgr750053.outbound.protection.outlook.com ([40.107.75.53]:4470 helo=NAM02-BL2-obe.outbound.protection.outlook.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lMMln-00011A-GK for qemu-devel@nongnu.org; Tue, 16 Mar 2021 23:22:53 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=RvOykYVJMraVmM1xVrdnmzXoeeJLOZtkyAj/b/QkE3R11g+j8k3CnRKnG2vMvrYbjWJTPWFCC0ZZC/MycYmOEA+85uthCVF9q7ks+4wyTq33BT7y7a6XVjLhhGCfsvMfvgOyRzDj55X36W8U6R0cNY7BZ7fSBxJOC3wuToSYGualiFL/uX3Gx2VS9p5TQtMO1KoO0gNwsXLcbSLDDwKYTD33WNK7tP/iDcqNR9D6syNk9SVpvTeL360Y21gSexqHPzXho8w108e1uj7h95IuSHyXpkrL3rTbSBjHHN7AZivtRcbBhlkw7jtyusOikoKUwVIzeNdS5GHJj7XqlcYPYA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=2j7K2uII9kt9fbDXY5phqFNWi31+gNgB6t4dXN0Oabo=; b=WF1jzio/psTxwj05B3PxhTjTe8E4AayObsX3XxGqlWcqoR5KKRXFLhDOCOu2FcRYNPxGuB0iotp2Zb1NtBQT58crePh/tU6MjWxBCmDUUhm4aBhmOKkQF204Iu+AMMZ3SHuYdaD7U4ovwWzCW0tFRsrvDtJt3oXlisXVRVhcAlBEynbvMN6N3Iou5tB/Rwh7Ye7/6lnjteVdmu4+T/hw0QZ45jhSCMB+N45RyVK0CzyQuWxJa8wkVoRvOk85TGxXsgmuKsn1V2JsDfz66wX6FjjaWpy8c268x7jKV/9dywqM+4UBMRuUQ37DlS2V4YUY07UTrka+lyxmgWc84k8UhQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=amd.com; dmarc=pass action=none header.from=amd.com; dkim=pass header.d=amd.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amd.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=2j7K2uII9kt9fbDXY5phqFNWi31+gNgB6t4dXN0Oabo=; b=knoYHs33GI5EkVjh6pzKxNPGTlNr/bQaT73hiJvPn1yiOCeC9RFAQe6GB7/aoAxDhOJhB7iYhHEiwnw3kM+wffN3kcrOdJOiealfnzEf+oNwBcAaUCDM+jLSkbYDdKxP9DDBqX1+f/EolgkdELrqwSdAQbuFPv2kcUUUzqZguNo= Authentication-Results: nongnu.org; dkim=none (message not signed) header.d=none;nongnu.org; dmarc=none action=none header.from=amd.com; Received: from CH2PR12MB4133.namprd12.prod.outlook.com (2603:10b6:610:7a::13) by CH2PR12MB4954.namprd12.prod.outlook.com (2603:10b6:610:63::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3955.18; Wed, 17 Mar 2021 03:22:49 +0000 Received: from CH2PR12MB4133.namprd12.prod.outlook.com ([fe80::81f6:605c:f345:b99f]) by CH2PR12MB4133.namprd12.prod.outlook.com ([fe80::81f6:605c:f345:b99f%3]) with mapi id 15.20.3955.018; Wed, 17 Mar 2021 03:22:49 +0000 From: Michael Roth To: qemu-devel@nongnu.org Subject: [PULL for-6.0 5/6] qga: Switch and case should be at the same indent Date: Tue, 16 Mar 2021 22:22:16 -0500 Message-Id: <20210317032217.1460684-6-michael.roth@amd.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210317032217.1460684-1-michael.roth@amd.com> References: <20210317032217.1460684-1-michael.roth@amd.com> X-Originating-IP: [165.204.84.11] X-ClientProxiedBy: BN0PR03CA0009.namprd03.prod.outlook.com (2603:10b6:408:e6::14) To CH2PR12MB4133.namprd12.prod.outlook.com (2603:10b6:610:7a::13) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from localhost (165.204.84.11) by BN0PR03CA0009.namprd03.prod.outlook.com (2603:10b6:408:e6::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3955.18 via Frontend Transport; Wed, 17 Mar 2021 03:22:49 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: 806d260f-8c01-4c60-9e62-08d8e8f3f12a X-MS-TrafficTypeDiagnostic: CH2PR12MB4954: X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:262; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: cgmNN3Wjcz1DQtBaxQyELBMSCOgTj9IcsKw7msVArhfBDELDF0ivfVDLcA8Q84k8bUY9EAwEo4476AW0TX/W2Kg82rW4e3Xdn2+eXjufOH8tPj7xJ4mofPwR+B3sUF1bgHksJXQcq928Ec+M0/fs3KpVpjG10UWkRe8qvBxqvWFF67HXeJBFrOj85tFH0EspuHEg1JakpwICDBTKidI4EY4wg3s7Pd1ClWDB7yc2rtYWWqIujLzldSjfPcisS01pNN9+X8mw5UvhnXDWk7zEJZggBmpOLNB/dlYiivrxeapaB0g24p3ZN+tQmxfMgiWRlw3ClW9aG/H/N54IIw/Iwuij7WR0jw/KSqsuaDfO7HD0Por266z0liAHg/v1TdhjMjGiaAs4RRdvO7yhJAOutZDrDMl4imZcZUO05KeGyCrguxIEM5wMkhEy04g9tp/Qk+iF/sgdJZPAvEsFUcwdlNbaykggJMZOj82DpnfgZQO3RCEof5iRm1TekNU7WElkKNekpIYWer+aF8zE9YeOnoNXwX9b037XoiKCu6UpyrmubIGyFwLxREgCgmOS0nyV X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:CH2PR12MB4133.namprd12.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(396003)(376002)(136003)(39860400002)(346002)(366004)(186003)(8676002)(8936002)(4326008)(478600001)(316002)(26005)(66946007)(54906003)(83380400001)(1076003)(2616005)(66476007)(956004)(66556008)(86362001)(6916009)(36756003)(44832011)(6666004)(6486002)(52116002)(16526019)(6496006)(5660300002)(2906002); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData: =?utf-8?q?aKj0eEH/Rg5KIuX5LbMmcZqoy0QFfF?= =?utf-8?q?4q6u5OZAf+gkbbE4IDr8xSNLgu0GZgXXSmrOZYfQ59UOCbyIhkQdiy3fBoHNi0hIM?= =?utf-8?q?4GPHjBmkdYm9XVEsa1xHd/Bs2CQdCSwsMm0u99E+YvrAH6tqRnykW/6ne2Y8v2tqt?= =?utf-8?q?sNbZCENdLYJ2DGudqcC8XeR9Ab8If3XSlUDTx/jYlBS9tweOHOhXDVQ0exvcDuA1O?= =?utf-8?q?AwgwXDjY+xjLCxHqyLHTB3AhC54DcrwZ6EMAxCm2IiqtwIaGNUbfELHVxIyr/CkCQ?= =?utf-8?q?eWxK1NuIyAscbe9x+uF25OpNklSGNg8Lybfg9oKq4b23efpclYWRnFRs8JvUm+tPG?= =?utf-8?q?n2HWmfGZgWKnv1Gqw8r/3d3JiZlk4flRpDGc9NMrtCWgX2AKd2AvJiCeTLdL3VvjV?= =?utf-8?q?XnHHJYHjKf9JrbKEo/qPYGdhzqjKqNKzIzzhJSC7mKgothcVkyvMBr397DvCnYVAp?= =?utf-8?q?J6Asi2o+a6GMUw8AJCtHvYbLFWs/w0ol/AZ/h7qEDG0j4MQiTt+WGnkTFfLnsELZh?= =?utf-8?q?RIYxtm6LVYppInqtBF8PKgmGcNhf9eTsjvrGw9OHOinmY5bm5NZw1sR9iQnSR8dTI?= =?utf-8?q?S9k7sU3fYgzOyWOgBDBcpXkkK5b04DY6diIIGUs3KBtPtKM6LJZN2F1qEt+1/3+NF?= =?utf-8?q?u5pAbh9A6RPQ/qj3gv49yBHtKZHn9/WULRFwdGoICb++1LeB+upCdAhIknFAo55h9?= =?utf-8?q?avr3lwGxiEgoCxppd/o0C3794nTm12G72cvxfZALhfzsBu+LqTs6OWI0Lo/GWYrXO?= =?utf-8?q?pMCUTzzPuZ9foGqVUSGGb8MCRquEaJRuzBtIrw7AUJyrmFVlvzkXUBTzw2E7osrZ1?= =?utf-8?q?vgDMk5MxKBKVW44GGVufl9EU2WtECf0WNQpWqdHJZU1Jj8/7AteMQVbomyjcDDC6f?= =?utf-8?q?yoxhtuCLxhP8ZwQeYjyR0a2B224w1HUCbqqXhr7Ed8iWPDcPWgfb0xu7HGsrWk2dN?= =?utf-8?q?zYq4ZLP9n99T/U9eY685Wl61HwHx76zA/M4QN/G6Nt2ddu1KCENguSsDTvgEl0iHB?= =?utf-8?q?DhPX2OghDEp+M60z9UKey0ivI4QwjrlIz1HswjgCnIdD1Z5q8J682v+WKAFogMZ0Z?= =?utf-8?q?ejoTdZHbcguRTptQ2doMEJR76ILPCnbUYKKdX3rVOK2NRiqM0mbDsWIdugZ84FBYq?= =?utf-8?q?NV5qJPvZIunYyNXWhyD0VBnx2D0HTFJyBUrfV0+wtFmoJRbveHYvX2Y6VJ9kUsa8D?= =?utf-8?q?qssTVWMYlf+464QC5BKW+6xFY1WaalOvx/smWsuov45GVB6xfEXwGqMlllmtENQGn?= =?utf-8?q?Ca8jSKdG1Esz9a?= X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-Network-Message-Id: 806d260f-8c01-4c60-9e62-08d8e8f3f12a X-MS-Exchange-CrossTenant-AuthSource: CH2PR12MB4133.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 17 Mar 2021 03:22:49.6054 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: 9+Qi8n1e9ouswJgx+VvtAiJYiADhTCISflmSDaVmSVjPsOZ1fU6QNWirkZFBZk5mEXMMc7cXsUDa4SJVcXCS9Q== X-MS-Exchange-Transport-CrossTenantHeadersStamped: CH2PR12MB4954 Received-SPF: softfail client-ip=40.107.75.53; envelope-from=Michael.Roth@amd.com; helo=NAM02-BL2-obe.outbound.protection.outlook.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, MSGID_FROM_MTA_HEADER=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: AlexChen , peter.maydell@linaro.org, =?utf-8?q?Mar?= =?utf-8?q?c-Andr=C3=A9_Lureau?= , Euler Robot Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" From: AlexChen Reported-by: Euler Robot Signed-off-by: AlexChen Reviewed-by: Marc-André Lureau Signed-off-by: Michael Roth --- qga/main.c | 52 ++++++++++++++++++++++++++-------------------------- 1 file changed, 26 insertions(+), 26 deletions(-) diff --git a/qga/main.c b/qga/main.c index 20db0058db..ebb910773b 100644 --- a/qga/main.c +++ b/qga/main.c @@ -279,20 +279,20 @@ QEMU_HELP_BOTTOM "\n" static const char *ga_log_level_str(GLogLevelFlags level) { switch (level & G_LOG_LEVEL_MASK) { - case G_LOG_LEVEL_ERROR: - return "error"; - case G_LOG_LEVEL_CRITICAL: - return "critical"; - case G_LOG_LEVEL_WARNING: - return "warning"; - case G_LOG_LEVEL_MESSAGE: - return "message"; - case G_LOG_LEVEL_INFO: - return "info"; - case G_LOG_LEVEL_DEBUG: - return "debug"; - default: - return "user"; + case G_LOG_LEVEL_ERROR: + return "error"; + case G_LOG_LEVEL_CRITICAL: + return "critical"; + case G_LOG_LEVEL_WARNING: + return "warning"; + case G_LOG_LEVEL_MESSAGE: + return "message"; + case G_LOG_LEVEL_INFO: + return "info"; + case G_LOG_LEVEL_DEBUG: + return "debug"; + default: + return "user"; } } @@ -687,19 +687,19 @@ DWORD WINAPI service_ctrl_handler(DWORD ctrl, DWORD type, LPVOID data, GAService *service = &ga_state->service; switch (ctrl) { - case SERVICE_CONTROL_STOP: - case SERVICE_CONTROL_SHUTDOWN: - quit_handler(SIGTERM); - SetEvent(ga_state->wakeup_event); - service->status.dwCurrentState = SERVICE_STOP_PENDING; - SetServiceStatus(service->status_handle, &service->status); - break; - case SERVICE_CONTROL_DEVICEEVENT: - handle_serial_device_events(type, data); - break; + case SERVICE_CONTROL_STOP: + case SERVICE_CONTROL_SHUTDOWN: + quit_handler(SIGTERM); + SetEvent(ga_state->wakeup_event); + service->status.dwCurrentState = SERVICE_STOP_PENDING; + SetServiceStatus(service->status_handle, &service->status); + break; + case SERVICE_CONTROL_DEVICEEVENT: + handle_serial_device_events(type, data); + break; - default: - ret = ERROR_CALL_NOT_IMPLEMENTED; + default: + ret = ERROR_CALL_NOT_IMPLEMENTED; } return ret; } From patchwork Wed Mar 17 03:22:17 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Michael Roth X-Patchwork-Id: 12144639 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-18.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,MSGID_FROM_MTA_HEADER,SPF_HELO_NONE, SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id A65F0C433E0 for ; Wed, 17 Mar 2021 03:25:36 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 20F5564F8B for ; Wed, 17 Mar 2021 03:25:36 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 20F5564F8B Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=amd.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:43750 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lMMoR-0000Kl-7U for qemu-devel@archiver.kernel.org; Tue, 16 Mar 2021 23:25:35 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:37080) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lMMls-0005Z3-L4 for qemu-devel@nongnu.org; Tue, 16 Mar 2021 23:22:56 -0400 Received: from mail-eopbgr750047.outbound.protection.outlook.com ([40.107.75.47]:20848 helo=NAM02-BL2-obe.outbound.protection.outlook.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lMMlq-00018F-Gm for qemu-devel@nongnu.org; Tue, 16 Mar 2021 23:22:56 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=bgO/B0W9i6vCnA7RDylNwR9+UiO2vWEBS0zIF+HP2fsXjPuJ0yygpWz6ENf7PP5qfw3cjAvLeAFxtbBla4AHcEOKgbE6nfTVSnpgMtvGqcEQPMQwvs1YUMg0gOvODW0jDT4fIJ2Pr/CYT9t2KAAEWCHuF7FK3AYj0M5yXvmTuZhvadvCa/OACJQsczV+Tu756l1gc+qq5lR6k0ClcDhKr1ix3IDvKoYL/pJq32kqTAfIzynhmBgsGSHvbO7oXAEWoGDcuaIEBqFQABOIW+gV/uVWB6PkRvQWqjVNuacGdQFQgr0Wl0EfnxuDaiOJOskcJhD0uuESJvB7c2Y3i08waw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=spA27DX+d5tWv3ROrnId2PcQlTdRTuV2WvVHXoDWhb4=; b=Sza+H/UVDc49aMZMFh3UbOXJaiwMhw83OysksVFMR+3mWmYQnDh4IBDkCZhlSgt6E4RyVlhZZxUDe9Bl6gwvN5gL537js50mV0RrISVI9Xgs8e7/F2GX4f5PW0drClvOW/D0CEg+gSROOsrHBg0Sh9Dp0xQpHG2lJYWewhPqa2b+sDuZPr+N2LAsJ68/U+Lx2Wu6VuA57mHNFK9/NXBwYHCRg9a+X6IV3y0SIOg7Fn1cFn3GD9pA8So435wzta9RTb8NCS2cy7rqZ/2LaPHZPQ4rc24FDh1MU32cYL36ISBqddtlJlxXF4TqTzIRxFfKb4b5pBhOWK3uuhabicgMNA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=amd.com; dmarc=pass action=none header.from=amd.com; dkim=pass header.d=amd.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amd.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=spA27DX+d5tWv3ROrnId2PcQlTdRTuV2WvVHXoDWhb4=; b=0BfGQWKjuiculbgw2Nv/L0YdOtAdnqX6fhnr93ko9b2r+BmySHuAMPVA40qanWVUMGOXx1mb9TgtbtOKwrqaRQxn4Fro7iEu0CDG0kDa/2QPg2llWCF5UOQQH1d8GetiBttuCmW9v9v+D7yaJzzEWeerqL3Is+iaSmZZHG7gFhE= Authentication-Results: nongnu.org; dkim=none (message not signed) header.d=none;nongnu.org; dmarc=none action=none header.from=amd.com; Received: from CH2PR12MB4133.namprd12.prod.outlook.com (2603:10b6:610:7a::13) by CH2PR12MB4954.namprd12.prod.outlook.com (2603:10b6:610:63::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3955.18; Wed, 17 Mar 2021 03:22:52 +0000 Received: from CH2PR12MB4133.namprd12.prod.outlook.com ([fe80::81f6:605c:f345:b99f]) by CH2PR12MB4133.namprd12.prod.outlook.com ([fe80::81f6:605c:f345:b99f%3]) with mapi id 15.20.3955.018; Wed, 17 Mar 2021 03:22:52 +0000 From: Michael Roth To: qemu-devel@nongnu.org Subject: [PULL for-6.0 6/6] qga: return a more explicit error on why a command is disabled Date: Tue, 16 Mar 2021 22:22:17 -0500 Message-Id: <20210317032217.1460684-7-michael.roth@amd.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210317032217.1460684-1-michael.roth@amd.com> References: <20210317032217.1460684-1-michael.roth@amd.com> X-Originating-IP: [165.204.84.11] X-ClientProxiedBy: BN8PR12CA0034.namprd12.prod.outlook.com (2603:10b6:408:60::47) To CH2PR12MB4133.namprd12.prod.outlook.com (2603:10b6:610:7a::13) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from localhost (165.204.84.11) by BN8PR12CA0034.namprd12.prod.outlook.com (2603:10b6:408:60::47) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3955.18 via Frontend Transport; Wed, 17 Mar 2021 03:22:52 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: fa90391e-2157-4f11-1784-08d8e8f3f30f X-MS-TrafficTypeDiagnostic: CH2PR12MB4954: X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:639; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: YL8glQLUy4HrYsUJhkqix67BTciUjeOnjHeOJOgZrtmBK0uEyWAjJ4s1Q8M/PB+P/V2GwzIdzLTVJy4zkz5cxP3bO67szyf47Jds326XJ63VgXlpUEoZBIwYWrGFZICZtO6V1bpi3jC0hHxxVGLJAJNo++YvwqYdTp4IWpORpc4vL7lCczWBbh63oGCF7BQ5A8iLO/EFhb9GnVDCM7eKEAQ6MklWDGjJJscKvUfU67mJSGvgnxnUlBDvKfhgaoVmBIpSxnWO52v8EvKOJV+8ZhK8CgV585OXKabLF9LFPfezjdsKUSs4mNqOP5mUceZ85XoSkT+RVasJ4zUryvSVPiF1MYGr6scP6wrufSVLnWQ/iFe0Ln+YdDip/vFymkNTJvGBGSFeeMe6IkbSxdPqUdcqTcTl9zNZBeXzodO3cnAyAgM7iW0JCb+YMTN3rG1a/26rjKM2HOinXI3DzHxct9bfq3tSRmiIbF+dgeHNLacPu6ItVH+0t/WHfZRaGoTyxW+Qa6sP1DInFjspN55ZG/EDRGVzSpvNl1nAIzE0eQ27ruHYrSkkcKrpzBCqEjmtTP0pJZHwGY9G64EwGPTUlKD2TtWKTRPCF0MGoOdj1ZhqDPVMfemZFD1mi+oHTwlGNO1MoglIx/Zk1P7GXzRqIw== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:CH2PR12MB4133.namprd12.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(396003)(376002)(136003)(39860400002)(346002)(366004)(186003)(8676002)(8936002)(4326008)(478600001)(316002)(26005)(966005)(66946007)(83380400001)(1076003)(2616005)(66476007)(956004)(66556008)(86362001)(6916009)(36756003)(44832011)(6666004)(6486002)(52116002)(16526019)(6496006)(5660300002)(2906002); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData: =?utf-8?q?Ei41Pxi9Po9YvuPgBma6Wa7MpMWTnh?= =?utf-8?q?l7qVfq9Tlq8YPB2dEoPPTQSGrHW+Ceqi06r1MAa7hzycGTMIudCwx+U2NySlOt75g?= =?utf-8?q?weT6FjDyViTeryUQQwFZdLV+l/mxbAGNTl5e1YiqBRuGTReiV70WkSObNvECBUd6c?= =?utf-8?q?XF/2WDeli1OtBViLWYEhePV7yTBnbvyRCFyk+HPLLSY3Cts8tpByAQ9VhhO6xly1+?= =?utf-8?q?4Nzt6cu9KYq9kuF2HG0i6HF8TvJXrMDcJtF9FTzv9onsKsWXkDaKy/VSMqReHhJhF?= =?utf-8?q?S1G4DmC/gbX/SY0N/JzIosMrDlGAI88Hda32vHwG1CYlBeTeEsHnJK5QpZfZ0nc2b?= =?utf-8?q?rr9H1ahTIoB5c+TRP57GgrlAkZYqgHgfKiTQES1p9r8eQ/nJrDiRARhhx1OOt9pxX?= =?utf-8?q?rupTOgA+Py0tbjNL9muDnqTXg5eg8e1biYpFzZxJbYhld/vLzYy8CamAlTg2z1bQE?= =?utf-8?q?7pbIs5f50mIvC1HTNfHnd/Y4EyVKBcTl1tDMwTHvrmJaPXtB0mFpo3eE/YstxgMKB?= =?utf-8?q?dxUYdCS7Gg7FK0VerNr3ukgEcXZwA445rd520cJ3pa8Fr25ZjNrNwpM1G3KQkby6Q?= =?utf-8?q?uKIzTJg2+anidnEMuBQejhZA/Ivsz7H5FRv/b072cuPjdQaLJXSTk0CQCiSAiuu2W?= =?utf-8?q?D5ZIkmSd5Z0Nx8zSP2jVpSYRqE+jiA+Ke5dvf851su6Qj0eFW6LlXVw7LIx2vlSvO?= =?utf-8?q?qViSYiivoEMUJqrn5+vl1yi6m/ryxQJsVoC68cSqUeJAW39ZVKuBkVMxOY/DqoI5+?= =?utf-8?q?AJrEkOLXfytpJEaC/rNHPY2yBXaAL9QqRPlIXh4+oQdZzKDoGVCAvzIWb1Wje8m01?= =?utf-8?q?WKDkGARvp0Xj8oJXxmLMPSf2lkJr4laT6XySO5Uwd8qXbNwYIdpmrky00ng+8yC10?= =?utf-8?q?Dtt/OvYyLUvKmDFeFWelj68sp44kfpU1E/7rGG0fr1PjUCSkTIYNq6f15hWSgMLNI?= =?utf-8?q?fM2N+0Qz6cof+81AONs3zdrSN4iA2KsBTJTpFUqd8agrCZOQLZ5Ri1x2Rp+Nf4sik?= =?utf-8?q?TmR3r9xSXvklu/m8dAq+z/MAE35WoHyxMosfdVZRQl7XRpaw5/xyurzXoeo/2/8/J?= =?utf-8?q?Enb2giybiCczLnj1zv/CQxmTk+6mYPyGnqySo++btADLwbLa1rlBELE3fFghr6IVF?= =?utf-8?q?UtFFZw3KQ/B2obL/zWjs0fHSIskHjlcslemQ5i1R4ZZbevTJpR5wimOe2XEWUg9wK?= =?utf-8?q?Bzl7tp4YGZGVVIx0HOegGzv38hLhQETSrO3ygcXoYbmOAax+2xdmQx9L/l6mr7wRS?= =?utf-8?q?FJ/HsENgSpBVFW?= X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-Network-Message-Id: fa90391e-2157-4f11-1784-08d8e8f3f30f X-MS-Exchange-CrossTenant-AuthSource: CH2PR12MB4133.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 17 Mar 2021 03:22:52.7316 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: r5PmDxEnhMcF5oKGHUG7dnmGfkelk32YHSRrvCLZBk/C4aYhBzZ4k694mIJ0ta56yPbkDVlNv5KSdUG/Jz5oDw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: CH2PR12MB4954 Received-SPF: softfail client-ip=40.107.75.47; envelope-from=Michael.Roth@amd.com; helo=NAM02-BL2-obe.outbound.protection.outlook.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, MSGID_FROM_MTA_HEADER=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: peter.maydell@linaro.org, =?utf-8?q?Marc-Andr=C3=A9_Lureau?= Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" From: Marc-André Lureau qmp_disable_command() now takes an optional error string to return a more explicit error message. Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=1928806 Signed-off-by: Marc-André Lureau *fix up 80+ char line Signed-off-by: Michael Roth --- include/qapi/qmp/dispatch.h | 4 +++- qapi/qmp-dispatch.c | 6 ++++-- qapi/qmp-registry.c | 10 ++++++---- qga/main.c | 4 ++-- 4 files changed, 15 insertions(+), 9 deletions(-) diff --git a/include/qapi/qmp/dispatch.h b/include/qapi/qmp/dispatch.h index 1486cac3ef..135dfdef71 100644 --- a/include/qapi/qmp/dispatch.h +++ b/include/qapi/qmp/dispatch.h @@ -36,6 +36,7 @@ typedef struct QmpCommand QmpCommandOptions options; QTAILQ_ENTRY(QmpCommand) node; bool enabled; + const char *disable_reason; } QmpCommand; typedef QTAILQ_HEAD(QmpCommandList, QmpCommand) QmpCommandList; @@ -44,7 +45,8 @@ void qmp_register_command(QmpCommandList *cmds, const char *name, QmpCommandFunc *fn, QmpCommandOptions options); const QmpCommand *qmp_find_command(const QmpCommandList *cmds, const char *name); -void qmp_disable_command(QmpCommandList *cmds, const char *name); +void qmp_disable_command(QmpCommandList *cmds, const char *name, + const char *err_msg); void qmp_enable_command(QmpCommandList *cmds, const char *name); bool qmp_command_is_enabled(const QmpCommand *cmd); diff --git a/qapi/qmp-dispatch.c b/qapi/qmp-dispatch.c index 0a2b20a4e4..5e597c76f7 100644 --- a/qapi/qmp-dispatch.c +++ b/qapi/qmp-dispatch.c @@ -157,8 +157,10 @@ QDict *qmp_dispatch(const QmpCommandList *cmds, QObject *request, } if (!cmd->enabled) { error_set(&err, ERROR_CLASS_COMMAND_NOT_FOUND, - "The command %s has been disabled for this instance", - command); + "Command %s has been disabled%s%s", + command, + cmd->disable_reason ? ": " : "", + cmd->disable_reason ?: ""); goto out; } if (oob && !(cmd->options & QCO_ALLOW_OOB)) { diff --git a/qapi/qmp-registry.c b/qapi/qmp-registry.c index 58c65b5052..f78c064aae 100644 --- a/qapi/qmp-registry.c +++ b/qapi/qmp-registry.c @@ -43,26 +43,28 @@ const QmpCommand *qmp_find_command(const QmpCommandList *cmds, const char *name) } static void qmp_toggle_command(QmpCommandList *cmds, const char *name, - bool enabled) + bool enabled, const char *disable_reason) { QmpCommand *cmd; QTAILQ_FOREACH(cmd, cmds, node) { if (strcmp(cmd->name, name) == 0) { cmd->enabled = enabled; + cmd->disable_reason = disable_reason; return; } } } -void qmp_disable_command(QmpCommandList *cmds, const char *name) +void qmp_disable_command(QmpCommandList *cmds, const char *name, + const char *disable_reason) { - qmp_toggle_command(cmds, name, false); + qmp_toggle_command(cmds, name, false, disable_reason); } void qmp_enable_command(QmpCommandList *cmds, const char *name) { - qmp_toggle_command(cmds, name, true); + qmp_toggle_command(cmds, name, true, NULL); } bool qmp_command_is_enabled(const QmpCommand *cmd) diff --git a/qga/main.c b/qga/main.c index ebb910773b..15fd3a4149 100644 --- a/qga/main.c +++ b/qga/main.c @@ -375,7 +375,7 @@ static void ga_disable_non_whitelisted(const QmpCommand *cmd, void *opaque) } if (!whitelisted) { g_debug("disabling command: %s", name); - qmp_disable_command(&ga_commands, name); + qmp_disable_command(&ga_commands, name, "the agent is in frozen state"); } } @@ -1328,7 +1328,7 @@ static GAState *initialize_agent(GAConfig *config, int socket_activation) s->blacklist = config->blacklist; do { g_debug("disabling command: %s", (char *)l->data); - qmp_disable_command(&ga_commands, l->data); + qmp_disable_command(&ga_commands, l->data, NULL); l = g_list_next(l); } while (l); }