diff options
Diffstat (limited to 'tools/perf/check-headers.sh')
| -rwxr-xr-x | tools/perf/check-headers.sh | 30 |
1 files changed, 17 insertions, 13 deletions
diff --git a/tools/perf/check-headers.sh b/tools/perf/check-headers.sh index 9aff89bc7535..10f333e2e825 100755 --- a/tools/perf/check-headers.sh +++ b/tools/perf/check-headers.sh | |||
| @@ -55,22 +55,26 @@ include/uapi/asm-generic/ioctls.h | |||
| 55 | include/uapi/asm-generic/mman-common.h | 55 | include/uapi/asm-generic/mman-common.h |
| 56 | ' | 56 | ' |
| 57 | 57 | ||
| 58 | check () { | 58 | check_2 () { |
| 59 | file=$1 | 59 | file1=$1 |
| 60 | file2=$2 | ||
| 60 | 61 | ||
| 61 | shift | 62 | shift |
| 62 | opts= | 63 | shift |
| 63 | while [ -n "$*" ]; do | ||
| 64 | opts="$opts \"$1\"" | ||
| 65 | shift | ||
| 66 | done | ||
| 67 | 64 | ||
| 68 | cmd="diff $opts ../$file ../../$file > /dev/null" | 65 | cmd="diff $* $file1 $file2 > /dev/null" |
| 69 | 66 | ||
| 70 | test -f ../../$file && | 67 | test -f $file2 && |
| 71 | eval $cmd || echo "Warning: Kernel ABI header at 'tools/$file' differs from latest version at '$file'" >&2 | 68 | eval $cmd || echo "Warning: Kernel ABI header at 'tools/$file' differs from latest version at '$file'" >&2 |
| 72 | } | 69 | } |
| 73 | 70 | ||
| 71 | check () { | ||
| 72 | file=$1 | ||
| 73 | |||
| 74 | shift | ||
| 75 | |||
| 76 | check_2 ../$file ../../$file $* | ||
| 77 | } | ||
| 74 | 78 | ||
| 75 | # Check if we have the kernel headers (tools/perf/../../include), else | 79 | # Check if we have the kernel headers (tools/perf/../../include), else |
| 76 | # we're probably on a detached tarball, so no point in trying to check | 80 | # we're probably on a detached tarball, so no point in trying to check |
| @@ -83,7 +87,7 @@ for i in $HEADERS; do | |||
| 83 | done | 87 | done |
| 84 | 88 | ||
| 85 | # diff with extra ignore lines | 89 | # diff with extra ignore lines |
| 86 | check arch/x86/lib/memcpy_64.S -I "^EXPORT_SYMBOL" -I "^#include <asm/export.h>" | 90 | check arch/x86/lib/memcpy_64.S '-I "^EXPORT_SYMBOL" -I "^#include <asm/export.h>"' |
| 87 | check arch/x86/lib/memset_64.S -I "^EXPORT_SYMBOL" -I "^#include <asm/export.h>" | 91 | check arch/x86/lib/memset_64.S '-I "^EXPORT_SYMBOL" -I "^#include <asm/export.h>"' |
| 88 | check include/uapi/asm-generic/mman.h -I "^#include <\(uapi/\)*asm-generic/mman-common.h>" | 92 | check include/uapi/asm-generic/mman.h '-I "^#include <\(uapi/\)*asm-generic/mman-common.h>"' |
| 89 | check include/uapi/linux/mman.h -I "^#include <\(uapi/\)*asm/mman.h>" | 93 | check include/uapi/linux/mman.h '-I "^#include <\(uapi/\)*asm/mman.h>"' |
