On Tue, Dec 13, 2022 at 05:12:35AM +0100, Marek Marczykowski-Górecki wrote:
> 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 <marma...@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=

Would not it be better to make this variable local? Or even better all
variables (and arguments) which are used in this function only?

Daniel

_______________________________________________
Grub-devel mailing list
Grub-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/grub-devel

Reply via email to