On Thu, Jul 08, 2021 at 10:02:31PM +0200, Roland Hieber wrote:
> On Mon, Jun 28, 2021 at 08:42:13AM +0200, Michael Olbrich wrote:
> > On Mon, Jun 28, 2021 at 01:11:20AM +0200, Roland Hieber wrote:
> > > Be uniform with bin/ptxdist, indent with one tab instead of mixed tabs
> > > and spaces.
> > 
> > No. Everything is scripts is indented this way: Indention is 4 Spaces
> > tabwidth is 8 and tabs are not expanded. Blame Marc he started it this way
> > :-).
> 
> So because it started this way it can never be changed?

If we change it, then everything and not a single file. And we should
coordinate this, so that there are no pending patches somewhere.

And I'm not convinced it's a good idea in general. I prefer indenting with
just tabs as well, but it's more important for me that 'git blame' works
well.

Michael

> > > Signed-off-by: Roland Hieber <r...@pengutronix.de>
> > > ---
> > > PATCH v2 (rhi):
> > >  - new patch in v2
> > >  - not essential, but slowly start fixing indentation in scripts/lib
> > >  - git show -w is empty
> > > ---
> > >  scripts/lib/ptxd_lib_imx_hab.sh | 86 ++++++++++++++++-----------------
> > >  1 file changed, 43 insertions(+), 43 deletions(-)
> > > 
> > > diff --git a/scripts/lib/ptxd_lib_imx_hab.sh 
> > > b/scripts/lib/ptxd_lib_imx_hab.sh
> > > index fa5b3e2c1439..7af2b1112855 100644
> > > --- a/scripts/lib/ptxd_lib_imx_hab.sh
> > > +++ b/scripts/lib/ptxd_lib_imx_hab.sh
> > > @@ -27,64 +27,64 @@
> > >  #     This will contain the srk hash which must be written to the fuses
> > >  #
> > >  ptxd_make_imx_habv4_gen_table_impl() {
> > > -    local group="${1}"
> > > -    local template="${1}"
> > > -    local srk_count="${2}"
> > > -    local table_bin="${pkg_build_dir}/imx-srk-table.bin"
> > > -    local srk_fuse_bin="${pkg_build_dir}/imx-srk-fuse.bin"
> > > -    local -a certs
> > > -    local i
> > > + local group="${1}"
> > > + local template="${1}"
> > > + local srk_count="${2}"
> > > + local table_bin="${pkg_build_dir}/imx-srk-table.bin"
> > > + local srk_fuse_bin="${pkg_build_dir}/imx-srk-fuse.bin"
> > > + local -a certs
> > > + local i
> > >  
> > > -    case "${template}" in
> > > - *%d*)   # <template> [<srk_count>]
> > > -     if [ -z "${srk_count}" ]; then
> > > -         srk_count=4
> > > -     fi
> > > + case "${template}" in
> > > +         *%d*)   # <template> [<srk_count>]
> > > +                 if [ -z "${srk_count}" ]; then
> > > +                         srk_count=4
> > > +                 fi
> > >  
> > > -     if [ "${srk_count}" -gt 4 ]; then
> > > -         ptxd_bailout "HABv4 allows only 4 certificates"
> > > -     fi
> > > +                 if [ "${srk_count}" -gt 4 ]; then
> > > +                         ptxd_bailout "HABv4 allows only 4 certificates"
> > > +                 fi
> > >  
> > > -     for i in $(seq ${srk_count}); do
> > > -         certs[${#certs[*]}]="$(cs_get_ca "$(printf "${template}" 
> > > ${i})")"
> > > -     done
> > > -     ;;
> > > +                 for i in $(seq ${srk_count}); do
> > > +                         certs[${#certs[*]}]="$(cs_get_ca "$(printf 
> > > "${template}" ${i})")"
> > > +                 done
> > > +                 ;;
> > >  
> > > - *)      # <role group>
> > > -     local -a roles=( $(cs_group_get_roles "${group}") )
> > > +         *)      # <role group>
> > > +                 local -a roles=( $(cs_group_get_roles "${group}") )
> > >  
> > > -     if [ "${#roles[@]}" -eq 0 ]; then
> > > -         ptxd_bailout "Failed to get roles for group '${group}'"
> > > -     fi
> > > +                 if [ "${#roles[@]}" -eq 0 ]; then
> > > +                         ptxd_bailout "Failed to get roles for group 
> > > '${group}'"
> > > +                 fi
> > >  
> > > -     if [ "${#roles[@]}" -gt 4 ]; then
> > > -         ptxd_bailout "HABv4 allows only 4 certificates"
> > > -     fi
> > > +                 if [ "${#roles[@]}" -gt 4 ]; then
> > > +                         ptxd_bailout "HABv4 allows only 4 certificates"
> > > +                 fi
> > >  
> > > -     for i in "${roles[@]}"; do
> > > -         certs[${#certs[*]}]="$(cs_get_ca "${i}")"
> > > -     done
> > > -    esac
> > > +                 for i in "${roles[@]}"; do
> > > +                         certs[${#certs[*]}]="$(cs_get_ca "${i}")"
> > > +                 done
> > > + esac
> > >  
> > > -    echo -e "generating $(basename ${table_bin}) and $(basename 
> > > ${srk_fuse_bin})\n"
> > > + echo -e "generating $(basename ${table_bin}) and $(basename 
> > > ${srk_fuse_bin})\n"
> > >  
> > > -    local orig_IFS="${IFS}"
> > > -    IFS=","
> > > -    certs="${certs[*]}"
> > > -    IFS="${orig_IFS}"
> > > + local orig_IFS="${IFS}"
> > > + IFS=","
> > > + certs="${certs[*]}"
> > > + IFS="${orig_IFS}"
> > >  
> > > -    ptxd_exec srktool --hab_ver 4 \
> > > - --table "${table_bin}" \
> > > - --efuses "${srk_fuse_bin}" \
> > > - --digest sha256 \
> > > - --certs "${certs}"
> > > + ptxd_exec srktool --hab_ver 4 \
> > > +         --table "${table_bin}" \
> > > +         --efuses "${srk_fuse_bin}" \
> > > +         --digest sha256 \
> > > +         --certs "${certs}"
> > >  }
> > >  export -f ptxd_make_imx_habv4_gen_table_impl
> > >  
> > >  ptxd_make_imx_habv4_gen_table() {
> > > -    ptxd_make_world_init &&
> > > + ptxd_make_world_init &&
> > >  
> > > -    ptxd_eval \
> > > + ptxd_eval \
> > >   "${pkg_make_env}" \
> > >   ptxd_make_imx_habv4_gen_table_impl "${@}"
> > >  }
> > > -- 
> > > 2.30.2
> > > 
> > > 
> > > _______________________________________________
> > > ptxdist mailing list
> > > ptxdist@pengutronix.de
> > > To unsubscribe, send a mail with subject "unsubscribe" to 
> > > ptxdist-requ...@pengutronix.de
> > > 
> > 
> > -- 
> > Pengutronix e.K.                           |                             |
> > Steuerwalder Str. 21                       | http://www.pengutronix.de/  |
> > 31137 Hildesheim, Germany                  | Phone: +49-5121-206917-0    |
> > Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |
> > 
> 
> -- 
> Roland Hieber, Pengutronix e.K.          | r.hie...@pengutronix.de     |
> Steuerwalder Str. 21                     | https://www.pengutronix.de/ |
> 31137 Hildesheim, Germany                | Phone: +49-5121-206917-0    |
> Amtsgericht Hildesheim, HRA 2686         | Fax:   +49-5121-206917-5555 |
> 
> _______________________________________________
> ptxdist mailing list
> ptxdist@pengutronix.de
> To unsubscribe, send a mail with subject "unsubscribe" to 
> ptxdist-requ...@pengutronix.de
> 

-- 
Pengutronix e.K.                           |                             |
Steuerwalder Str. 21                       | http://www.pengutronix.de/  |
31137 Hildesheim, Germany                  | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de
To unsubscribe, send a mail with subject "unsubscribe" to 
ptxdist-requ...@pengutronix.de

Reply via email to