lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <5e1b0401-db1e-a7a4-787c-4b93d02f5b73@collabora.com>
Date:   Thu, 29 Dec 2022 14:33:15 +0200
From:   Cristian Ciocaltea <cristian.ciocaltea@...labora.com>
To:     Kevin Hao <haokexin@...il.com>, linux-kernel@...r.kernel.org
Cc:     Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        Vipin Sharma <vipinsh@...gle.com>
Subject: Re: [PATCH] scripts/tags.sh: Fix the Kconfig tags generation when
 using latest ctags


On 12/29/22 07:54, Kevin Hao wrote:
> The Kconfig language has already been built-in in the latest ctags, so
> it would error exit if we try to define it as an user-defined language
> via '--langdef=kconfig'. This results that there is no Kconfig tags in
> the final tag file. Fix this by skipping the user Kconfig definition for
> the latest ctags.
> 
> Signed-off-by: Kevin Hao <haokexin@...il.com>
> ---
>   scripts/tags.sh | 10 ++++++----
>   1 file changed, 6 insertions(+), 4 deletions(-)
> 
> diff --git a/scripts/tags.sh b/scripts/tags.sh
> index e137cf15aae9..c56b13ae3fdf 100755
> --- a/scripts/tags.sh
> +++ b/scripts/tags.sh
> @@ -264,10 +264,12 @@ exuberant()
>   	--$CTAGS_EXTRA=+fq --c-kinds=+px --fields=+iaS --langmap=c:+.h \
>   	"${regex[@]}"
>   
> -	setup_regex exuberant kconfig
> -	all_kconfigs | xargs $1 -a                              \
> -	--langdef=kconfig --language-force=kconfig "${regex[@]}"
> -
> +	KCONFIG_ARGS=""
> +	if ! $1 --list-languages | grep -iq kconfig; then
> +		setup_regex exuberant kconfig
> +		KCONFIG_ARGS="--langdef=kconfig --language-force=kconfig ${regex[@]}"
> +	fi
> +	all_kconfigs | xargs $1 -a $KCONFIG_ARGS
>   }

The 'regex' array needs quoting to prevent word splitting/globbing. I 
would suggest to transform 'KCONFIG_ARGS' into an array as well:

KCONFIG_ARGS=()
if ! $1 --list-languages | grep -iq kconfig; then
	setup_regex exuberant kconfig
	KCONFIG_ARGS=(--langdef=kconfig --language-force=kconfig "${regex[@]}")
fi
all_kconfigs | xargs $1 -a "${KCONFIG_ARGS[@]}"


>   emacs()

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ