grub-devel
[Top][All Lists]
Advanced

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

Re: [PATCH] templates/linux_xen: fix detecting xsm policy


From: Daniel Kiper
Subject: Re: [PATCH] templates/linux_xen: fix detecting xsm policy
Date: Tue, 13 Dec 2022 13:02:14 +0100
User-agent: NeoMutt/20170113 (1.7.2)

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 <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=

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



reply via email to

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