blob: 576fedeb6642f3bc3358a4b18fe84e3997b476e5 [file] [log] [blame]
Wichert Akkerman76baf7c1999-02-19 00:21:36 +00001/*
2 * Copyright (c) 1993 Branko Lankester <branko@hacktic.nl>
3 * Copyright (c) 1993, 1994, 1995 Rick Sladkey <jrs@world.std.com>
4 * All rights reserved.
5 *
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions
8 * are met:
9 * 1. Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer.
11 * 2. Redistributions in binary form must reproduce the above copyright
12 * notice, this list of conditions and the following disclaimer in the
13 * documentation and/or other materials provided with the distribution.
14 * 3. The name of the author may not be used to endorse or promote products
15 * derived from this software without specific prior written permission.
16 *
17 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
18 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
19 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
20 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
21 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
22 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
23 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
24 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
25 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
26 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Wichert Akkerman76baf7c1999-02-19 00:21:36 +000027 */
28
Dmitry V. Levin44f0ed12013-05-01 15:56:22 +000029#ifndef HAVE_STRUCT___OLD_KERNEL_STAT
30#define sys_oldfstat printargs
31#define sys_oldstat printargs
32#endif
33
Wichert Akkerman76baf7c1999-02-19 00:21:36 +000034/* still unfinished */
Dmitry V. Levine78f02a2015-01-12 18:53:32 +000035#define sys_bpf printargs
36#define sys_execveat printargs
37#define sys_getrandom printargs
Wichert Akkerman76baf7c1999-02-19 00:21:36 +000038#define sys_ioperm printargs
Wichert Akkerman76baf7c1999-02-19 00:21:36 +000039#define sys_iopl printargs
Dmitry V. Levincbd4e922013-05-08 16:36:29 +000040#define sys_kcmp printargs
Dmitry V. Levine78f02a2015-01-12 18:53:32 +000041#define sys_kexec_file_load printargs
Dmitry V. Levinb9e897d2011-10-12 19:03:29 +000042#define sys_lookup_dcookie printargs
Dmitry V. Levine78f02a2015-01-12 18:53:32 +000043#define sys_memfd_create printargs
Dmitry V. Levin00ebeee2011-11-26 23:37:23 +000044#define sys_name_to_handle_at printargs
Dmitry V. Levin00ebeee2011-11-26 23:37:23 +000045#define sys_open_by_handle_at printargs
Mike Frysingere971da42014-08-14 04:05:41 -040046#define sys_sched_getattr printargs
47#define sys_sched_setattr printargs
Dmitry V. Levine78f02a2015-01-12 18:53:32 +000048#define sys_seccomp printargs
Wichert Akkerman76baf7c1999-02-19 00:21:36 +000049#define sys_sysfs printargs
Dmitry V. Levin6bbe6962012-03-11 15:43:04 +000050#define sys_vm86 printargs
Dmitry V. Levine78f02a2015-01-12 18:53:32 +000051#define sys_vm86old printargs
Wichert Akkerman76baf7c1999-02-19 00:21:36 +000052
Roland McGrath67ecd632002-12-15 23:58:21 +000053/* machine-specific */
Dmitry V. Levin662221c2014-04-09 12:46:05 +000054#if !(defined I386 || defined X86_64 || defined X32)
55# define sys_modify_ldt printargs
56# ifndef M68K
57# define sys_get_thread_area printargs
Dmitry V. Levin15bc2812014-04-09 13:14:44 +000058# ifndef MIPS
59# define sys_set_thread_area printargs
60# endif
Dmitry V. Levin662221c2014-04-09 12:46:05 +000061# endif
Andreas Schwab58743222010-05-28 22:28:51 +020062#endif
Roland McGrath67ecd632002-12-15 23:58:21 +000063
Wichert Akkerman76baf7c1999-02-19 00:21:36 +000064/* like another call */
Dmitry V. Levin9e384842011-10-12 16:40:17 +000065#define sys_acct sys_chdir
Dmitry V. Levinad178c02011-11-28 22:48:53 +000066#define sys_chroot sys_chdir
Dmitry V. Levin9e384842011-10-12 16:40:17 +000067#define sys_clock_getres sys_clock_gettime
Wichert Akkerman76baf7c1999-02-19 00:21:36 +000068#define sys_fchdir sys_close
Dmitry V. Levin9e384842011-10-12 16:40:17 +000069#define sys_fdatasync sys_close
Dmitry V. Levin531af482012-03-11 15:28:03 +000070#define sys_fsync sys_close
Denys Vlasenko72879c62012-02-27 14:18:02 +010071#define sys_getegid sys_getuid
Dmitry V. Levin80f7db12014-12-13 21:49:01 +000072#define sys_getegid16 sys_geteuid16
Dmitry V. Levin6bbe6962012-03-11 15:43:04 +000073#define sys_geteuid sys_getuid
Dmitry V. Levin80f7db12014-12-13 21:49:01 +000074#define sys_geteuid16 sys_getuid16
Dmitry V. Levin9e384842011-10-12 16:40:17 +000075#define sys_getgid sys_getuid
Dmitry V. Levin80f7db12014-12-13 21:49:01 +000076#define sys_getgid16 sys_getuid16
Dmitry V. Levin37548c42014-12-02 21:36:04 +000077#define sys_getpeername sys_getsockname
Denys Vlasenko72879c62012-02-27 14:18:02 +010078#define sys_getresgid sys_getresuid
Dmitry V. Levin80f7db12014-12-13 21:49:01 +000079#define sys_getresgid16 sys_getresuid16
Dmitry V. Levin44f0ed12013-05-01 15:56:22 +000080#define sys_lstat sys_stat
81#define sys_lstat64 sys_stat64
Dmitry V. Levin6355a1f2014-12-01 18:24:55 +000082#define sys_mkdir sys_chmod
83#define sys_mkdirat sys_fchmodat
Dmitry V. Levin9e384842011-10-12 16:40:17 +000084#define sys_mlock sys_munmap
Dmitry V. Levinad178c02011-11-28 22:48:53 +000085#define sys_mq_unlink sys_chdir
Dmitry V. Levin9e384842011-10-12 16:40:17 +000086#define sys_munlock sys_munmap
Dmitry V. Levin44f0ed12013-05-01 15:56:22 +000087#define sys_oldlstat sys_oldstat
Dmitry V. Levinad178c02011-11-28 22:48:53 +000088#define sys_pivotroot sys_link
89#define sys_rename sys_link
90#define sys_rmdir sys_chdir
Denys Vlasenkoaea4b872012-02-28 16:39:44 +010091#define sys_sched_get_priority_max sys_sched_get_priority_min
Dmitry V. Levin1e8ed072012-03-11 21:57:57 +000092#define sys_set_robust_list sys_munmap
Dmitry V. Levin907df1e2014-12-02 21:42:34 +000093#define sys_setdomainname sys_sethostname
Dmitry V. Levin6bbe6962012-03-11 15:43:04 +000094#define sys_setfsgid sys_setfsuid
Dmitry V. Levin80f7db12014-12-13 21:49:01 +000095#define sys_setfsgid16 sys_setfsuid16
Dmitry V. Levin6bbe6962012-03-11 15:43:04 +000096#define sys_setgid sys_setuid
Dmitry V. Levin80f7db12014-12-13 21:49:01 +000097#define sys_setgid16 sys_setuid16
Dmitry V. Levin6bbe6962012-03-11 15:43:04 +000098#define sys_setregid sys_setreuid
Dmitry V. Levin80f7db12014-12-13 21:49:01 +000099#define sys_setregid16 sys_setreuid16
Dmitry V. Levin6bbe6962012-03-11 15:43:04 +0000100#define sys_setresgid sys_setresuid
Dmitry V. Levin80f7db12014-12-13 21:49:01 +0000101#define sys_setresgid16 sys_setresuid16
Dmitry V. Levin82385902014-12-02 20:47:30 +0000102#define sys_stime sys_time
Dmitry V. Levin9e384842011-10-12 16:40:17 +0000103#define sys_swapoff sys_chdir
Dmitry V. Levinad178c02011-11-28 22:48:53 +0000104#define sys_symlink sys_link
Dmitry V. Levin00ebeee2011-11-26 23:37:23 +0000105#define sys_syncfs sys_close
Dmitry V. Levin9e384842011-10-12 16:40:17 +0000106#define sys_umount sys_chdir
Dmitry V. Levinad178c02011-11-28 22:48:53 +0000107#define sys_unlink sys_chdir
Dmitry V. Levin9e384842011-10-12 16:40:17 +0000108#define sys_uselib sys_chdir
Dmitry V. Levin65563152014-05-12 13:43:10 +0000109#define sys_vfork sys_fork
Wichert Akkerman76baf7c1999-02-19 00:21:36 +0000110
111/* printargs does the right thing */
Wichert Akkerman76baf7c1999-02-19 00:21:36 +0000112#define sys_getpgid printargs
Dmitry V. Levin9e384842011-10-12 16:40:17 +0000113#define sys_getpid printargs
114#define sys_getppid printargs
Dmitry V. Levinb9e897d2011-10-12 19:03:29 +0000115#define sys_gettid printargs
Dmitry V. Levin9e384842011-10-12 16:40:17 +0000116#define sys_idle printargs
Dmitry V. Levinb9e897d2011-10-12 19:03:29 +0000117#define sys_inotify_init printargs
Dmitry V. Levin9e384842011-10-12 16:40:17 +0000118#define sys_munlockall printargs
119#define sys_pause printargs
Dmitry V. Levinb9e897d2011-10-12 19:03:29 +0000120#define sys_rt_sigreturn printargs
Dmitry V. Levin9e384842011-10-12 16:40:17 +0000121#define sys_sched_yield printargs
Dmitry V. Levin6bbe6962012-03-11 15:43:04 +0000122#define sys_setsid printargs
Dmitry V. Levinb9e897d2011-10-12 19:03:29 +0000123#define sys_set_tid_address printargs
Dmitry V. Levin6bbe6962012-03-11 15:43:04 +0000124#define sys_setup printargs
Dmitry V. Levin9e384842011-10-12 16:40:17 +0000125#define sys_sync printargs
126#define sys_timer_delete printargs
127#define sys_timer_getoverrun printargs
128#define sys_vhangup printargs
Wichert Akkerman76baf7c1999-02-19 00:21:36 +0000129
Denys Vlasenko72879c62012-02-27 14:18:02 +0100130/* printargs_lu/ld does the right thing */
Dmitry V. Levin6bbe6962012-03-11 15:43:04 +0000131#define sys_alarm printargs_lu
Denys Vlasenko72879c62012-02-27 14:18:02 +0100132#define sys_getpgrp printargs_lu
Dmitry V. Levin6bbe6962012-03-11 15:43:04 +0000133#define sys_getsid printargs_lu
134#define sys_nice printargs_ld
Denys Vlasenko72879c62012-02-27 14:18:02 +0100135#define sys_setpgid printargs_lu
136#define sys_setpgrp printargs_lu
Denys Vlasenko72879c62012-02-27 14:18:02 +0100137
Wichert Akkerman76baf7c1999-02-19 00:21:36 +0000138/* unimplemented */
Dmitry V. Levin9e384842011-10-12 16:40:17 +0000139#define sys_afs_syscall printargs
140#define sys_break printargs
Wichert Akkerman76baf7c1999-02-19 00:21:36 +0000141#define sys_ftime printargs
Dmitry V. Levin9e384842011-10-12 16:40:17 +0000142#define sys_get_kernel_syms printargs
143#define sys_gtty printargs
Wichert Akkerman76baf7c1999-02-19 00:21:36 +0000144#define sys_lock printargs
145#define sys_mpx printargs
Dmitry V. Levinf33ee912011-11-28 15:53:20 +0000146#define sys_nfsservctl printargs
Dmitry V. Levin9e384842011-10-12 16:40:17 +0000147#define sys_phys printargs
Wichert Akkerman76baf7c1999-02-19 00:21:36 +0000148#define sys_profil printargs
Dmitry V. Levin9e384842011-10-12 16:40:17 +0000149#define sys_prof printargs
Dmitry V. Levinb9e897d2011-10-12 19:03:29 +0000150#define sys_security printargs
Dmitry V. Levin9e384842011-10-12 16:40:17 +0000151#define sys_stty printargs
Dmitry V. Levinb9e897d2011-10-12 19:03:29 +0000152#define sys_tuxcall printargs
Dmitry V. Levin9e384842011-10-12 16:40:17 +0000153#define sys_ulimit printargs
Wichert Akkerman76baf7c1999-02-19 00:21:36 +0000154#define sys_ustat printargs
Dmitry V. Levinb9e897d2011-10-12 19:03:29 +0000155#define sys_vserver printargs
Wichert Akkerman76baf7c1999-02-19 00:21:36 +0000156
157/* deprecated */
Dmitry V. Levin9e384842011-10-12 16:40:17 +0000158#define sys_bdflush printargs
Wichert Akkerman76baf7c1999-02-19 00:21:36 +0000159#define sys_oldolduname printargs
Dmitry V. Levin6bbe6962012-03-11 15:43:04 +0000160#define sys_olduname printargs
Wichert Akkerman76baf7c1999-02-19 00:21:36 +0000161
162/* no library support */
163#ifndef HAVE_SENDMSG
Dmitry V. Levin9e384842011-10-12 16:40:17 +0000164#define sys_recvmsg printargs
Dmitry V. Levin6bbe6962012-03-11 15:43:04 +0000165#define sys_sendmsg printargs
Wichert Akkerman76baf7c1999-02-19 00:21:36 +0000166#endif
167
Denys Vlasenkocc902912013-03-05 16:50:12 +0100168/* Who has STREAMS syscalls?
169 * Linux hasn't. Solaris has (had?).
170 * Just in case I miss something, retain in for Sparc.
171 * Note: SYS_get/putpmsg may be defined even though syscalls
172 * return ENOSYS. Can't just check defined(SYS_getpmsg).
173 */
174#if (!defined(SPARC) && !defined(SPARC64)) || !defined(SYS_getpmsg)
Dmitry V. Levin9e384842011-10-12 16:40:17 +0000175#define sys_getpmsg printargs
Roland McGrath8bcf3572003-01-24 04:39:46 +0000176#endif
Denys Vlasenkocc902912013-03-05 16:50:12 +0100177#if (!defined(SPARC) && !defined(SPARC64)) || !defined(SYS_putpmsg)
Dmitry V. Levin9e384842011-10-12 16:40:17 +0000178#define sys_putpmsg printargs
Roland McGrath8bcf3572003-01-24 04:39:46 +0000179#endif