[Fuego] [PATCH 03/18] need_check: no need for testing if the file exists

Daniel Sangorrin daniel.sangorrin at toshiba.co.jp
Wed Jan 31 04:41:54 UTC 2018


Hi Tim

> -----Original Message-----
> From: Tim.Bird at sony.com [mailto:Tim.Bird at sony.com]
> Sent: Wednesday, January 31, 2018 1:34 PM
> To: daniel.sangorrin at toshiba.co.jp; fuego at lists.linuxfoundation.org
> Subject: RE: [Fuego] [PATCH 03/18] need_check: no need for testing if the file exists
> 
> 
> 
> > -----Original Message-----
> > From: Daniel Sangorrin
> > Subject: [Fuego] [PATCH 03/18] need_check: no need for testing if the file
> > exists
> >
> > Signed-off-by: Daniel Sangorrin <daniel.sangorrin at toshiba.co.jp>
> > ---
> >  engine/scripts/need_check.sh | 14 +++++---------
> >  1 file changed, 5 insertions(+), 9 deletions(-)
> >
> > diff --git a/engine/scripts/need_check.sh b/engine/scripts/need_check.sh
> > index 58f76c3..d85e89a 100755
> > --- a/engine/scripts/need_check.sh
> > +++ b/engine/scripts/need_check.sh
> > @@ -173,22 +173,18 @@ function get_full_kconfig {
> >    gfk_board_tmpfile=$(mktemp)
> >    gfk_host_tmpfile=$(mktemp)
> >
> > -  # try /proc/config.gz first
> I'm not sure why you don't like my comments.  ;-)  But whatever.

Oops sorry about that!! Please insert it back, I think I got confused
with the echo message below.

> 
> > -  if cmd "test -f /proc/config.gz" ; then
> > -    if cmd "zcat /proc/config.gz >$gfk_board_tmpfile 2>/dev/null" ; then
> > -      get $gfk_board_tmpfile $out_filename
> > -      return 0
> > -    fi
> > -  else
> > -    echo "/proc/config.gz not found"
> > +  if cmd "zcat /proc/config.gz >$gfk_board_tmpfile 2>/dev/null" ; then
> > +    get $gfk_board_tmpfile $out_filename
> > +    return 0
> >    fi
> >
> > -  # try /boot directory
> >    cmd "uname -r >$gfk_board_tmpfile"
> >    get $gfk_board_tmpfile $gfk_host_tmpfile
> >    kver=$(cat $gfk_host_tmpfile)
> I took the liberty of simplifying this sequence to
> kver=$(cmd uname -r)
> 
> >    conf_filename="/boot/config-$kver"
> >
> > +  echo "/proc/config.gz not found, trying $conf_filename"
> > +
> >    if cmd "test -f $conf_filename" ; then
> >      get $conf_filename $out_filename
> >      return 0
> > --
> > 2.7.4
> 
> Applied.  Thanks.
>  -- Tim
> 





More information about the Fuego mailing list