grub-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH] templates/linux_xen: fix detecting xsm policy


From: Marek Marczykowski-Górecki
Subject: [PATCH] templates/linux_xen: fix detecting xsm policy
Date: Tue, 13 Dec 2022 05:12:35 +0100

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 <marmarek@invisiblethingslab.com>
---
 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




reply via email to

[Prev in Thread] Current Thread [Next in Thread]