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 <marmarek@invisiblethingslab.com>
Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
This commit is contained in:
Marek Marczykowski-Górecki 2022-12-13 05:12:35 +01:00 committed by Daniel Kiper
parent faca60df76
commit f601d9f3f7

View 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