9#include "opt_compat.h" 10#include <sys/param.h> 11#include <sys/sysent.h> 12#include <sys/sysproto.h> 13#include <i386/linux/linux.h> 14#include <i386/linux/linux_proto.h> 15 16#define AS(name) (sizeof(struct name) / sizeof(register_t)) 17 18/* The casts are bogus but will do for now. */ 19struct sysent linux_sysent[] = { 20 { 0, (sy_call_t *)nosys }, /* 0 = setup */ 21 { SYF_MPSAFE | AS(sys_exit_args), (sy_call_t *)sys_exit }, /* 1 = exit */ 22 { SYF_MPSAFE | 0, (sy_call_t *)linux_fork }, /* 2 = linux_fork */ 23 { AS(read_args), (sy_call_t *)read }, /* 3 = read */ 24 { AS(write_args), (sy_call_t *)write }, /* 4 = write */ 25 { AS(linux_open_args), (sy_call_t *)linux_open }, /* 5 = linux_open */ 26 { AS(close_args), (sy_call_t *)close }, /* 6 = close */ 27 { AS(linux_waitpid_args), (sy_call_t *)linux_waitpid }, /* 7 = linux_waitpid */ 28 { AS(linux_creat_args), (sy_call_t *)linux_creat }, /* 8 = linux_creat */ 29 { AS(linux_link_args), (sy_call_t *)linux_link }, /* 9 = linux_link */ 30 { AS(linux_unlink_args), (sy_call_t *)linux_unlink }, /* 10 = linux_unlink */ 31 { AS(linux_execve_args), (sy_call_t *)linux_execve }, /* 11 = linux_execve */ 32 { AS(linux_chdir_args), (sy_call_t *)linux_chdir }, /* 12 = linux_chdir */ 33 { AS(linux_time_args), (sy_call_t *)linux_time }, /* 13 = linux_time */ 34 { AS(linux_mknod_args), (sy_call_t *)linux_mknod }, /* 14 = linux_mknod */ 35 { AS(linux_chmod_args), (sy_call_t *)linux_chmod }, /* 15 = linux_chmod */ 36 { AS(linux_lchown16_args), (sy_call_t *)linux_lchown16 }, /* 16 = linux_lchown16 */ 37 { 0, (sy_call_t *)nosys }, /* 17 = break */ 38 { AS(linux_stat_args), (sy_call_t *)linux_stat }, /* 18 = linux_stat */ 39 { AS(linux_lseek_args), (sy_call_t *)linux_lseek }, /* 19 = linux_lseek */ 40 { SYF_MPSAFE | 0, (sy_call_t *)linux_getpid }, /* 20 = linux_getpid */ 41 { AS(linux_mount_args), (sy_call_t *)linux_mount }, /* 21 = linux_mount */ 42 { AS(linux_oldumount_args), (sy_call_t *)linux_oldumount }, /* 22 = linux_oldumount */ 43 { AS(linux_setuid16_args), (sy_call_t *)linux_setuid16 }, /* 23 = linux_setuid16 */ 44 { 0, (sy_call_t *)linux_getuid16 }, /* 24 = linux_getuid16 */ 45 { 0, (sy_call_t *)linux_stime }, /* 25 = linux_stime */ 46 { AS(linux_ptrace_args), (sy_call_t *)linux_ptrace }, /* 26 = linux_ptrace */ 47 { AS(linux_alarm_args), (sy_call_t *)linux_alarm }, /* 27 = linux_alarm */ 48 { AS(linux_fstat_args), (sy_call_t *)linux_fstat }, /* 28 = linux_fstat */ 49 { 0, (sy_call_t *)linux_pause }, /* 29 = linux_pause */ 50 { AS(linux_utime_args), (sy_call_t *)linux_utime }, /* 30 = linux_utime */ 51 { 0, (sy_call_t *)nosys }, /* 31 = stty */ 52 { 0, (sy_call_t *)nosys }, /* 32 = gtty */ 53 { AS(linux_access_args), (sy_call_t *)linux_access }, /* 33 = linux_access */ 54 { AS(linux_nice_args), (sy_call_t *)linux_nice }, /* 34 = linux_nice */ 55 { 0, (sy_call_t *)nosys }, /* 35 = ftime */ 56 { 0, (sy_call_t *)sync }, /* 36 = sync */ 57 { AS(linux_kill_args), (sy_call_t *)linux_kill }, /* 37 = linux_kill */ 58 { AS(linux_rename_args), (sy_call_t *)linux_rename }, /* 38 = linux_rename */ 59 { AS(linux_mkdir_args), (sy_call_t *)linux_mkdir }, /* 39 = linux_mkdir */ 60 { AS(linux_rmdir_args), (sy_call_t *)linux_rmdir }, /* 40 = linux_rmdir */ 61 { AS(dup_args), (sy_call_t *)dup }, /* 41 = dup */ 62 { AS(linux_pipe_args), (sy_call_t *)linux_pipe }, /* 42 = linux_pipe */ 63 { AS(linux_times_args), (sy_call_t *)linux_times }, /* 43 = linux_times */ 64 { 0, (sy_call_t *)nosys }, /* 44 = prof */ 65 { AS(linux_brk_args), (sy_call_t *)linux_brk }, /* 45 = linux_brk */ 66 { AS(linux_setgid16_args), (sy_call_t *)linux_setgid16 }, /* 46 = linux_setgid16 */ 67 { 0, (sy_call_t *)linux_getgid16 }, /* 47 = linux_getgid16 */ 68 { AS(linux_signal_args), (sy_call_t *)linux_signal }, /* 48 = linux_signal */ 69 { 0, (sy_call_t *)linux_geteuid16 }, /* 49 = linux_geteuid16 */ 70 { 0, (sy_call_t *)linux_getegid16 }, /* 50 = linux_getegid16 */ 71 { AS(acct_args), (sy_call_t *)acct }, /* 51 = acct */ 72 { AS(linux_umount_args), (sy_call_t *)linux_umount }, /* 52 = linux_umount */ 73 { 0, (sy_call_t *)nosys }, /* 53 = lock */ 74 { AS(linux_ioctl_args), (sy_call_t *)linux_ioctl }, /* 54 = linux_ioctl */ 75 { AS(linux_fcntl_args), (sy_call_t *)linux_fcntl }, /* 55 = linux_fcntl */ 76 { 0, (sy_call_t *)nosys }, /* 56 = mpx */ 77 { AS(setpgid_args), (sy_call_t *)setpgid }, /* 57 = setpgid */ 78 { 0, (sy_call_t *)nosys }, /* 58 = ulimit */ 79 { 0, (sy_call_t *)linux_olduname }, /* 59 = linux_olduname */ 80 { AS(umask_args), (sy_call_t *)umask }, /* 60 = umask */ 81 { AS(chroot_args), (sy_call_t *)chroot }, /* 61 = chroot */ 82 { AS(linux_ustat_args), (sy_call_t *)linux_ustat }, /* 62 = linux_ustat */ 83 { AS(dup2_args), (sy_call_t *)dup2 }, /* 63 = dup2 */ 84 { 0, (sy_call_t *)getppid }, /* 64 = getppid */ 85 { 0, (sy_call_t *)getpgrp }, /* 65 = getpgrp */ 86 { 0, (sy_call_t *)setsid }, /* 66 = setsid */ 87 { AS(linux_sigaction_args), (sy_call_t *)linux_sigaction }, /* 67 = linux_sigaction */ 88 { 0, (sy_call_t *)linux_sgetmask }, /* 68 = linux_sgetmask */ 89 { AS(linux_ssetmask_args), (sy_call_t *)linux_ssetmask }, /* 69 = linux_ssetmask */ 90 { AS(linux_setreuid16_args), (sy_call_t *)linux_setreuid16 }, /* 70 = linux_setreuid16 */ 91 { AS(linux_setregid16_args), (sy_call_t *)linux_setregid16 }, /* 71 = linux_setregid16 */ 92 { AS(linux_sigsuspend_args), (sy_call_t *)linux_sigsuspend }, /* 72 = linux_sigsuspend */ 93 { SYF_MPSAFE | AS(linux_sigpending_args), (sy_call_t *)linux_sigpending }, /* 73 = linux_sigpending */ 94 { SYF_MPSAFE | AS(sethostname_args), (sy_call_t *)osethostname }, /* 74 = osethostname */ 95 { AS(linux_setrlimit_args), (sy_call_t *)linux_setrlimit }, /* 75 = linux_setrlimit */ 96 { AS(linux_old_getrlimit_args), (sy_call_t *)linux_old_getrlimit }, /* 76 = linux_old_getrlimit */ 97 { AS(getrusage_args), (sy_call_t *)getrusage }, /* 77 = getrusage */ 98 { AS(gettimeofday_args), (sy_call_t *)gettimeofday }, /* 78 = gettimeofday */ 99 { SYF_MPSAFE | AS(settimeofday_args), (sy_call_t *)settimeofday }, /* 79 = settimeofday */ 100 { AS(linux_getgroups16_args), (sy_call_t *)linux_getgroups16 }, /* 80 = linux_getgroups16 */ 101 { AS(linux_setgroups16_args), (sy_call_t *)linux_setgroups16 }, /* 81 = linux_setgroups16 */ 102 { AS(linux_old_select_args), (sy_call_t *)linux_old_select }, /* 82 = linux_old_select */ 103 { AS(linux_symlink_args), (sy_call_t *)linux_symlink }, /* 83 = linux_symlink */ 104 { AS(ostat_args), (sy_call_t *)ostat }, /* 84 = ostat */ 105 { AS(linux_readlink_args), (sy_call_t *)linux_readlink }, /* 85 = linux_readlink */ 106 { AS(linux_uselib_args), (sy_call_t *)linux_uselib }, /* 86 = linux_uselib */ 107 { AS(swapon_args), (sy_call_t *)swapon }, /* 87 = swapon */ 108 { AS(linux_reboot_args), (sy_call_t *)linux_reboot }, /* 88 = linux_reboot */ 109 { AS(linux_readdir_args), (sy_call_t *)linux_readdir }, /* 89 = linux_readdir */ 110 { AS(linux_mmap_args), (sy_call_t *)linux_mmap }, /* 90 = linux_mmap */ 111 { AS(munmap_args), (sy_call_t *)munmap }, /* 91 = munmap */ 112 { AS(linux_truncate_args), (sy_call_t *)linux_truncate }, /* 92 = linux_truncate */ 113 { AS(oftruncate_args), (sy_call_t *)oftruncate }, /* 93 = oftruncate */ 114 { AS(fchmod_args), (sy_call_t *)fchmod }, /* 94 = fchmod */ 115 { AS(fchown_args), (sy_call_t *)fchown }, /* 95 = fchown */ 116 { AS(getpriority_args), (sy_call_t *)getpriority }, /* 96 = getpriority */ 117 { AS(setpriority_args), (sy_call_t *)setpriority }, /* 97 = setpriority */ 118 { 0, (sy_call_t *)nosys }, /* 98 = profil */ 119 { AS(linux_statfs_args), (sy_call_t *)linux_statfs }, /* 99 = linux_statfs */ 120 { AS(linux_fstatfs_args), (sy_call_t *)linux_fstatfs }, /* 100 = linux_fstatfs */ 121 { AS(linux_ioperm_args), (sy_call_t *)linux_ioperm }, /* 101 = linux_ioperm */ 122 { AS(linux_socketcall_args), (sy_call_t *)linux_socketcall }, /* 102 = linux_socketcall */ 123 { AS(linux_syslog_args), (sy_call_t *)linux_syslog }, /* 103 = linux_syslog */ 124 { AS(linux_setitimer_args), (sy_call_t *)linux_setitimer }, /* 104 = linux_setitimer */ 125 { AS(linux_getitimer_args), (sy_call_t *)linux_getitimer }, /* 105 = linux_getitimer */ 126 { AS(linux_newstat_args), (sy_call_t *)linux_newstat }, /* 106 = linux_newstat */ 127 { AS(linux_newlstat_args), (sy_call_t *)linux_newlstat }, /* 107 = linux_newlstat */ 128 { AS(linux_newfstat_args), (sy_call_t *)linux_newfstat }, /* 108 = linux_newfstat */ 129 { 0, (sy_call_t *)linux_uname }, /* 109 = linux_uname */ 130 { AS(linux_iopl_args), (sy_call_t *)linux_iopl }, /* 110 = linux_iopl */ 131 { 0, (sy_call_t *)linux_vhangup }, /* 111 = linux_vhangup */ 132 { 0, (sy_call_t *)nosys }, /* 112 = idle */ 133 { 0, (sy_call_t *)linux_vm86old }, /* 113 = linux_vm86old */ 134 { AS(linux_wait4_args), (sy_call_t *)linux_wait4 }, /* 114 = linux_wait4 */ 135 { 0, (sy_call_t *)linux_swapoff }, /* 115 = linux_swapoff */ 136 { AS(linux_sysinfo_args), (sy_call_t *)linux_sysinfo }, /* 116 = linux_sysinfo */ 137 { AS(linux_ipc_args), (sy_call_t *)linux_ipc }, /* 117 = linux_ipc */ 138 { AS(fsync_args), (sy_call_t *)fsync }, /* 118 = fsync */ 139 { AS(linux_sigreturn_args), (sy_call_t *)linux_sigreturn }, /* 119 = linux_sigreturn */ 140 { AS(linux_clone_args), (sy_call_t *)linux_clone }, /* 120 = linux_clone */ 141 { SYF_MPSAFE | AS(setdomainname_args), (sy_call_t *)setdomainname }, /* 121 = setdomainname */ 142 { AS(linux_newuname_args), (sy_call_t *)linux_newuname }, /* 122 = linux_newuname */ 143 { AS(linux_modify_ldt_args), (sy_call_t *)linux_modify_ldt }, /* 123 = linux_modify_ldt */ 144 { 0, (sy_call_t *)linux_adjtimex }, /* 124 = linux_adjtimex */ 145 { AS(mprotect_args), (sy_call_t *)mprotect }, /* 125 = mprotect */ 146 { AS(linux_sigprocmask_args), (sy_call_t *)linux_sigprocmask }, /* 126 = linux_sigprocmask */ 147 { 0, (sy_call_t *)linux_create_module }, /* 127 = linux_create_module */ 148 { 0, (sy_call_t *)linux_init_module }, /* 128 = linux_init_module */ 149 { 0, (sy_call_t *)linux_delete_module }, /* 129 = linux_delete_module */ 150 { 0, (sy_call_t *)linux_get_kernel_syms }, /* 130 = linux_get_kernel_syms */ 151 { 0, (sy_call_t *)linux_quotactl }, /* 131 = linux_quotactl */ 152 { AS(getpgid_args), (sy_call_t *)getpgid }, /* 132 = getpgid */ 153 { AS(fchdir_args), (sy_call_t *)fchdir }, /* 133 = fchdir */ 154 { 0, (sy_call_t *)linux_bdflush }, /* 134 = linux_bdflush */ 155 { AS(linux_sysfs_args), (sy_call_t *)linux_sysfs }, /* 135 = linux_sysfs */ 156 { AS(linux_personality_args), (sy_call_t *)linux_personality }, /* 136 = linux_personality */ 157 { 0, (sy_call_t *)nosys }, /* 137 = afs_syscall */ 158 { AS(linux_setfsuid16_args), (sy_call_t *)linux_setfsuid16 }, /* 138 = linux_setfsuid16 */ 159 { AS(linux_setfsgid16_args), (sy_call_t *)linux_setfsgid16 }, /* 139 = linux_setfsgid16 */ 160 { AS(linux_llseek_args), (sy_call_t *)linux_llseek }, /* 140 = linux_llseek */ 161 { AS(linux_getdents_args), (sy_call_t *)linux_getdents }, /* 141 = linux_getdents */ 162 { AS(linux_select_args), (sy_call_t *)linux_select }, /* 142 = linux_select */ 163 { AS(flock_args), (sy_call_t *)flock }, /* 143 = flock */ 164 { AS(linux_msync_args), (sy_call_t *)linux_msync }, /* 144 = linux_msync */ 165 { AS(readv_args), (sy_call_t *)readv }, /* 145 = readv */ 166 { AS(writev_args), (sy_call_t *)writev }, /* 146 = writev */ 167 { AS(linux_getsid_args), (sy_call_t *)linux_getsid }, /* 147 = linux_getsid */ 168 { AS(linux_fdatasync_args), (sy_call_t *)linux_fdatasync }, /* 148 = linux_fdatasync */ 169 { AS(linux_sysctl_args), (sy_call_t *)linux_sysctl }, /* 149 = linux_sysctl */ 170 { AS(mlock_args), (sy_call_t *)mlock }, /* 150 = mlock */ 171 { AS(munlock_args), (sy_call_t *)munlock }, /* 151 = munlock */ 172 { AS(mlockall_args), (sy_call_t *)mlockall }, /* 152 = mlockall */ 173 { 0, (sy_call_t *)munlockall }, /* 153 = munlockall */ 174 { AS(sched_setparam_args), (sy_call_t *)sched_setparam }, /* 154 = sched_setparam */ 175 { AS(sched_getparam_args), (sy_call_t *)sched_getparam }, /* 155 = sched_getparam */ 176 { AS(linux_sched_setscheduler_args), (sy_call_t *)linux_sched_setscheduler }, /* 156 = linux_sched_setscheduler */ 177 { AS(linux_sched_getscheduler_args), (sy_call_t *)linux_sched_getscheduler }, /* 157 = linux_sched_getscheduler */ 178 { 0, (sy_call_t *)sched_yield }, /* 158 = sched_yield */ 179 { AS(linux_sched_get_priority_max_args), (sy_call_t *)linux_sched_get_priority_max }, /* 159 = linux_sched_get_priority_max */ 180 { AS(linux_sched_get_priority_min_args), (sy_call_t *)linux_sched_get_priority_min }, /* 160 = linux_sched_get_priority_min */ 181 { AS(sched_rr_get_interval_args), (sy_call_t *)sched_rr_get_interval }, /* 161 = sched_rr_get_interval */ 182 { SYF_MPSAFE | AS(nanosleep_args), (sy_call_t *)nanosleep }, /* 162 = nanosleep */ 183 { AS(linux_mremap_args), (sy_call_t *)linux_mremap }, /* 163 = linux_mremap */ 184 { AS(linux_setresuid16_args), (sy_call_t *)linux_setresuid16 }, /* 164 = linux_setresuid16 */ 185 { AS(linux_getresuid16_args), (sy_call_t *)linux_getresuid16 }, /* 165 = linux_getresuid16 */ 186 { 0, (sy_call_t *)linux_vm86 }, /* 166 = linux_vm86 */ 187 { 0, (sy_call_t *)linux_query_module }, /* 167 = linux_query_module */ 188 { AS(poll_args), (sy_call_t *)poll }, /* 168 = poll */ 189 { 0, (sy_call_t *)linux_nfsservctl }, /* 169 = linux_nfsservctl */ 190 { AS(linux_setresgid16_args), (sy_call_t *)linux_setresgid16 }, /* 170 = linux_setresgid16 */ 191 { AS(linux_getresgid16_args), (sy_call_t *)linux_getresgid16 }, /* 171 = linux_getresgid16 */ 192 { 0, (sy_call_t *)linux_prctl }, /* 172 = linux_prctl */ 193 { AS(linux_rt_sigreturn_args), (sy_call_t *)linux_rt_sigreturn }, /* 173 = linux_rt_sigreturn */ 194 { AS(linux_rt_sigaction_args), (sy_call_t *)linux_rt_sigaction }, /* 174 = linux_rt_sigaction */ 195 { AS(linux_rt_sigprocmask_args), (sy_call_t *)linux_rt_sigprocmask }, /* 175 = linux_rt_sigprocmask */ 196 { 0, (sy_call_t *)linux_rt_sigpending }, /* 176 = linux_rt_sigpending */ 197 { 0, (sy_call_t *)linux_rt_sigtimedwait }, /* 177 = linux_rt_sigtimedwait */ 198 { 0, (sy_call_t *)linux_rt_sigqueueinfo }, /* 178 = linux_rt_sigqueueinfo */ 199 { AS(linux_rt_sigsuspend_args), (sy_call_t *)linux_rt_sigsuspend }, /* 179 = linux_rt_sigsuspend */ 200 { AS(linux_pread_args), (sy_call_t *)linux_pread }, /* 180 = linux_pread */ 201 { AS(linux_pwrite_args), (sy_call_t *)linux_pwrite }, /* 181 = linux_pwrite */ 202 { AS(linux_chown16_args), (sy_call_t *)linux_chown16 }, /* 182 = linux_chown16 */ 203 { AS(linux_getcwd_args), (sy_call_t *)linux_getcwd }, /* 183 = linux_getcwd */ 204 { 0, (sy_call_t *)linux_capget }, /* 184 = linux_capget */ 205 { 0, (sy_call_t *)linux_capset }, /* 185 = linux_capset */ 206 { AS(linux_sigaltstack_args), (sy_call_t *)linux_sigaltstack }, /* 186 = linux_sigaltstack */ 207 { 0, (sy_call_t *)linux_sendfile }, /* 187 = linux_sendfile */ 208 { 0, (sy_call_t *)nosys }, /* 188 = getpmsg */ 209 { 0, (sy_call_t *)nosys }, /* 189 = putpmsg */ 210 { SYF_MPSAFE | 0, (sy_call_t *)linux_vfork }, /* 190 = linux_vfork */ 211 { AS(linux_getrlimit_args), (sy_call_t *)linux_getrlimit }, /* 191 = linux_getrlimit */ 212 { AS(linux_mmap2_args), (sy_call_t *)linux_mmap2 }, /* 192 = linux_mmap2 */ 213 { AS(linux_truncate64_args), (sy_call_t *)linux_truncate64 }, /* 193 = linux_truncate64 */ 214 { AS(linux_ftruncate64_args), (sy_call_t *)linux_ftruncate64 }, /* 194 = linux_ftruncate64 */ 215 { AS(linux_stat64_args), (sy_call_t *)linux_stat64 }, /* 195 = linux_stat64 */ 216 { AS(linux_lstat64_args), (sy_call_t *)linux_lstat64 }, /* 196 = linux_lstat64 */ 217 { AS(linux_fstat64_args), (sy_call_t *)linux_fstat64 }, /* 197 = linux_fstat64 */ 218 { AS(linux_lchown_args), (sy_call_t *)linux_lchown }, /* 198 = linux_lchown */ 219 { SYF_MPSAFE | 0, (sy_call_t *)linux_getuid }, /* 199 = linux_getuid */ 220 { SYF_MPSAFE | 0, (sy_call_t *)linux_getgid }, /* 200 = linux_getgid */ 221 { 0, (sy_call_t *)geteuid }, /* 201 = geteuid */ 222 { 0, (sy_call_t *)getegid }, /* 202 = getegid */ 223 { AS(setreuid_args), (sy_call_t *)setreuid }, /* 203 = setreuid */ 224 { AS(setregid_args), (sy_call_t *)setregid }, /* 204 = setregid */ 225 { AS(linux_getgroups_args), (sy_call_t *)linux_getgroups }, /* 205 = linux_getgroups */ 226 { AS(linux_setgroups_args), (sy_call_t *)linux_setgroups }, /* 206 = linux_setgroups */ 227 { AS(fchown_args), (sy_call_t *)fchown }, /* 207 = fchown */ 228 { AS(setresuid_args), (sy_call_t *)setresuid }, /* 208 = setresuid */ 229 { AS(getresuid_args), (sy_call_t *)getresuid }, /* 209 = getresuid */ 230 { AS(setresgid_args), (sy_call_t *)setresgid }, /* 210 = setresgid */ 231 { AS(getresgid_args), (sy_call_t *)getresgid }, /* 211 = getresgid */ 232 { AS(linux_chown_args), (sy_call_t *)linux_chown }, /* 212 = linux_chown */ 233 { AS(setuid_args), (sy_call_t *)setuid }, /* 213 = setuid */ 234 { AS(setgid_args), (sy_call_t *)setgid }, /* 214 = setgid */ 235 { AS(linux_setfsuid_args), (sy_call_t *)linux_setfsuid }, /* 215 = linux_setfsuid */ 236 { AS(linux_setfsgid_args), (sy_call_t *)linux_setfsgid }, /* 216 = linux_setfsgid */ 237 { AS(linux_pivot_root_args), (sy_call_t *)linux_pivot_root }, /* 217 = linux_pivot_root */ 238 { AS(linux_mincore_args), (sy_call_t *)linux_mincore }, /* 218 = linux_mincore */ 239 { 0, (sy_call_t *)linux_madvise }, /* 219 = linux_madvise */ 240 { AS(linux_getdents64_args), (sy_call_t *)linux_getdents64 }, /* 220 = linux_getdents64 */ 241 { AS(linux_fcntl64_args), (sy_call_t *)linux_fcntl64 }, /* 221 = linux_fcntl64 */ 242};
| 11#include "opt_compat.h" 12#include <sys/param.h> 13#include <sys/sysent.h> 14#include <sys/sysproto.h> 15#include <i386/linux/linux.h> 16#include <i386/linux/linux_proto.h> 17 18#define AS(name) (sizeof(struct name) / sizeof(register_t)) 19 20/* The casts are bogus but will do for now. */ 21struct sysent linux_sysent[] = { 22 { 0, (sy_call_t *)nosys }, /* 0 = setup */ 23 { SYF_MPSAFE | AS(sys_exit_args), (sy_call_t *)sys_exit }, /* 1 = exit */ 24 { SYF_MPSAFE | 0, (sy_call_t *)linux_fork }, /* 2 = linux_fork */ 25 { AS(read_args), (sy_call_t *)read }, /* 3 = read */ 26 { AS(write_args), (sy_call_t *)write }, /* 4 = write */ 27 { AS(linux_open_args), (sy_call_t *)linux_open }, /* 5 = linux_open */ 28 { AS(close_args), (sy_call_t *)close }, /* 6 = close */ 29 { AS(linux_waitpid_args), (sy_call_t *)linux_waitpid }, /* 7 = linux_waitpid */ 30 { AS(linux_creat_args), (sy_call_t *)linux_creat }, /* 8 = linux_creat */ 31 { AS(linux_link_args), (sy_call_t *)linux_link }, /* 9 = linux_link */ 32 { AS(linux_unlink_args), (sy_call_t *)linux_unlink }, /* 10 = linux_unlink */ 33 { AS(linux_execve_args), (sy_call_t *)linux_execve }, /* 11 = linux_execve */ 34 { AS(linux_chdir_args), (sy_call_t *)linux_chdir }, /* 12 = linux_chdir */ 35 { AS(linux_time_args), (sy_call_t *)linux_time }, /* 13 = linux_time */ 36 { AS(linux_mknod_args), (sy_call_t *)linux_mknod }, /* 14 = linux_mknod */ 37 { AS(linux_chmod_args), (sy_call_t *)linux_chmod }, /* 15 = linux_chmod */ 38 { AS(linux_lchown16_args), (sy_call_t *)linux_lchown16 }, /* 16 = linux_lchown16 */ 39 { 0, (sy_call_t *)nosys }, /* 17 = break */ 40 { AS(linux_stat_args), (sy_call_t *)linux_stat }, /* 18 = linux_stat */ 41 { AS(linux_lseek_args), (sy_call_t *)linux_lseek }, /* 19 = linux_lseek */ 42 { SYF_MPSAFE | 0, (sy_call_t *)linux_getpid }, /* 20 = linux_getpid */ 43 { AS(linux_mount_args), (sy_call_t *)linux_mount }, /* 21 = linux_mount */ 44 { AS(linux_oldumount_args), (sy_call_t *)linux_oldumount }, /* 22 = linux_oldumount */ 45 { AS(linux_setuid16_args), (sy_call_t *)linux_setuid16 }, /* 23 = linux_setuid16 */ 46 { 0, (sy_call_t *)linux_getuid16 }, /* 24 = linux_getuid16 */ 47 { 0, (sy_call_t *)linux_stime }, /* 25 = linux_stime */ 48 { AS(linux_ptrace_args), (sy_call_t *)linux_ptrace }, /* 26 = linux_ptrace */ 49 { AS(linux_alarm_args), (sy_call_t *)linux_alarm }, /* 27 = linux_alarm */ 50 { AS(linux_fstat_args), (sy_call_t *)linux_fstat }, /* 28 = linux_fstat */ 51 { 0, (sy_call_t *)linux_pause }, /* 29 = linux_pause */ 52 { AS(linux_utime_args), (sy_call_t *)linux_utime }, /* 30 = linux_utime */ 53 { 0, (sy_call_t *)nosys }, /* 31 = stty */ 54 { 0, (sy_call_t *)nosys }, /* 32 = gtty */ 55 { AS(linux_access_args), (sy_call_t *)linux_access }, /* 33 = linux_access */ 56 { AS(linux_nice_args), (sy_call_t *)linux_nice }, /* 34 = linux_nice */ 57 { 0, (sy_call_t *)nosys }, /* 35 = ftime */ 58 { 0, (sy_call_t *)sync }, /* 36 = sync */ 59 { AS(linux_kill_args), (sy_call_t *)linux_kill }, /* 37 = linux_kill */ 60 { AS(linux_rename_args), (sy_call_t *)linux_rename }, /* 38 = linux_rename */ 61 { AS(linux_mkdir_args), (sy_call_t *)linux_mkdir }, /* 39 = linux_mkdir */ 62 { AS(linux_rmdir_args), (sy_call_t *)linux_rmdir }, /* 40 = linux_rmdir */ 63 { AS(dup_args), (sy_call_t *)dup }, /* 41 = dup */ 64 { AS(linux_pipe_args), (sy_call_t *)linux_pipe }, /* 42 = linux_pipe */ 65 { AS(linux_times_args), (sy_call_t *)linux_times }, /* 43 = linux_times */ 66 { 0, (sy_call_t *)nosys }, /* 44 = prof */ 67 { AS(linux_brk_args), (sy_call_t *)linux_brk }, /* 45 = linux_brk */ 68 { AS(linux_setgid16_args), (sy_call_t *)linux_setgid16 }, /* 46 = linux_setgid16 */ 69 { 0, (sy_call_t *)linux_getgid16 }, /* 47 = linux_getgid16 */ 70 { AS(linux_signal_args), (sy_call_t *)linux_signal }, /* 48 = linux_signal */ 71 { 0, (sy_call_t *)linux_geteuid16 }, /* 49 = linux_geteuid16 */ 72 { 0, (sy_call_t *)linux_getegid16 }, /* 50 = linux_getegid16 */ 73 { AS(acct_args), (sy_call_t *)acct }, /* 51 = acct */ 74 { AS(linux_umount_args), (sy_call_t *)linux_umount }, /* 52 = linux_umount */ 75 { 0, (sy_call_t *)nosys }, /* 53 = lock */ 76 { AS(linux_ioctl_args), (sy_call_t *)linux_ioctl }, /* 54 = linux_ioctl */ 77 { AS(linux_fcntl_args), (sy_call_t *)linux_fcntl }, /* 55 = linux_fcntl */ 78 { 0, (sy_call_t *)nosys }, /* 56 = mpx */ 79 { AS(setpgid_args), (sy_call_t *)setpgid }, /* 57 = setpgid */ 80 { 0, (sy_call_t *)nosys }, /* 58 = ulimit */ 81 { 0, (sy_call_t *)linux_olduname }, /* 59 = linux_olduname */ 82 { AS(umask_args), (sy_call_t *)umask }, /* 60 = umask */ 83 { AS(chroot_args), (sy_call_t *)chroot }, /* 61 = chroot */ 84 { AS(linux_ustat_args), (sy_call_t *)linux_ustat }, /* 62 = linux_ustat */ 85 { AS(dup2_args), (sy_call_t *)dup2 }, /* 63 = dup2 */ 86 { 0, (sy_call_t *)getppid }, /* 64 = getppid */ 87 { 0, (sy_call_t *)getpgrp }, /* 65 = getpgrp */ 88 { 0, (sy_call_t *)setsid }, /* 66 = setsid */ 89 { AS(linux_sigaction_args), (sy_call_t *)linux_sigaction }, /* 67 = linux_sigaction */ 90 { 0, (sy_call_t *)linux_sgetmask }, /* 68 = linux_sgetmask */ 91 { AS(linux_ssetmask_args), (sy_call_t *)linux_ssetmask }, /* 69 = linux_ssetmask */ 92 { AS(linux_setreuid16_args), (sy_call_t *)linux_setreuid16 }, /* 70 = linux_setreuid16 */ 93 { AS(linux_setregid16_args), (sy_call_t *)linux_setregid16 }, /* 71 = linux_setregid16 */ 94 { AS(linux_sigsuspend_args), (sy_call_t *)linux_sigsuspend }, /* 72 = linux_sigsuspend */ 95 { SYF_MPSAFE | AS(linux_sigpending_args), (sy_call_t *)linux_sigpending }, /* 73 = linux_sigpending */ 96 { SYF_MPSAFE | AS(sethostname_args), (sy_call_t *)osethostname }, /* 74 = osethostname */ 97 { AS(linux_setrlimit_args), (sy_call_t *)linux_setrlimit }, /* 75 = linux_setrlimit */ 98 { AS(linux_old_getrlimit_args), (sy_call_t *)linux_old_getrlimit }, /* 76 = linux_old_getrlimit */ 99 { AS(getrusage_args), (sy_call_t *)getrusage }, /* 77 = getrusage */ 100 { AS(gettimeofday_args), (sy_call_t *)gettimeofday }, /* 78 = gettimeofday */ 101 { SYF_MPSAFE | AS(settimeofday_args), (sy_call_t *)settimeofday }, /* 79 = settimeofday */ 102 { AS(linux_getgroups16_args), (sy_call_t *)linux_getgroups16 }, /* 80 = linux_getgroups16 */ 103 { AS(linux_setgroups16_args), (sy_call_t *)linux_setgroups16 }, /* 81 = linux_setgroups16 */ 104 { AS(linux_old_select_args), (sy_call_t *)linux_old_select }, /* 82 = linux_old_select */ 105 { AS(linux_symlink_args), (sy_call_t *)linux_symlink }, /* 83 = linux_symlink */ 106 { AS(ostat_args), (sy_call_t *)ostat }, /* 84 = ostat */ 107 { AS(linux_readlink_args), (sy_call_t *)linux_readlink }, /* 85 = linux_readlink */ 108 { AS(linux_uselib_args), (sy_call_t *)linux_uselib }, /* 86 = linux_uselib */ 109 { AS(swapon_args), (sy_call_t *)swapon }, /* 87 = swapon */ 110 { AS(linux_reboot_args), (sy_call_t *)linux_reboot }, /* 88 = linux_reboot */ 111 { AS(linux_readdir_args), (sy_call_t *)linux_readdir }, /* 89 = linux_readdir */ 112 { AS(linux_mmap_args), (sy_call_t *)linux_mmap }, /* 90 = linux_mmap */ 113 { AS(munmap_args), (sy_call_t *)munmap }, /* 91 = munmap */ 114 { AS(linux_truncate_args), (sy_call_t *)linux_truncate }, /* 92 = linux_truncate */ 115 { AS(oftruncate_args), (sy_call_t *)oftruncate }, /* 93 = oftruncate */ 116 { AS(fchmod_args), (sy_call_t *)fchmod }, /* 94 = fchmod */ 117 { AS(fchown_args), (sy_call_t *)fchown }, /* 95 = fchown */ 118 { AS(getpriority_args), (sy_call_t *)getpriority }, /* 96 = getpriority */ 119 { AS(setpriority_args), (sy_call_t *)setpriority }, /* 97 = setpriority */ 120 { 0, (sy_call_t *)nosys }, /* 98 = profil */ 121 { AS(linux_statfs_args), (sy_call_t *)linux_statfs }, /* 99 = linux_statfs */ 122 { AS(linux_fstatfs_args), (sy_call_t *)linux_fstatfs }, /* 100 = linux_fstatfs */ 123 { AS(linux_ioperm_args), (sy_call_t *)linux_ioperm }, /* 101 = linux_ioperm */ 124 { AS(linux_socketcall_args), (sy_call_t *)linux_socketcall }, /* 102 = linux_socketcall */ 125 { AS(linux_syslog_args), (sy_call_t *)linux_syslog }, /* 103 = linux_syslog */ 126 { AS(linux_setitimer_args), (sy_call_t *)linux_setitimer }, /* 104 = linux_setitimer */ 127 { AS(linux_getitimer_args), (sy_call_t *)linux_getitimer }, /* 105 = linux_getitimer */ 128 { AS(linux_newstat_args), (sy_call_t *)linux_newstat }, /* 106 = linux_newstat */ 129 { AS(linux_newlstat_args), (sy_call_t *)linux_newlstat }, /* 107 = linux_newlstat */ 130 { AS(linux_newfstat_args), (sy_call_t *)linux_newfstat }, /* 108 = linux_newfstat */ 131 { 0, (sy_call_t *)linux_uname }, /* 109 = linux_uname */ 132 { AS(linux_iopl_args), (sy_call_t *)linux_iopl }, /* 110 = linux_iopl */ 133 { 0, (sy_call_t *)linux_vhangup }, /* 111 = linux_vhangup */ 134 { 0, (sy_call_t *)nosys }, /* 112 = idle */ 135 { 0, (sy_call_t *)linux_vm86old }, /* 113 = linux_vm86old */ 136 { AS(linux_wait4_args), (sy_call_t *)linux_wait4 }, /* 114 = linux_wait4 */ 137 { 0, (sy_call_t *)linux_swapoff }, /* 115 = linux_swapoff */ 138 { AS(linux_sysinfo_args), (sy_call_t *)linux_sysinfo }, /* 116 = linux_sysinfo */ 139 { AS(linux_ipc_args), (sy_call_t *)linux_ipc }, /* 117 = linux_ipc */ 140 { AS(fsync_args), (sy_call_t *)fsync }, /* 118 = fsync */ 141 { AS(linux_sigreturn_args), (sy_call_t *)linux_sigreturn }, /* 119 = linux_sigreturn */ 142 { AS(linux_clone_args), (sy_call_t *)linux_clone }, /* 120 = linux_clone */ 143 { SYF_MPSAFE | AS(setdomainname_args), (sy_call_t *)setdomainname }, /* 121 = setdomainname */ 144 { AS(linux_newuname_args), (sy_call_t *)linux_newuname }, /* 122 = linux_newuname */ 145 { AS(linux_modify_ldt_args), (sy_call_t *)linux_modify_ldt }, /* 123 = linux_modify_ldt */ 146 { 0, (sy_call_t *)linux_adjtimex }, /* 124 = linux_adjtimex */ 147 { AS(mprotect_args), (sy_call_t *)mprotect }, /* 125 = mprotect */ 148 { AS(linux_sigprocmask_args), (sy_call_t *)linux_sigprocmask }, /* 126 = linux_sigprocmask */ 149 { 0, (sy_call_t *)linux_create_module }, /* 127 = linux_create_module */ 150 { 0, (sy_call_t *)linux_init_module }, /* 128 = linux_init_module */ 151 { 0, (sy_call_t *)linux_delete_module }, /* 129 = linux_delete_module */ 152 { 0, (sy_call_t *)linux_get_kernel_syms }, /* 130 = linux_get_kernel_syms */ 153 { 0, (sy_call_t *)linux_quotactl }, /* 131 = linux_quotactl */ 154 { AS(getpgid_args), (sy_call_t *)getpgid }, /* 132 = getpgid */ 155 { AS(fchdir_args), (sy_call_t *)fchdir }, /* 133 = fchdir */ 156 { 0, (sy_call_t *)linux_bdflush }, /* 134 = linux_bdflush */ 157 { AS(linux_sysfs_args), (sy_call_t *)linux_sysfs }, /* 135 = linux_sysfs */ 158 { AS(linux_personality_args), (sy_call_t *)linux_personality }, /* 136 = linux_personality */ 159 { 0, (sy_call_t *)nosys }, /* 137 = afs_syscall */ 160 { AS(linux_setfsuid16_args), (sy_call_t *)linux_setfsuid16 }, /* 138 = linux_setfsuid16 */ 161 { AS(linux_setfsgid16_args), (sy_call_t *)linux_setfsgid16 }, /* 139 = linux_setfsgid16 */ 162 { AS(linux_llseek_args), (sy_call_t *)linux_llseek }, /* 140 = linux_llseek */ 163 { AS(linux_getdents_args), (sy_call_t *)linux_getdents }, /* 141 = linux_getdents */ 164 { AS(linux_select_args), (sy_call_t *)linux_select }, /* 142 = linux_select */ 165 { AS(flock_args), (sy_call_t *)flock }, /* 143 = flock */ 166 { AS(linux_msync_args), (sy_call_t *)linux_msync }, /* 144 = linux_msync */ 167 { AS(readv_args), (sy_call_t *)readv }, /* 145 = readv */ 168 { AS(writev_args), (sy_call_t *)writev }, /* 146 = writev */ 169 { AS(linux_getsid_args), (sy_call_t *)linux_getsid }, /* 147 = linux_getsid */ 170 { AS(linux_fdatasync_args), (sy_call_t *)linux_fdatasync }, /* 148 = linux_fdatasync */ 171 { AS(linux_sysctl_args), (sy_call_t *)linux_sysctl }, /* 149 = linux_sysctl */ 172 { AS(mlock_args), (sy_call_t *)mlock }, /* 150 = mlock */ 173 { AS(munlock_args), (sy_call_t *)munlock }, /* 151 = munlock */ 174 { AS(mlockall_args), (sy_call_t *)mlockall }, /* 152 = mlockall */ 175 { 0, (sy_call_t *)munlockall }, /* 153 = munlockall */ 176 { AS(sched_setparam_args), (sy_call_t *)sched_setparam }, /* 154 = sched_setparam */ 177 { AS(sched_getparam_args), (sy_call_t *)sched_getparam }, /* 155 = sched_getparam */ 178 { AS(linux_sched_setscheduler_args), (sy_call_t *)linux_sched_setscheduler }, /* 156 = linux_sched_setscheduler */ 179 { AS(linux_sched_getscheduler_args), (sy_call_t *)linux_sched_getscheduler }, /* 157 = linux_sched_getscheduler */ 180 { 0, (sy_call_t *)sched_yield }, /* 158 = sched_yield */ 181 { AS(linux_sched_get_priority_max_args), (sy_call_t *)linux_sched_get_priority_max }, /* 159 = linux_sched_get_priority_max */ 182 { AS(linux_sched_get_priority_min_args), (sy_call_t *)linux_sched_get_priority_min }, /* 160 = linux_sched_get_priority_min */ 183 { AS(sched_rr_get_interval_args), (sy_call_t *)sched_rr_get_interval }, /* 161 = sched_rr_get_interval */ 184 { SYF_MPSAFE | AS(nanosleep_args), (sy_call_t *)nanosleep }, /* 162 = nanosleep */ 185 { AS(linux_mremap_args), (sy_call_t *)linux_mremap }, /* 163 = linux_mremap */ 186 { AS(linux_setresuid16_args), (sy_call_t *)linux_setresuid16 }, /* 164 = linux_setresuid16 */ 187 { AS(linux_getresuid16_args), (sy_call_t *)linux_getresuid16 }, /* 165 = linux_getresuid16 */ 188 { 0, (sy_call_t *)linux_vm86 }, /* 166 = linux_vm86 */ 189 { 0, (sy_call_t *)linux_query_module }, /* 167 = linux_query_module */ 190 { AS(poll_args), (sy_call_t *)poll }, /* 168 = poll */ 191 { 0, (sy_call_t *)linux_nfsservctl }, /* 169 = linux_nfsservctl */ 192 { AS(linux_setresgid16_args), (sy_call_t *)linux_setresgid16 }, /* 170 = linux_setresgid16 */ 193 { AS(linux_getresgid16_args), (sy_call_t *)linux_getresgid16 }, /* 171 = linux_getresgid16 */ 194 { 0, (sy_call_t *)linux_prctl }, /* 172 = linux_prctl */ 195 { AS(linux_rt_sigreturn_args), (sy_call_t *)linux_rt_sigreturn }, /* 173 = linux_rt_sigreturn */ 196 { AS(linux_rt_sigaction_args), (sy_call_t *)linux_rt_sigaction }, /* 174 = linux_rt_sigaction */ 197 { AS(linux_rt_sigprocmask_args), (sy_call_t *)linux_rt_sigprocmask }, /* 175 = linux_rt_sigprocmask */ 198 { 0, (sy_call_t *)linux_rt_sigpending }, /* 176 = linux_rt_sigpending */ 199 { 0, (sy_call_t *)linux_rt_sigtimedwait }, /* 177 = linux_rt_sigtimedwait */ 200 { 0, (sy_call_t *)linux_rt_sigqueueinfo }, /* 178 = linux_rt_sigqueueinfo */ 201 { AS(linux_rt_sigsuspend_args), (sy_call_t *)linux_rt_sigsuspend }, /* 179 = linux_rt_sigsuspend */ 202 { AS(linux_pread_args), (sy_call_t *)linux_pread }, /* 180 = linux_pread */ 203 { AS(linux_pwrite_args), (sy_call_t *)linux_pwrite }, /* 181 = linux_pwrite */ 204 { AS(linux_chown16_args), (sy_call_t *)linux_chown16 }, /* 182 = linux_chown16 */ 205 { AS(linux_getcwd_args), (sy_call_t *)linux_getcwd }, /* 183 = linux_getcwd */ 206 { 0, (sy_call_t *)linux_capget }, /* 184 = linux_capget */ 207 { 0, (sy_call_t *)linux_capset }, /* 185 = linux_capset */ 208 { AS(linux_sigaltstack_args), (sy_call_t *)linux_sigaltstack }, /* 186 = linux_sigaltstack */ 209 { 0, (sy_call_t *)linux_sendfile }, /* 187 = linux_sendfile */ 210 { 0, (sy_call_t *)nosys }, /* 188 = getpmsg */ 211 { 0, (sy_call_t *)nosys }, /* 189 = putpmsg */ 212 { SYF_MPSAFE | 0, (sy_call_t *)linux_vfork }, /* 190 = linux_vfork */ 213 { AS(linux_getrlimit_args), (sy_call_t *)linux_getrlimit }, /* 191 = linux_getrlimit */ 214 { AS(linux_mmap2_args), (sy_call_t *)linux_mmap2 }, /* 192 = linux_mmap2 */ 215 { AS(linux_truncate64_args), (sy_call_t *)linux_truncate64 }, /* 193 = linux_truncate64 */ 216 { AS(linux_ftruncate64_args), (sy_call_t *)linux_ftruncate64 }, /* 194 = linux_ftruncate64 */ 217 { AS(linux_stat64_args), (sy_call_t *)linux_stat64 }, /* 195 = linux_stat64 */ 218 { AS(linux_lstat64_args), (sy_call_t *)linux_lstat64 }, /* 196 = linux_lstat64 */ 219 { AS(linux_fstat64_args), (sy_call_t *)linux_fstat64 }, /* 197 = linux_fstat64 */ 220 { AS(linux_lchown_args), (sy_call_t *)linux_lchown }, /* 198 = linux_lchown */ 221 { SYF_MPSAFE | 0, (sy_call_t *)linux_getuid }, /* 199 = linux_getuid */ 222 { SYF_MPSAFE | 0, (sy_call_t *)linux_getgid }, /* 200 = linux_getgid */ 223 { 0, (sy_call_t *)geteuid }, /* 201 = geteuid */ 224 { 0, (sy_call_t *)getegid }, /* 202 = getegid */ 225 { AS(setreuid_args), (sy_call_t *)setreuid }, /* 203 = setreuid */ 226 { AS(setregid_args), (sy_call_t *)setregid }, /* 204 = setregid */ 227 { AS(linux_getgroups_args), (sy_call_t *)linux_getgroups }, /* 205 = linux_getgroups */ 228 { AS(linux_setgroups_args), (sy_call_t *)linux_setgroups }, /* 206 = linux_setgroups */ 229 { AS(fchown_args), (sy_call_t *)fchown }, /* 207 = fchown */ 230 { AS(setresuid_args), (sy_call_t *)setresuid }, /* 208 = setresuid */ 231 { AS(getresuid_args), (sy_call_t *)getresuid }, /* 209 = getresuid */ 232 { AS(setresgid_args), (sy_call_t *)setresgid }, /* 210 = setresgid */ 233 { AS(getresgid_args), (sy_call_t *)getresgid }, /* 211 = getresgid */ 234 { AS(linux_chown_args), (sy_call_t *)linux_chown }, /* 212 = linux_chown */ 235 { AS(setuid_args), (sy_call_t *)setuid }, /* 213 = setuid */ 236 { AS(setgid_args), (sy_call_t *)setgid }, /* 214 = setgid */ 237 { AS(linux_setfsuid_args), (sy_call_t *)linux_setfsuid }, /* 215 = linux_setfsuid */ 238 { AS(linux_setfsgid_args), (sy_call_t *)linux_setfsgid }, /* 216 = linux_setfsgid */ 239 { AS(linux_pivot_root_args), (sy_call_t *)linux_pivot_root }, /* 217 = linux_pivot_root */ 240 { AS(linux_mincore_args), (sy_call_t *)linux_mincore }, /* 218 = linux_mincore */ 241 { 0, (sy_call_t *)linux_madvise }, /* 219 = linux_madvise */ 242 { AS(linux_getdents64_args), (sy_call_t *)linux_getdents64 }, /* 220 = linux_getdents64 */ 243 { AS(linux_fcntl64_args), (sy_call_t *)linux_fcntl64 }, /* 221 = linux_fcntl64 */ 244};
|