[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <alpine.DEB.2.21.1910231054250.2335@hadrien>
Date: Wed, 23 Oct 2019 10:55:39 +0200 (CEST)
From: Julia Lawall <julia.lawall@...6.fr>
To: zhongshiqi <zhong.shiqi@....com.cn>
cc: Julia.Lawall@...6.fr, Gilles Muller <Gilles.Muller@...6.fr>,
nicolas.palix@...g.fr, michal.lkml@...kovi.net,
cocci@...teme.lip6.fr, linux-kernel@...r.kernel.org,
xue.zhihong@....com.cn, wang.yi59@....com.cn,
cheng.shengyu@....com.cn, yamada.masahiro@...ionext.com
Subject: Re: [PATCH] Configuring COCCI parameter as a directory is
supportted
On Wed, 23 Oct 2019, zhongshiqi wrote:
> This patch puts a modification in scripts/coccicheck which supports users
> in configuring COCCI parameter as a directory to traverse files in
> directory.
>
> Signed-off-by: zhongshiqi <zhong.shiqi@....com.cn>
> ---
> scripts/coccicheck | 4 ++++
> 1 file changed, 4 insertions(+)
>
> diff --git a/scripts/coccicheck b/scripts/coccicheck
> index e04d328..a1c4197 100755
> --- a/scripts/coccicheck
> +++ b/scripts/coccicheck
> @@ -257,6 +257,10 @@ if [ "$COCCI" = "" ] ; then
> for f in `find $srctree/scripts/coccinelle/ -name '*.cocci' -type f | sort`; do
> coccinelle $f
> done
> +elif [ -d "$COCCI" ] ; then
> + for f in `find $COCCI/ -name '*.cocci' -type f | sort`; do
> + coccinelle $f
> + done
> else
> coccinelle $COCCI
> fi
Thanks for the contribution. I'm not that knowledgeable about these
scripts. What is the relation between the last two if branches? If the
first one fails, does that mean that $COCCI has no definition? In that
case, is the final else useful?
thanks,
julia
Powered by blists - more mailing lists