From nobody Tue Nov 26 06:57:37 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1709560003; cv=none; d=zohomail.com; s=zohoarc; b=QHpCwgVLc2Tsa6z9GYRZQeMGJM8lltPDZKBlI/qKvwZw1E9hxgfi68PIlMlMZQXktrJSANwqIkt3yLBxlRs/7VbguchFhCzQKuIcGTV/zK2iCGj6ySP/XsnwOFtkF+8QjJNWaqNvtq0ZcnrJp8igNEUghbQpvpQKUP4uxeg/790= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1709560003; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=ZSwkEkSW6CtLjOsJilX8J3bkrv/9gWdnkPWWOnvuipw=; b=h1tJ0sYfSBNVVC9krNkDlsCpC3fBCRLrx0Zm6Hf3Bl1QPrnVpGuZ+ZKnkEPChNyFMxUjanozRcr0j7XNvKlsLCMqfb/A/evO4mcx1rTWcpBwTnj6Lg5+K4IGx7YeUx2odVGzJ0fzWWOCOors8PhKOlEi6WHgyRb/0bKorqwk7Ec= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1709560003199828.1011812810001; Mon, 4 Mar 2024 05:46:43 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rh8df-0000Zv-AW; Mon, 04 Mar 2024 08:45:55 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rh8dU-0000ZQ-Ux for qemu-devel@nongnu.org; Mon, 04 Mar 2024 08:45:45 -0500 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rh8dQ-0000ue-9A for qemu-devel@nongnu.org; Mon, 04 Mar 2024 08:45:42 -0500 Received: from mimecast-mx02.redhat.com (mx-ext.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-678-F5Le5QRLO3WHRtP-MBGbeQ-1; Mon, 04 Mar 2024 08:45:36 -0500 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.rdu2.redhat.com [10.11.54.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 05BD83C0F232; Mon, 4 Mar 2024 13:45:36 +0000 (UTC) Received: from srv1.redhat.com (unknown [10.45.226.165]) by smtp.corp.redhat.com (Postfix) with ESMTPS id F193624D; Mon, 4 Mar 2024 13:45:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1709559939; h=from:from: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; bh=ZSwkEkSW6CtLjOsJilX8J3bkrv/9gWdnkPWWOnvuipw=; b=V/Ng13tpGtR5/TYY08yb/yDAptT1Si8IGHBbpPWYdtFEj+PxF5ajn8nZJw1tzE8PJK5wWv HmhbiMv9Vk/NuEh8SE3FvHGfBBDCyNarQZyNzfDwveCn+/71LHMG1HXccQd2KmgMTS3QA0 pBI/wpB8340E3XJIJSYvJbHL1ZAy9ps= X-MC-Unique: F5Le5QRLO3WHRtP-MBGbeQ-1 From: Konstantin Kostiuk To: qemu-devel@nongnu.org Cc: Dehan Meng , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Michael Roth , Yan Vugenfirer Subject: [PATCH v4 1/3] qga/commands-win32: Declare const qualifier before type Date: Mon, 4 Mar 2024 15:45:30 +0200 Message-ID: <20240304134532.28506-2-kkostiuk@redhat.com> In-Reply-To: <20240304134532.28506-1-kkostiuk@redhat.com> References: <20240304134532.28506-1-kkostiuk@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.1 Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=170.10.133.124; envelope-from=kkostiuk@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -26 X-Spam_score: -2.7 X-Spam_bar: -- X-Spam_report: (-2.7 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.571, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1709560005250100001 From: Philippe Mathieu-Daud=C3=A9 Most of the code base use the 'const' qualifier *before* the type being qualified. Use the same style to unify. Signed-off-by: Philippe Mathieu-Daud=C3=A9 Message-ID: <20240222152835.72095-2-philmd@linaro.org> Reviewed-by: Konstantin Kostiuk Signed-off-by: Konstantin Kostiuk Reviewed-by: Yan Vugenfirer --- qga/commands-win32.c | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/qga/commands-win32.c b/qga/commands-win32.c index a1015757d8..79b5a580c9 100644 --- a/qga/commands-win32.c +++ b/qga/commands-win32.c @@ -2120,11 +2120,11 @@ GuestUserList *qmp_guest_get_users(Error **errp) typedef struct _ga_matrix_lookup_t { int major; int minor; - char const *version; - char const *version_id; + const char *version; + const char *version_id; } ga_matrix_lookup_t; -static ga_matrix_lookup_t const WIN_VERSION_MATRIX[2][7] =3D { +static const ga_matrix_lookup_t WIN_VERSION_MATRIX[2][7] =3D { { /* Desktop editions */ { 5, 0, "Microsoft Windows 2000", "2000"}, @@ -2148,18 +2148,18 @@ static ga_matrix_lookup_t const WIN_VERSION_MATRIX[= 2][7] =3D { typedef struct _ga_win_10_0_t { int first_build; - char const *version; - char const *version_id; + const char *version; + const char *version_id; } ga_win_10_0_t; -static ga_win_10_0_t const WIN_10_0_SERVER_VERSION_MATRIX[4] =3D { +static const ga_win_10_0_t WIN_10_0_SERVER_VERSION_MATRIX[4] =3D { {14393, "Microsoft Windows Server 2016", "2016"}, {17763, "Microsoft Windows Server 2019", "2019"}, {20344, "Microsoft Windows Server 2022", "2022"}, {0, 0} }; -static ga_win_10_0_t const WIN_10_0_CLIENT_VERSION_MATRIX[3] =3D { +static const ga_win_10_0_t WIN_10_0_CLIENT_VERSION_MATRIX[3] =3D { {10240, "Microsoft Windows 10", "10"}, {22000, "Microsoft Windows 11", "11"}, {0, 0} @@ -2185,16 +2185,16 @@ static void ga_get_win_version(RTL_OSVERSIONINFOEXW= *info, Error **errp) return; } -static char *ga_get_win_name(OSVERSIONINFOEXW const *os_version, bool id) +static char *ga_get_win_name(const OSVERSIONINFOEXW *os_version, bool id) { DWORD major =3D os_version->dwMajorVersion; DWORD minor =3D os_version->dwMinorVersion; DWORD build =3D os_version->dwBuildNumber; int tbl_idx =3D (os_version->wProductType !=3D VER_NT_WORKSTATION); - ga_matrix_lookup_t const *table =3D WIN_VERSION_MATRIX[tbl_idx]; - ga_win_10_0_t const *win_10_0_table =3D tbl_idx ? + const ga_matrix_lookup_t *table =3D WIN_VERSION_MATRIX[tbl_idx]; + const ga_win_10_0_t *win_10_0_table =3D tbl_idx ? WIN_10_0_SERVER_VERSION_MATRIX : WIN_10_0_CLIENT_VERSION_MATRIX; - ga_win_10_0_t const *win_10_0_version =3D NULL; + const ga_win_10_0_t *win_10_0_version =3D NULL; while (table->version !=3D NULL) { if (major =3D=3D 10 && minor =3D=3D 0) { while (win_10_0_table->version !=3D NULL) { -- 2.44.0 From nobody Tue Nov 26 06:57:38 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1709560008; cv=none; d=zohomail.com; s=zohoarc; b=Bx93K01C0UEm8gW+FsbOGDY3hH5b+IlnpgK39AKPowqhkruRLXUhZ2tumQjx3MNnF/gerI5YuGz/9to/p2OGKfwoVmNTLHA9Is+sLQAVrlVnMP0zHKgOMXHZXMClaxZBdCTMwLQHibxm3xf8urOJEnonXxtDwWWHZnas8ZRCejQ= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1709560008; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=6J5oh8U2LJyvNNXLz/CYBSqH4JLeLvNtvRZckNxhbIQ=; b=PEJZwBmqgvpBF3Xj+N1ovZSuPYx+luLNIcO2rP+c4QpCnp1oB3qRuKANwEL2bLLputicfw3Im42oCcvTzB+csRoolFgO0rNNtgJjO07W6lIudqOccep9DqpjBTXTtb2cfz3X6tSMvGtVlaJZjTo8khk+inYJqcj5uuqtNMNNzdU= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1709560008751725.3035298440176; Mon, 4 Mar 2024 05:46:48 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rh8dm-0000dA-0H; Mon, 04 Mar 2024 08:46:02 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rh8di-0000co-8H for qemu-devel@nongnu.org; Mon, 04 Mar 2024 08:45:58 -0500 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rh8dR-0000uk-Cn for qemu-devel@nongnu.org; Mon, 04 Mar 2024 08:45:57 -0500 Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-610-NvctdcphMQ6OuGfgzJmTFQ-1; Mon, 04 Mar 2024 08:45:37 -0500 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.rdu2.redhat.com [10.11.54.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 52C6A85A58F; Mon, 4 Mar 2024 13:45:37 +0000 (UTC) Received: from srv1.redhat.com (unknown [10.45.226.165]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 4A91B24D; Mon, 4 Mar 2024 13:45:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1709559940; h=from:from: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; bh=6J5oh8U2LJyvNNXLz/CYBSqH4JLeLvNtvRZckNxhbIQ=; b=c6CgDlHECR/tGcfR9gT7lekT2/JhLLuqCnaQ5B6mQJay5O2a4i2YhisHYRCZ2w1HQIVuWR p8+TrtZri9r5SIp5wOPlgby7VdTle7OtFOYNopnXK1qZ1zksmDxP7+VRai1YUX6TwrujKi oXLLB2spweOixNrqWytByszi+x32HdE= X-MC-Unique: NvctdcphMQ6OuGfgzJmTFQ-1 From: Konstantin Kostiuk To: qemu-devel@nongnu.org Cc: Dehan Meng , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Michael Roth , Yan Vugenfirer Subject: [PATCH v4 2/3] qga/commands-win32: Do not set matrix_lookup_t/win_10_0_t arrays size Date: Mon, 4 Mar 2024 15:45:31 +0200 Message-ID: <20240304134532.28506-3-kkostiuk@redhat.com> In-Reply-To: <20240304134532.28506-1-kkostiuk@redhat.com> References: <20240304134532.28506-1-kkostiuk@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.1 Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=170.10.133.124; envelope-from=kkostiuk@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -16 X-Spam_score: -1.7 X-Spam_bar: - X-Spam_report: (-1.7 / 5.0 requ) BAYES_00=-1.9, DKIM_INVALID=0.1, DKIM_SIGNED=0.1, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1709560009107100001 From: Philippe Mathieu-Daud=C3=A9 ga_get_win_name() iterates over all elements in the arrays by checking the 'version' field is non-NULL. Since the arrays are guarded by a NULL terminating element, we don't need to specify their size: static char *ga_get_win_name(...) { ... const ga_matrix_lookup_t *table =3D WIN_VERSION_MATRIX[tbl_idx]; const ga_win_10_0_t *win_10_0_table =3D ... ... while (table->version !=3D NULL) { ^^^^^^^^^^^^^^^ while (win_10_0_table->version !=3D NULL) { ^^^^^^^^^^^^^^^ This will simplify maintenance when adding new entries to these arrays. Split WIN_VERSION_MATRIX into WIN_CLIENT_VERSION_MATRIX and WIN_SERVER_VERSION_MATRIX because multidimensional array must have bounds for all dimensions except the first. Signed-off-by: Philippe Mathieu-Daud=C3=A9 Message-ID: <20240222152835.72095-3-philmd@linaro.org> Reviewed-by: Konstantin Kostiuk Signed-off-by: Konstantin Kostiuk Reviewed-by: Yan Vugenfirer --- qga/commands-win32.c | 52 +++++++++++++++++++++----------------------- 1 file changed, 25 insertions(+), 27 deletions(-) diff --git a/qga/commands-win32.c b/qga/commands-win32.c index 79b5a580c9..a830f1494e 100644 --- a/qga/commands-win32.c +++ b/qga/commands-win32.c @@ -2124,45 +2124,42 @@ typedef struct _ga_matrix_lookup_t { const char *version_id; } ga_matrix_lookup_t; -static const ga_matrix_lookup_t WIN_VERSION_MATRIX[2][7] =3D { - { - /* Desktop editions */ - { 5, 0, "Microsoft Windows 2000", "2000"}, - { 5, 1, "Microsoft Windows XP", "xp"}, - { 6, 0, "Microsoft Windows Vista", "vista"}, - { 6, 1, "Microsoft Windows 7" "7"}, - { 6, 2, "Microsoft Windows 8", "8"}, - { 6, 3, "Microsoft Windows 8.1", "8.1"}, - { 0, 0, 0} - },{ - /* Server editions */ - { 5, 2, "Microsoft Windows Server 2003", "2003"}, - { 6, 0, "Microsoft Windows Server 2008", "2008"}, - { 6, 1, "Microsoft Windows Server 2008 R2", "2008r2"}, - { 6, 2, "Microsoft Windows Server 2012", "2012"}, - { 6, 3, "Microsoft Windows Server 2012 R2", "2012r2"}, - { 0, 0, 0}, - { 0, 0, 0} - } +static const ga_matrix_lookup_t WIN_CLIENT_VERSION_MATRIX[] =3D { + { 5, 0, "Microsoft Windows 2000", "2000"}, + { 5, 1, "Microsoft Windows XP", "xp"}, + { 6, 0, "Microsoft Windows Vista", "vista"}, + { 6, 1, "Microsoft Windows 7" "7"}, + { 6, 2, "Microsoft Windows 8", "8"}, + { 6, 3, "Microsoft Windows 8.1", "8.1"}, + { } +}; + +static const ga_matrix_lookup_t WIN_SERVER_VERSION_MATRIX[] =3D { + { 5, 2, "Microsoft Windows Server 2003", "2003"}, + { 6, 0, "Microsoft Windows Server 2008", "2008"}, + { 6, 1, "Microsoft Windows Server 2008 R2", "2008r2"}, + { 6, 2, "Microsoft Windows Server 2012", "2012"}, + { 6, 3, "Microsoft Windows Server 2012 R2", "2012r2"}, + { }, }; typedef struct _ga_win_10_0_t { int first_build; - const char *version; - const char *version_id; + char const *version; + char const *version_id; } ga_win_10_0_t; -static const ga_win_10_0_t WIN_10_0_SERVER_VERSION_MATRIX[4] =3D { +static const ga_win_10_0_t WIN_10_0_SERVER_VERSION_MATRIX[] =3D { {14393, "Microsoft Windows Server 2016", "2016"}, {17763, "Microsoft Windows Server 2019", "2019"}, {20344, "Microsoft Windows Server 2022", "2022"}, - {0, 0} + { } }; -static const ga_win_10_0_t WIN_10_0_CLIENT_VERSION_MATRIX[3] =3D { +static const ga_win_10_0_t WIN_10_0_CLIENT_VERSION_MATRIX[] =3D { {10240, "Microsoft Windows 10", "10"}, {22000, "Microsoft Windows 11", "11"}, - {0, 0} + { } }; static void ga_get_win_version(RTL_OSVERSIONINFOEXW *info, Error **errp) @@ -2191,7 +2188,8 @@ static char *ga_get_win_name(const OSVERSIONINFOEXW *= os_version, bool id) DWORD minor =3D os_version->dwMinorVersion; DWORD build =3D os_version->dwBuildNumber; int tbl_idx =3D (os_version->wProductType !=3D VER_NT_WORKSTATION); - const ga_matrix_lookup_t *table =3D WIN_VERSION_MATRIX[tbl_idx]; + const ga_matrix_lookup_t *table =3D tbl_idx ? + WIN_SERVER_VERSION_MATRIX : WIN_CLIENT_VERSION_MATRIX; const ga_win_10_0_t *win_10_0_table =3D tbl_idx ? WIN_10_0_SERVER_VERSION_MATRIX : WIN_10_0_CLIENT_VERSION_MATRIX; const ga_win_10_0_t *win_10_0_version =3D NULL; -- 2.44.0 From nobody Tue Nov 26 06:57:38 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1709559986; cv=none; d=zohomail.com; s=zohoarc; b=ZU1X1n5tzsae+enHzkI2swTNcqORyyPGXhsK67LiLKIvgO1JOkNiGSKc/GLytYFYRPKF2oUu83Ffrtt/wKDHlcxq9lCdYv+laXQz1oNpcNooWGUEfMbyVOupIINlcfwE7SlkvbkNpZrDww7xMKCW2T+/gjmEB79go53GZL1hw0E= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1709559986; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=m1nFQj4CjJ+IggkqrNmL8xsnI4ujHd8sd976jGH+SGw=; b=ezh/v9LKRXz9Z2ItxcCjNZpUEbCeGLsCfWIvIeVuRoZ4ZuV6YwFCJT2yCs+TcKWSqFQ94PHRxVzxR+wD+9JgPXvJHgciK2JwedIp/oiiRbkk2RGcSki/OCaC8kfLTZkRzWUZGES07b5N7xPQvvKkC77OL+6L38YlRkNxk1gRJrU= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 170955998680946.342464885452614; Mon, 4 Mar 2024 05:46:26 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rh8di-0000c9-1O; Mon, 04 Mar 2024 08:45:58 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rh8dY-0000Zn-Ac for qemu-devel@nongnu.org; Mon, 04 Mar 2024 08:45:48 -0500 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rh8dU-0000uq-4j for qemu-devel@nongnu.org; Mon, 04 Mar 2024 08:45:47 -0500 Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-691-6aHCxK3SMWWBPI0_ZpHoRg-1; Mon, 04 Mar 2024 08:45:38 -0500 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.rdu2.redhat.com [10.11.54.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 9F48C8350E5; Mon, 4 Mar 2024 13:45:38 +0000 (UTC) Received: from srv1.redhat.com (unknown [10.45.226.165]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 97BC224D; Mon, 4 Mar 2024 13:45:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1709559942; h=from:from: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; bh=m1nFQj4CjJ+IggkqrNmL8xsnI4ujHd8sd976jGH+SGw=; b=NbahAeBNFMF0UjWXdbDxkFodWvFzatspMdKrgeLJfie7LZ0DP1l8KAxPduA31xu+byz5/A FOo7ol12+6PDkxX0G/5uTlpmCmct8TaxNnvwgNYZ1y5WRS7RKn91M7sNchLcSgNdsrowY+ 6y+XiYtnyyjqykaszjhkXqfGO7SKL5Y= X-MC-Unique: 6aHCxK3SMWWBPI0_ZpHoRg-1 From: Konstantin Kostiuk To: qemu-devel@nongnu.org Cc: Dehan Meng , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Michael Roth , Yan Vugenfirer Subject: [PATCH v4 3/3] qga-win: Add support of Windows Server 2025 in get-osinfo command Date: Mon, 4 Mar 2024 15:45:32 +0200 Message-ID: <20240304134532.28506-4-kkostiuk@redhat.com> In-Reply-To: <20240304134532.28506-1-kkostiuk@redhat.com> References: <20240304134532.28506-1-kkostiuk@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.1 Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=170.10.129.124; envelope-from=kkostiuk@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -26 X-Spam_score: -2.7 X-Spam_bar: -- X-Spam_report: (-2.7 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.571, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1709559989119100003 From: Dehan Meng Add support of Windows Server 2025 in get-osinfo command Signed-off-by: Dehan Meng Message-ID: <20240222152835.72095-4-philmd@linaro.org> Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Konstantin Kostiuk Signed-off-by: Konstantin Kostiuk Reviewed-by: Yan Vugenfirer --- qga/commands-win32.c | 1 + 1 file changed, 1 insertion(+) diff --git a/qga/commands-win32.c b/qga/commands-win32.c index a830f1494e..d1cf1a87db 100644 --- a/qga/commands-win32.c +++ b/qga/commands-win32.c @@ -2153,6 +2153,7 @@ static const ga_win_10_0_t WIN_10_0_SERVER_VERSION_MA= TRIX[] =3D { {14393, "Microsoft Windows Server 2016", "2016"}, {17763, "Microsoft Windows Server 2019", "2019"}, {20344, "Microsoft Windows Server 2022", "2022"}, + {26040, "MIcrosoft Windows Server 2025", "2025"}, { } }; -- 2.44.0