mailarchive of the ptxdist mailing list
 help / color / mirror / Atom feed
From: Alexander Dahl <ada@thorsis.com>
To: ptxdist@pengutronix.de
Cc: Michael Olbrich <m.olbrich@pengutronix.de>,
	Roland Hieber <rhi@pengutronix.de>
Subject: Re: [ptxdist] [PATCH v2 6/7] ptxd_lib_imx_hab: fix indentation
Date: Fri, 09 Jul 2021 12:12:19 +0200	[thread overview]
Message-ID: <1705650.enE0Lt2yz5@ada> (raw)
In-Reply-To: <20210628064213.GK25044@pengutronix.de>

Hei hei,

Am Montag, 28. Juni 2021, 08:42:13 CEST schrieb Michael Olbrich:
> 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

Maybe someone wants to craft an .editorconfig file to reflect that? ;-)

https://editorconfig.org/

(Can also be project wide with a section for scripts with those special 
settings.)

Greets
Alex

> 
> :-).
> 
> Michael
> 
> > Signed-off-by: Roland Hieber <rhi@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 "${@}"
> >  
> >  }





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


  parent reply	other threads:[~2021-07-09 10:12 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-27 23:11 [ptxdist] [PATCH v2 1/7] ptxd_lib_code_signing: cs_get_ca(): improve error handling Roland Hieber
2021-06-27 23:11 ` [ptxdist] [PATCH v2 2/7] ptxd_lib_code_signing: introduce role groups Roland Hieber
2021-06-27 23:11 ` [ptxdist] [PATCH v2 3/7] templates/code-signing-provider: set up the 'imx-habv4-srk' role group Roland Hieber
2021-06-27 23:11 ` [ptxdist] [PATCH v2 4/7] templates/barebox-imx-habv4: use " Roland Hieber
2021-06-27 23:11 ` [ptxdist] [PATCH v2 5/7] host-ptx-code-signing-dev: version bump 0.4 -> 0.5 Roland Hieber
2021-06-27 23:11 ` [ptxdist] [PATCH v2 6/7] ptxd_lib_imx_hab: fix indentation Roland Hieber
2021-06-28  6:42   ` Michael Olbrich
2021-07-08 20:02     ` Roland Hieber
2021-07-09  6:53       ` Michael Olbrich
2021-07-09 10:12     ` Alexander Dahl [this message]
2021-07-09 10:41       ` Michael Olbrich
2021-07-16 11:38     ` Marc Kleine-Budde
2021-06-27 23:11 ` [ptxdist] [PATCH v2 7/7] ptxd_lib_code_signing: " Roland Hieber
2021-06-28  6:38 ` [ptxdist] [PATCH v2 1/7] ptxd_lib_code_signing: cs_get_ca(): improve error handling Michael Olbrich
2021-07-08 20:16   ` Roland Hieber
2021-07-09  7:42     ` Michael Olbrich
2021-07-09 11:26       ` Roland Hieber
2021-07-09 11:41         ` Michael Olbrich

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1705650.enE0Lt2yz5@ada \
    --to=ada@thorsis.com \
    --cc=m.olbrich@pengutronix.de \
    --cc=ptxdist@pengutronix.de \
    --cc=rhi@pengutronix.de \
    --subject='Re: [ptxdist] [PATCH v2 6/7] ptxd_lib_imx_hab: fix indentation' \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox