[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, 20 Dec 2022 17:45:47 +0100 |
User-agent: |
NeoMutt/20170113 (1.7.2) |
On Tue, Dec 13, 2022 at 10:47:35PM +0100, Marek Marczykowski-Górecki wrote:
> On Tue, Dec 13, 2022 at 01:02:14PM +0100, Daniel Kiper wrote:
> > 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?
>
> I considered that, but the script has #!/bin/sh, not #!/bin/bash. Isn't
> local a bash-specific feature?
Sadly you are right... :-( So, Reviewed-by: Daniel Kiper
<daniel.kiper@oracle.com>...
Daniel