From nobody Tue Nov 26 09:37:30 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=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1708615798; cv=none; d=zohomail.com; s=zohoarc; b=JLCiGB/2Ns6LoWMzi3XAAQnPZqNaPJFeBsw85N384dk7qWoU3V775VvYc9sgSc//viDTPP7+ojRRR+g9gUAMfFExYwuN9JzxrL10DGBKZe1ZYhonea250ywAYyZJIDI+DLX388yX4CJBAQRMgXEG5ok1vBk76PaN7atS5lpSQ3M= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1708615798; 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=qJ101CcDEsIgwbCRRwIlIJGFhtgnXY0NDhltmJmVB0g=; b=e8Aj4hlUTzWmE+euwpVVLxIpo090gtv0j5JkzrxTg6/XXZpQ92PbZlBp8CbXAe3IMBKEtASJGjZC44LRsL+k2P1s5ybR2qlcyUdBi6dbBYK36DCPsNU0gCMsn7Ej1dBx/AAQhuxJhFh8G0AC46T3H/FxAHfYFNgdTsew+tisa7Q= 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 1708615798947201.43941051718832; Thu, 22 Feb 2024 07:29:58 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rdB0C-0005AH-9u; Thu, 22 Feb 2024 10:28:48 -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 1rdB0A-00059s-I3 for qemu-devel@nongnu.org; Thu, 22 Feb 2024 10:28:46 -0500 Received: from mail-wm1-x32d.google.com ([2a00:1450:4864:20::32d]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rdB08-0000Nw-Tb for qemu-devel@nongnu.org; Thu, 22 Feb 2024 10:28:46 -0500 Received: by mail-wm1-x32d.google.com with SMTP id 5b1f17b1804b1-4127946aa11so11263515e9.1 for ; Thu, 22 Feb 2024 07:28:44 -0800 (PST) Received: from m1x-phil.lan (sto95-h01-176-184-18-96.dsl.sta.abo.bbox.fr. [176.184.18.96]) by smtp.gmail.com with ESMTPSA id 26-20020a05600c025a00b0041273fc463csm6349173wmj.17.2024.02.22.07.28.42 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Thu, 22 Feb 2024 07:28:42 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1708615723; x=1709220523; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=qJ101CcDEsIgwbCRRwIlIJGFhtgnXY0NDhltmJmVB0g=; b=wnXfQxuXCFERBN1w3t23hKd85+GDWIfphAe4Qs9RBTdQMt3V0LgRorITZ8GDWlZPJw PRD+2xD9dXOzYtym3l+vBQ2Mjwqx3bcG7o9oYqOdkTenFb0kKxghQtreqjjAtXfrrBCS 3x4a0VZ9rWmJCds/JJ/cmg304eMnG9whv0pOUsEbGWJSeZNb3LVFHYsYddX3eQpy8Hj+ WdNNYMeyWlsFyEt2V/Uq+YoEHHOKTvlX7dHfZi62paUAlmMwCjfxfYaaVEMOcEF/VSui lgJbbF1GbljWFezhhfQgypk6M/Mxixiy0qFqmIXVWzhOjSOTY59sQIW1Glf9yW2Pi5Sj Uv3w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1708615723; x=1709220523; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=qJ101CcDEsIgwbCRRwIlIJGFhtgnXY0NDhltmJmVB0g=; b=jcyRMOlGoWisUTetYc08XBw/+7UPP5VNv6PKJxbUd33GUjvlSjdQR1pis0P6tNyM2m 3396j7fVS0BM/jznMMnYnTCqMcrpUuiOEPiJk6Liv8pt4L1iXy7J2ZWVAWoV2U6RLEgy HvfVaZgr+sDnjsnPxYvRJ9D6bHo9i/3a5q0t0zxpDnYcUKDBCEll1eAwdwiX7Q52d5hU Mum2F396F+YIss8ZXWZtiw3PJSqpsF4iMe4zAsb738ze09Si3VTEf5Ee9Jq6CVMX5Bzp LxuOl3CP5TVgLFne3SX0FnNGTykAbwQCsATgBnMl8b6CpURqh5GDg8CpLy78jf56MQNV n2gQ== X-Gm-Message-State: AOJu0YziEpFw7/pN36ZHV97eNeGhWEZ9Keg4E9RUrpebfbsljEhw50R4 AfMCskQ1alwD1a8ALKlhafg3Vy83blnqfvhsH2l1B2G7Uwl7MjnxIlOW/8MHuEAf8jN2l6WvCVt SSV0= X-Google-Smtp-Source: AGHT+IFoEO9QA1VxgNNjA3JJzbPRAuR1HlpdndQrBl6cPXw7w5pte/Z4CjGAqFMSHUR7pUfv62lcoQ== X-Received: by 2002:a05:600c:502c:b0:412:8faa:65db with SMTP id n44-20020a05600c502c00b004128faa65dbmr168971wmr.38.1708615723211; Thu, 22 Feb 2024 07:28:43 -0800 (PST) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org, Dehan Meng Cc: Konstantin Kostiuk , Michael Roth , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Subject: [PATCH v3 1/3] qga/commands-win32: Declare const qualifier before type Date: Thu, 22 Feb 2024 16:28:33 +0100 Message-ID: <20240222152835.72095-2-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240222152835.72095-1-philmd@linaro.org> References: <20240222152835.72095-1-philmd@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable 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=2a00:1450:4864:20::32d; envelope-from=philmd@linaro.org; helo=mail-wm1-x32d.google.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, 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 @linaro.org) X-ZM-MESSAGEID: 1708615808573100004 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 Reviewed-by: Konstantin Kostiuk --- 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; =20 -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 { =20 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; =20 -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} }; =20 -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; } =20 -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) { --=20 2.41.0 From nobody Tue Nov 26 09:37:30 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=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1708615798; cv=none; d=zohomail.com; s=zohoarc; b=UpRuCzBC592qhwak+xZEXoqzCD5JDmMXySlUrkCSVPRLDuHicczLctVnrI794X46O9Rp1lXkh4lXaUbdH2HvWdE7KGI8Xzv5DTiuLAQZWQ8Og+wPfwX15kkimpXc83gExHTazFj8pB1Xf5q6TFc7oouLCcTcRORz5tW9ERCsji0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1708615798; 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=FzD+99cgpDSrEBdy2lAUngKRLMF2vDH+vLkmhVJWYwA=; b=T1eUmpKdzvuRETH9wwKJZCu90NQ2eUN9ISxCm109EVJx0bcLYuUrKjLiaCaeqPeG0Ae9fKYWN/SE9myxZ769wb69Evr8IJ7W4rxHtuNr2IW63CU9Ro67atmDoFfBnBIzV5he7EBNwPl9VbLMo6/ubCDwXMLM02IHGXcmo2dKCXI= 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 1708615798831330.89279791001286; Thu, 22 Feb 2024 07:29:58 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rdB0H-0005Ao-Lj; Thu, 22 Feb 2024 10:28:53 -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 1rdB0G-0005Ac-GF for qemu-devel@nongnu.org; Thu, 22 Feb 2024 10:28:52 -0500 Received: from mail-lf1-x135.google.com ([2a00:1450:4864:20::135]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rdB0E-0000OC-Qj for qemu-devel@nongnu.org; Thu, 22 Feb 2024 10:28:52 -0500 Received: by mail-lf1-x135.google.com with SMTP id 2adb3069b0e04-512b13bf764so5919396e87.0 for ; Thu, 22 Feb 2024 07:28:50 -0800 (PST) Received: from m1x-phil.lan (sto95-h01-176-184-18-96.dsl.sta.abo.bbox.fr. [176.184.18.96]) by smtp.gmail.com with ESMTPSA id u6-20020a05600c19c600b004128e757706sm765542wmq.36.2024.02.22.07.28.47 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Thu, 22 Feb 2024 07:28:48 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1708615729; x=1709220529; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=FzD+99cgpDSrEBdy2lAUngKRLMF2vDH+vLkmhVJWYwA=; b=vCeWUuOaob3FHfRjZixcQjE+5hh6MknvbKoQQKNN3G3VZBwgpsPwC/IBtoaH7JLKce QKQHshrYvYP26OYrCKIz6hwACWMQEc5ehmzOeTDZzeLjzYuP1rAuP4fTowXDqRzp8qWQ PBSqTxNPht6PBPSwnppuRIGfrxO7MPJMcNNW7UJmSGB/ZxpR3/wtO7B2NshByLSJojxc 37rSXRsfB4mMSo4kpKuESsHj0QNUvsq+rzYldA5i2TIy4Ifr9C76Qz0KhfilqReM5v+v vWD08RckmJzUta6oIWzTJEY/O5asQ1OlXR42sncOZL1lAHljgE3+D1+wVrGboOm2v4r7 ULcw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1708615729; x=1709220529; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=FzD+99cgpDSrEBdy2lAUngKRLMF2vDH+vLkmhVJWYwA=; b=lxC5tGLZS04hOBo99lK9fzvcPbcvGnsWhJ+muNp1pk6F1amd6CWoXeob/xKRwXUicS 1H3DWIOk9A3KXinFZ+ZcgDiBFHTogxeyt7wjzbGMfEsnrDs0cvBXTYPRm8Cf1/vGVtxf VJAYaNZkNP3nBaC+81uhmC0guWq/0KR2Vegcht/2t7SlzQD8p5rcPmAAkzQ89XL0IDdh MQdgDgdo1Dr3ylVhKFdDz3Dxy0dsL1UJ2oZP+pQJ9JcEIzWVwBsnsEvWC/vY49b4rfgB Z69w3juKQFW++NNbFuRnpY6F4dVtBqKaHErwa45QwEaADWD8/U/tN17CEZzWQTU+dtbA Wzhg== X-Gm-Message-State: AOJu0YyP6vieAy4roWHw0yAw5RveTIqPjzZ3RspLGdzXZiB5/+2G3g4h KlVfgXREMCMaSn8XHZzgEWATnfjC2y9IsYX9HAxDyyw+5rnZpwVahpOYqb7l3w90emwUZLL2fg8 WTW8= X-Google-Smtp-Source: AGHT+IGN64cIv1ZdEcZvkihXeOYxyeeeEj0D7zAhal2si+AVCfgcKSePB/G90qQrmymK1Uy0DuomtQ== X-Received: by 2002:a05:651c:2125:b0:2d2:5cca:cf6f with SMTP id a37-20020a05651c212500b002d25ccacf6fmr3198721ljq.18.1708615728774; Thu, 22 Feb 2024 07:28:48 -0800 (PST) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org, Dehan Meng Cc: Konstantin Kostiuk , Michael Roth , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Subject: [PATCH v3 2/3] qga/commands-win32: Do not set matrix_lookup_t/win_10_0_t arrays size Date: Thu, 22 Feb 2024 16:28:34 +0100 Message-ID: <20240222152835.72095-3-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240222152835.72095-1-philmd@linaro.org> References: <20240222152835.72095-1-philmd@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable 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=2a00:1450:4864:20::135; envelope-from=philmd@linaro.org; helo=mail-lf1-x135.google.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, 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 @linaro.org) X-ZM-MESSAGEID: 1708615808491100003 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. Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Konstantin Kostiuk --- qga/commands-win32.c | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/qga/commands-win32.c b/qga/commands-win32.c index 79b5a580c9..87ce6e2870 100644 --- a/qga/commands-win32.c +++ b/qga/commands-win32.c @@ -2124,7 +2124,7 @@ typedef struct _ga_matrix_lookup_t { const char *version_id; } ga_matrix_lookup_t; =20 -static const ga_matrix_lookup_t WIN_VERSION_MATRIX[2][7] =3D { +static const ga_matrix_lookup_t WIN_VERSION_MATRIX[2][] =3D { { /* Desktop editions */ { 5, 0, "Microsoft Windows 2000", "2000"}, @@ -2133,7 +2133,7 @@ static const ga_matrix_lookup_t WIN_VERSION_MATRIX[2]= [7] =3D { { 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"}, @@ -2141,28 +2141,27 @@ static const ga_matrix_lookup_t WIN_VERSION_MATRIX[= 2][7] =3D { { 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} + { }, } }; =20 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; =20 -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} + { } }; =20 -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} + { } }; =20 static void ga_get_win_version(RTL_OSVERSIONINFOEXW *info, Error **errp) --=20 2.41.0 From nobody Tue Nov 26 09:37:30 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=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1708615798; cv=none; d=zohomail.com; s=zohoarc; b=BmEg+7/wOisomffWbl6DhI9JWVv8XMYRaEtGd/d0rtNZle8HvGxXyh+QHBypwgXa6SNKSoxtJwyzlXjpmRh68iVUhF1+uXzD8bLkhqzlpUGRN8FP8HLM2/HhH20Vzun9UgHMvgNvHIfKAfYwAWxI6dGeCEf3ILNPErfAeuW8Q3g= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1708615798; 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=9iQ3mhDuZFxw4v/RDXonwhsB2p6WbD00VJUj071WFjs=; b=Lz//YH8DvheRDUsuPcaa3jU6b4r+oh2cq8IAezFGUaLctYJXy0kiYI5prexSGF3oAHx1ObLYEpRZhP+guYGa4KpsLkjXQkSRokm/e2rWw5xSN/BGOmad47ktKKPTUiw2DkPyT4mcpw3xUCSvDo9RVZRjzxyifvwHOR7adfr2tZ0= 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 1708615798623267.0147647895624; Thu, 22 Feb 2024 07:29:58 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rdB0M-0005Bf-S8; Thu, 22 Feb 2024 10:28: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 1rdB0L-0005BW-Dr for qemu-devel@nongnu.org; Thu, 22 Feb 2024 10:28:57 -0500 Received: from mail-wr1-x436.google.com ([2a00:1450:4864:20::436]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rdB0K-0000OU-0r for qemu-devel@nongnu.org; Thu, 22 Feb 2024 10:28:57 -0500 Received: by mail-wr1-x436.google.com with SMTP id ffacd0b85a97d-33d0a7f2424so4892897f8f.0 for ; Thu, 22 Feb 2024 07:28:55 -0800 (PST) Received: from m1x-phil.lan (sto95-h01-176-184-18-96.dsl.sta.abo.bbox.fr. [176.184.18.96]) by smtp.gmail.com with ESMTPSA id u11-20020a056000038b00b0033d7dd27d97sm5885868wrf.45.2024.02.22.07.28.53 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Thu, 22 Feb 2024 07:28:53 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1708615734; x=1709220534; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=9iQ3mhDuZFxw4v/RDXonwhsB2p6WbD00VJUj071WFjs=; b=LWahLmuGy7nCNqkt4Z6aBANrU63/If4zuQaK+8W1+YZJDoq7fRLF0rqBJ0ArokOPlG 8HNVcnlpzZ002pKcY4vG8OG8gbA5ruRl0xJ8PAlXz5jcFR63gU9M4FcFxMgTN6EhWovE DbLDjJzUnqM2Iyqa9oPhBNNgmqMwhoGdWtAeMWQAFnx3zFPPJMR4sM0ABduQPzaKPazy QkCctstfY2x21yAk5OCrcsWiyTStDwabMDnGW5FmTwYq/LHAGK6ajRJVblSh6arcgh1u T3Ugjm0+x/rOu/NqLgoET/S7oKr/F6Hz0LHldHVRiTQojGsjuZSFGa2BHNY/zDLjDrjt YdVQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1708615734; x=1709220534; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=9iQ3mhDuZFxw4v/RDXonwhsB2p6WbD00VJUj071WFjs=; b=KXa/iaFHNLnIjZAsQvXJtP4iAXb+jZIruJ4W3AglcnEVJ4kXBIzcyJLLcU81GrH6YX L8X9l1Bx+rALA+LDKTp9017F1lxh/BTqx2/Iq6QbWD1b4fDitAj7IcaqMl6VVqFtSaFc /bZrK4ZEFIAvMgc/AElUfaH667nXOj4FzTqNUWl+Unk0U87ZIHSevs0qIY/e7t+iy70I A49oA0Jo+0ZVUyJUw4HKgr9M4uPyoHOO0dmrts7Eb/7j2zX7k5kdNy0QrYiy2ozydIZ5 bMrFKpwFWn/iw9i3izhkrBQmjVqAZ1CzfAPNFc1VIjMU7F9yVUT1VOK45mPv2i2ABhEQ crEA== X-Gm-Message-State: AOJu0Yx3ouNNa9HSQouwqqCF/eC6Ld/6m3z65VBhXRGt0vCUOgcY097z NGqXacge4m+ExCF6JFuEXKeIAdKBPhw5V/bSz0OGNy+fgLe4W1dl06KERvPXteNlpoDV++e6cDe Tzfs= X-Google-Smtp-Source: AGHT+IGfPUUCq5PVNYoIWdCdzpA7d3bs8VEGCBpqm4uVQCSEwKp77DQtKfzN2y/0xTpisYXB/lZ6Ng== X-Received: by 2002:a5d:6201:0:b0:33b:62c0:6181 with SMTP id y1-20020a5d6201000000b0033b62c06181mr13756918wru.42.1708615734183; Thu, 22 Feb 2024 07:28:54 -0800 (PST) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org, Dehan Meng Cc: Konstantin Kostiuk , Michael Roth , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Subject: [PATCH v3 3/3] qga-win: Add support of Windows Server 2025 in get-osinfo command Date: Thu, 22 Feb 2024 16:28:35 +0100 Message-ID: <20240222152835.72095-4-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240222152835.72095-1-philmd@linaro.org> References: <20240222152835.72095-1-philmd@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable 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=2a00:1450:4864:20::436; envelope-from=philmd@linaro.org; helo=mail-wr1-x436.google.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, 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 @linaro.org) X-ZM-MESSAGEID: 1708615804775100001 From: Dehan Meng Add support of Windows Server 2025 in get-osinfo command Signed-off-by: Dehan Meng Message-ID: <20240222025352.58859-2-demeng@redhat.com> Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Konstantin Kostiuk --- qga/commands-win32.c | 1 + 1 file changed, 1 insertion(+) diff --git a/qga/commands-win32.c b/qga/commands-win32.c index 87ce6e2870..9749e4e6a3 100644 --- a/qga/commands-win32.c +++ b/qga/commands-win32.c @@ -2155,6 +2155,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"}, { } }; =20 --=20 2.41.0