systbl_chk.c 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. /*
  2. * This file, when run through CPP produces a list of syscall numbers
  3. * in the order of systbl.h. That way we can check for gaps and syscalls
  4. * that are out of order.
  5. *
  6. * Unfortunately, we cannot check for the correct ordering of entries
  7. * using SYSX().
  8. *
  9. * Copyright © IBM Corporation
  10. *
  11. * This program is free software; you can redistribute it and/or
  12. * modify it under the terms of the GNU General Public License
  13. * as published by the Free Software Foundation; either version
  14. * 2 of the License, or (at your option) any later version.
  15. */
  16. #include <asm/unistd.h>
  17. #define SYSCALL(func) __NR_##func
  18. #define COMPAT_SYS(func) __NR_##func
  19. #define PPC_SYS(func) __NR_##func
  20. #ifdef CONFIG_PPC64
  21. #define OLDSYS(func) -1
  22. #define SYS32ONLY(func) -1
  23. #else
  24. #define OLDSYS(func) __NR_old##func
  25. #define SYS32ONLY(func) __NR_##func
  26. #endif
  27. #define SYSX(f, f3264, f32) -1
  28. #define SYSCALL_SPU(func) SYSCALL(func)
  29. #define COMPAT_SYS_SPU(func) COMPAT_SYS(func)
  30. #define PPC_SYS_SPU(func) PPC_SYS(func)
  31. #define SYSX_SPU(f, f3264, f32) SYSX(f, f3264, f32)
  32. /* Just insert a marker for ni_syscalls */
  33. #define __NR_ni_syscall -1
  34. /*
  35. * These are the known exceptions.
  36. * Hopefully, there will be no more.
  37. */
  38. #define __NR_llseek __NR__llseek
  39. #undef __NR_umount
  40. #define __NR_umount __NR_umount2
  41. #define __NR_old_getrlimit __NR_getrlimit
  42. #define __NR_newstat __NR_stat
  43. #define __NR_newlstat __NR_lstat
  44. #define __NR_newfstat __NR_fstat
  45. #define __NR_newuname __NR_uname
  46. #define __NR_sysctl __NR__sysctl
  47. #define __NR_olddebug_setcontext __NR_sys_debug_setcontext
  48. /* We call sys_ugetrlimit for syscall number __NR_getrlimit */
  49. #define getrlimit ugetrlimit
  50. START_TABLE
  51. #include <asm/systbl.h>
  52. END_TABLE __NR_syscalls