sync-check.sh 584 B

123456789101112131415161718192021222324252627282930
  1. #!/bin/sh
  2. # SPDX-License-Identifier: GPL-2.0
  3. FILES='
  4. arch/x86/lib/insn.c
  5. arch/x86/lib/inat.c
  6. arch/x86/lib/x86-opcode-map.txt
  7. arch/x86/tools/gen-insn-attr-x86.awk
  8. arch/x86/include/asm/insn.h
  9. arch/x86/include/asm/inat.h
  10. arch/x86/include/asm/inat_types.h
  11. arch/x86/include/asm/orc_types.h
  12. '
  13. check()
  14. {
  15. local file=$1
  16. diff $file ../../$file > /dev/null ||
  17. echo "Warning: synced file at 'tools/objtool/$file' differs from latest kernel version at '$file'"
  18. }
  19. if [ ! -d ../../kernel ] || [ ! -d ../../tools ] || [ ! -d ../objtool ]; then
  20. exit 0
  21. fi
  22. for i in $FILES; do
  23. check $i
  24. done