Received: from list by lists.gnu.org with archive (Exim 4.90_1) id 1p4wfN-0005eI-39 for mharc-grub-devel@gnu.org; Mon, 12 Dec 2022 23:13:17 -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 1p4wfL-0005e7-Bu for grub-devel@gnu.org; Mon, 12 Dec 2022 23:13:15 -0500 Received: from wout3-smtp.messagingengine.com ([64.147.123.19]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1p4wfJ-0006to-Kb for grub-devel@gnu.org; Mon, 12 Dec 2022 23:13:15 -0500 Received: from compute2.internal (compute2.nyi.internal [10.202.2.46]) by mailout.west.internal (Postfix) with ESMTP id A3788320095F; Mon, 12 Dec 2022 23:13:08 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute2.internal (MEProxy); Mon, 12 Dec 2022 23:13:08 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= invisiblethingslab.com; h=cc:cc:content-transfer-encoding :content-type:date:date:from:from:in-reply-to:message-id :mime-version:reply-to:sender:subject:subject:to:to; s=fm1; t= 1670904788; x=1670991188; bh=eQqdwQCKVdHM87NOx3Z1+7HwYd6+Urtexbv MYF6NJr0=; b=nsEY7cG3mjG2bxjfqYHQyAU5JVyN8LjET43VkFc44H7e1KtsOdf Hu4WzNgakt3tskpwwHkpA+WRdh6pzSOWeKrsFFCiyJu2kF+PfJ3JT70yA6SmK/Y1 5ZXDpELBpj+i+/qqInriwM2eD9mDdV3UnJe3AnzacmBlJIJCQO9Vek3mBywsbGPs E8qvhHiUfOfV5Zd63Yn8iNq2g1Gw3wUT3scFr+7qWkvhwkDK5fl0HkPvTLFTQvZ5 GjLzsgcP0rOU6WBTwiUYa94kq6/+i1EolyzE9ss1yNHu2izhTcd4OGR/WHhQ6jcP 2hS74jEtNz1WU2yKx6NocHeRAcmp4ylv0xg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:date:date:feedback-id:feedback-id:from:from :in-reply-to:message-id:mime-version:reply-to:sender:subject :subject:to:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm2; t=1670904788; x=1670991188; bh=eQqdwQCKVdHM8 7NOx3Z1+7HwYd6+UrtexbvMYF6NJr0=; b=SB2nmu8FfCmjtB781p31hZNvaHl40 XN8165gYoif1WtUqWbcOXgNO6q/OVMPgX8EtEQf3LpMPNDbMBmYEy+EKQCfNlzMv cKTPogFgoYFQUuXL5cC1TJcHJdsySwQl8GjGacz/UTCrJo1xHNlOgajCSG73yrtK snKsebeXeYtApt+wuNAAsS/l+NhXsfUwse55N0UHNcFhm3KVm+jN+vEVmdPkDZBC HUTtiPgqLPhuXEfCRjx2xnSgLA1dTCfrCWC7alXrn3+99K5hBtWSSYvPddDENDcD D9caMoH8rWpuMo4gTsj6UN2xz4nnf2bM/4jFHhSUFN/bAUh1sobPsR/Gw== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvhedrvdelgdejtdcutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecunecujfgurhephffvvefufffkofggtgfgsehtkeertd ertdejnecuhfhrohhmpeforghrvghkucforghrtgiihihkohifshhkihdqifpkrhgvtghk ihcuoehmrghrmhgrrhgvkhesihhnvhhishhisghlvghthhhinhhgshhlrggsrdgtohhmqe enucggtffrrghtthgvrhhnpeelkefhudelteelleelteetveeffeetffekteetjeehlefg geekleeghefhtdehvdenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrih hlfhhrohhmpehmrghrmhgrrhgvkhesihhnvhhishhisghlvghthhhinhhgshhlrggsrdgt ohhm X-ME-Proxy: Feedback-ID: i1568416f:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Mon, 12 Dec 2022 23:13:07 -0500 (EST) From: =?UTF-8?q?Marek=20Marczykowski-G=C3=B3recki?= To: grub-devel@gnu.org Cc: =?UTF-8?q?Marek=20Marczykowski-G=C3=B3recki?= Subject: [PATCH] templates/linux_xen: fix detecting xsm policy Date: Tue, 13 Dec 2022 05:12:35 +0100 Message-Id: <20221213041235.2284811-1-marmarek@invisiblethingslab.com> X-Mailer: git-send-email 2.37.3 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Received-SPF: none client-ip=64.147.123.19; envelope-from=marmarek@invisiblethingslab.com; helo=wout3-smtp.messagingengine.com X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 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_LOW=-0.7, SPF_HELO_PASS=-0.001, SPF_NONE=0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: The development of GNU GRUB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Dec 2022 04:13:15 -0000 xsmpolicy variable was left set from previous function call. This resulted in all-but-first menu entries including XSM policy, even if it did not exist. Fix this by initializing the xenpolicy variable. Signed-off-by: Marek Marczykowski-Górecki --- util/grub.d/20_linux_xen.in | 1 + 1 file changed, 1 insertion(+) diff --git a/util/grub.d/20_linux_xen.in b/util/grub.d/20_linux_xen.in index c1ebd0953..e46b757da 100644 --- a/util/grub.d/20_linux_xen.in +++ b/util/grub.d/20_linux_xen.in @@ -105,6 +105,7 @@ linux_entry_xsm () xsm="$7" # If user wants to enable XSM support, make sure there's # corresponding policy file. + xenpolicy= if ${xsm} ; then xenpolicy="xenpolicy-$xen_version" if test ! -e "${xen_dirname}/${xenpolicy}" ; then -- 2.37.3