]> git.ipfire.org Git - thirdparty/grub.git/commitdiff
templates/linux_xen: Fix detecting XSM policy
authorMarek Marczykowski-Górecki <marmarek@invisiblethingslab.com>
Tue, 13 Dec 2022 04:12:35 +0000 (05:12 +0100)
committerDaniel Kiper <daniel.kiper@oracle.com>
Tue, 10 Jan 2023 15:15:15 +0000 (16:15 +0100)
The xenpolicy 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>
Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
util/grub.d/20_linux_xen.in

index c1ebd09530d9a0ed3b3d8da57df1df412959483d..e46b757daa54f734f0c72cdd1f698d98c7fac68f 100644 (file)
@@ -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