[PATCH v4] env: Avoid using GNU features in awk

Simon Glass sjg at chromium.org
Mon Nov 29 00:47:29 CET 2021


Hi Mark,

On Sun, 28 Nov 2021 at 15:57, Mark Kettenis <mark.kettenis at xs4all.nl> wrote:
>
> > From: Simon Glass <sjg at chromium.org>
> > Date: Wed, 24 Nov 2021 07:40:14 -0700
> >
> > GNU has a very useful third argument to match() but this is not supported
> > in the POSIX awk.
> >
> > Update the code to cope, so that the script is POSIX-compliant.
> >
> > Signed-off-by: Simon Glass <sjg at chromium.org>
> > ---
> >
> > Changes in v4:
> > - Avoid using length() to access the length of the array
> >
> > Changes in v3:
> > - Reword commit message and comment to avoid casting aspersions
> >
> > Changes in v2:
> > - Fix the has_var match() that had left-over test code
> >
> >  scripts/env2string.awk | 29 ++++++++++++++++++++---------
> >  1 file changed, 20 insertions(+), 9 deletions(-)
>
> This makes the next branch build again for me on OpenBSD.  So it would
> be great if this one could be applied somewhat promptly or at least
> before next is merged into master.

OK to add?

Tested-by: Mark Kettenis <mark.kettenis at xs4all.nl>


More information about the U-Boot mailing list