Skip to content

Commit

Permalink
checksyscalls: Fix stand-alone usage
Browse files Browse the repository at this point in the history
The usage help in the comments
  - refers to the wrong script name,
  - doesn't mention that $srctree must be set.

Hence correct the script name, and derive the source tree path from the script
path, so we no longer need to rely on $srctree being set by the caller.

Signed-off-by: Geert Uytterhoeven <[email protected]>
Acked-by: Sam Ravnborg <[email protected]>
Signed-off-by: Michal Marek <[email protected]>
  • Loading branch information
geertu authored and michal42 committed Dec 20, 2010
1 parent 1121584 commit 6e5f685
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions scripts/checksyscalls.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
# and listed below so they are ignored.
#
# Usage:
# syscallchk gcc gcc-options
# checksyscalls.sh gcc gcc-options
#

ignore_list() {
Expand Down Expand Up @@ -204,5 +204,5 @@ sed -n -e '/^\#define/ s/[^_]*__NR_\([^[:space:]]*\).*/\
\#endif/p' $1
}

(ignore_list && syscall_list ${srctree}/arch/x86/include/asm/unistd_32.h) | \
(ignore_list && syscall_list $(dirname $0)/../arch/x86/include/asm/unistd_32.h) | \
$* -E -x c - > /dev/null

0 comments on commit 6e5f685

Please sign in to comment.