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: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Fri, 3 Jan 2014 14:24:32 +0100
From:	mmarek <mmarek@...e.cz>
To:	Steven Rostedt <rostedt@...dmis.org>
Cc:	Stephen Boyd <sboyd@...eaurora.org>,
	Andrew Morton <akpm@...ux-foundation.org>,
	Geert Uytterhoeven <geert@...ux-m68k.org>,
	LKML <linux-kernel@...r.kernel.org>,
	linux-kbuild <linux-kbuild@...r.kernel.org>,
	Yang Bai <hamo.by@...il.com>
Subject: Re: [PATCH] scripts: Have make TAGS not include structure members

On Tue, Nov 19, 2013 at 07:34:14PM -0500, Steven Rostedt wrote:
> I wasn't going to use this change, but instead add this change:
[...]
> --- linux-trace.git.orig/scripts/tags.sh	2013-11-19 19:29:34.352371615 -0500
> +++ linux-trace.git/scripts/tags.sh	2013-11-19 19:32:37.821152204 -0500
> @@ -218,7 +218,7 @@ exuberant()
>  
>  emacs()
>  {
> -	all_target_sources | xargs $1 -a                        \
> +	all_target_sources | xargs $@ -a                        \
>  	--regex='/^\(ENTRY\|_GLOBAL\)(\([^)]*\)).*/\2/'         \
>  	--regex='/^SYSCALL_DEFINE[0-9]?(\([^,)]*\).*/sys_\1/'   \
>  	--regex='/^TRACE_EVENT(\([^,)]*\).*/trace_\1/'		\
> @@ -263,7 +263,7 @@ xtags()
>  	if $1 --version 2>&1 | grep -iq exuberant; then
>  		exuberant $1
>  	elif $1 --version 2>&1 | grep -iq emacs; then
> -		emacs $1
> +		emacs $@
>  	else
>  		all_target_sources | xargs $1 -a
>          fi
> @@ -313,7 +313,7 @@ case "$1" in
>  
>  	"TAGS")
>  		rm -f TAGS
> -		xtags etags
> +		xtags etags --no-members
>  		remove_structs=y


The logic looks OK, but it is not completely obvious that $@ means
'etags --no-members, iff called as etags'. How about using a more
descriptive variable like this?

diff --git a/scripts/tags.sh b/scripts/tags.sh
index 58c4559..3afc479 100755
--- a/scripts/tags.sh
+++ b/scripts/tags.sh
@@ -219,7 +219,7 @@ exuberant()
 
 emacs()
 {
-	all_target_sources | xargs $1 -a                        \
+	all_target_sources | xargs $1 $no_members -a            \
 	--regex='/^\(ENTRY\|_GLOBAL\)(\([^)]*\)).*/\2/'         \
 	--regex='/^SYSCALL_DEFINE[0-9]?(\([^,)]*\).*/sys_\1/'   \
 	--regex='/^TRACE_EVENT(\([^,)]*\).*/trace_\1/'		\
@@ -308,12 +308,15 @@ case "$1" in
 
 	"tags")
 		rm -f tags
+		no_members=
 		xtags ctags
 		remove_structs=y
 		;;
 
 	"TAGS")
 		rm -f TAGS
+		# Do not index struct members when generating Emacs TAGS
+		no_members=--no-members
 		xtags etags
 		remove_structs=y
 		;;

Michal
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ