From: Marek Marczykowski-Górecki Date: Tue, 13 Dec 2022 04:12:35 +0000 (+0100) Subject: templates/linux_xen: Fix detecting XSM policy X-Git-Tag: grub-2.12-rc1~181 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=f601d9f3f76f5196e5f59dd4664cfd612f53bc19;p=thirdparty%2Fgrub.git templates/linux_xen: Fix detecting XSM policy 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 Reviewed-by: Daniel Kiper --- 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