linux_syscalls.c revision 1.53 1 1.16 cgd /* $NetBSD: linux_syscalls.c,v 1.53 2005/10/18 19:08:52 joerg Exp $ */
2 1.1 itohy
3 1.1 itohy /*
4 1.1 itohy * System call names.
5 1.1 itohy *
6 1.1 itohy * DO NOT EDIT-- this file is automatically generated.
7 1.53 joerg * created from NetBSD: syscalls.master,v 1.47 2005/10/18 18:37:44 joerg Exp
8 1.1 itohy */
9 1.38 lukem
10 1.38 lukem #include <sys/cdefs.h>
11 1.38 lukem __KERNEL_RCSID(0, "$NetBSD: linux_syscalls.c,v 1.53 2005/10/18 19:08:52 joerg Exp $");
12 1.1 itohy
13 1.37 mrg #if defined(_KERNEL_OPT)
14 1.37 mrg #if defined(_KERNEL_OPT)
15 1.1 itohy #include "opt_compat_netbsd.h"
16 1.1 itohy #include "opt_compat_43.h"
17 1.22 mycroft #endif
18 1.1 itohy #include <sys/param.h>
19 1.5 tron #include <sys/poll.h>
20 1.1 itohy #include <sys/systm.h>
21 1.1 itohy #include <sys/signal.h>
22 1.1 itohy #include <sys/mount.h>
23 1.44 thorpej #include <sys/sa.h>
24 1.1 itohy #include <sys/syscallargs.h>
25 1.1 itohy #include <compat/linux/common/linux_types.h>
26 1.1 itohy #include <compat/linux/common/linux_signal.h>
27 1.1 itohy #include <compat/linux/common/linux_siginfo.h>
28 1.1 itohy #include <compat/linux/common/linux_machdep.h>
29 1.47 thorpej #include <compat/linux/common/linux_mmap.h>
30 1.1 itohy #include <compat/linux/linux_syscallargs.h>
31 1.37 mrg #endif /* _KERNEL_OPT */
32 1.1 itohy
33 1.22 mycroft const char *const linux_syscallnames[] = {
34 1.1 itohy "syscall", /* 0 = syscall */
35 1.1 itohy "exit", /* 1 = exit */
36 1.1 itohy "fork", /* 2 = fork */
37 1.1 itohy "read", /* 3 = read */
38 1.1 itohy "write", /* 4 = write */
39 1.1 itohy "open", /* 5 = open */
40 1.1 itohy "close", /* 6 = close */
41 1.1 itohy "waitpid", /* 7 = waitpid */
42 1.1 itohy "creat", /* 8 = creat */
43 1.1 itohy "link", /* 9 = link */
44 1.1 itohy "unlink", /* 10 = unlink */
45 1.1 itohy "execve", /* 11 = execve */
46 1.1 itohy "chdir", /* 12 = chdir */
47 1.1 itohy "time", /* 13 = time */
48 1.1 itohy "mknod", /* 14 = mknod */
49 1.1 itohy "chmod", /* 15 = chmod */
50 1.27 fvdl "chown16", /* 16 = chown16 */
51 1.1 itohy "#17 (obsolete break)", /* 17 = obsolete break */
52 1.1 itohy "#18 (obsolete ostat)", /* 18 = obsolete ostat */
53 1.1 itohy #if !defined(_KERNEL) || defined(COMPAT_43)
54 1.1 itohy "lseek", /* 19 = lseek */
55 1.1 itohy #else
56 1.1 itohy "#19 (unimplemented compat_43_sys_lseek)", /* 19 = unimplemented compat_43_sys_lseek */
57 1.1 itohy #endif
58 1.1 itohy "getpid", /* 20 = getpid */
59 1.1 itohy "#21 (unimplemented mount)", /* 21 = unimplemented mount */
60 1.1 itohy "#22 (obsolete umount)", /* 22 = obsolete umount */
61 1.29 fvdl "linux_setuid16", /* 23 = linux_setuid16 */
62 1.29 fvdl "linux_getuid16", /* 24 = linux_getuid16 */
63 1.8 tron "stime", /* 25 = stime */
64 1.12 tron "ptrace", /* 26 = ptrace */
65 1.1 itohy "alarm", /* 27 = alarm */
66 1.1 itohy "#28 (obsolete ofstat)", /* 28 = obsolete ofstat */
67 1.1 itohy "pause", /* 29 = pause */
68 1.1 itohy "utime", /* 30 = utime */
69 1.1 itohy "#31 (obsolete stty)", /* 31 = obsolete stty */
70 1.1 itohy "#32 (obsolete gtty)", /* 32 = obsolete gtty */
71 1.1 itohy "access", /* 33 = access */
72 1.1 itohy "nice", /* 34 = nice */
73 1.1 itohy "#35 (obsolete ftime)", /* 35 = obsolete ftime */
74 1.1 itohy "sync", /* 36 = sync */
75 1.1 itohy "kill", /* 37 = kill */
76 1.1 itohy "rename", /* 38 = rename */
77 1.1 itohy "mkdir", /* 39 = mkdir */
78 1.1 itohy "rmdir", /* 40 = rmdir */
79 1.1 itohy "dup", /* 41 = dup */
80 1.1 itohy "pipe", /* 42 = pipe */
81 1.1 itohy "times", /* 43 = times */
82 1.1 itohy "#44 (obsolete prof)", /* 44 = obsolete prof */
83 1.1 itohy "brk", /* 45 = brk */
84 1.29 fvdl "linux_setgid16", /* 46 = linux_setgid16 */
85 1.29 fvdl "linux_getgid16", /* 47 = linux_getgid16 */
86 1.1 itohy "signal", /* 48 = signal */
87 1.29 fvdl "linux_geteuid16", /* 49 = linux_geteuid16 */
88 1.29 fvdl "linux_getegid16", /* 50 = linux_getegid16 */
89 1.1 itohy "acct", /* 51 = acct */
90 1.1 itohy "#52 (unimplemented umount)", /* 52 = unimplemented umount */
91 1.1 itohy "#53 (obsolete lock)", /* 53 = obsolete lock */
92 1.1 itohy "ioctl", /* 54 = ioctl */
93 1.1 itohy "fcntl", /* 55 = fcntl */
94 1.1 itohy "#56 (obsolete mpx)", /* 56 = obsolete mpx */
95 1.1 itohy "setpgid", /* 57 = setpgid */
96 1.1 itohy "#58 (obsolete ulimit)", /* 58 = obsolete ulimit */
97 1.1 itohy "#59 (unimplemented oldolduname)", /* 59 = unimplemented oldolduname */
98 1.1 itohy "umask", /* 60 = umask */
99 1.1 itohy "chroot", /* 61 = chroot */
100 1.1 itohy "#62 (unimplemented ustat)", /* 62 = unimplemented ustat */
101 1.1 itohy "dup2", /* 63 = dup2 */
102 1.1 itohy "getppid", /* 64 = getppid */
103 1.1 itohy "getpgrp", /* 65 = getpgrp */
104 1.1 itohy "setsid", /* 66 = setsid */
105 1.1 itohy "sigaction", /* 67 = sigaction */
106 1.1 itohy "siggetmask", /* 68 = siggetmask */
107 1.1 itohy "sigsetmask", /* 69 = sigsetmask */
108 1.27 fvdl "setreuid16", /* 70 = setreuid16 */
109 1.27 fvdl "setregid16", /* 71 = setregid16 */
110 1.1 itohy "sigsuspend", /* 72 = sigsuspend */
111 1.1 itohy "sigpending", /* 73 = sigpending */
112 1.1 itohy #if !defined(_KERNEL) || defined(COMPAT_43)
113 1.1 itohy "sethostname", /* 74 = sethostname */
114 1.1 itohy #else
115 1.1 itohy "#74 (unimplemented compat_43_sys_sethostname)", /* 74 = unimplemented compat_43_sys_sethostname */
116 1.1 itohy #endif
117 1.40 christos "setrlimit", /* 75 = setrlimit */
118 1.40 christos "getrlimit", /* 76 = getrlimit */
119 1.1 itohy "getrusage", /* 77 = getrusage */
120 1.1 itohy "gettimeofday", /* 78 = gettimeofday */
121 1.1 itohy "settimeofday", /* 79 = settimeofday */
122 1.29 fvdl "getgroups16", /* 80 = getgroups16 */
123 1.29 fvdl "setgroups16", /* 81 = setgroups16 */
124 1.1 itohy "oldselect", /* 82 = oldselect */
125 1.1 itohy "symlink", /* 83 = symlink */
126 1.1 itohy #if !defined(_KERNEL) || defined(COMPAT_43)
127 1.1 itohy "oolstat", /* 84 = oolstat */
128 1.1 itohy #else
129 1.1 itohy "#84 (unimplemented compat_43_sys_lstat)", /* 84 = unimplemented compat_43_sys_lstat */
130 1.1 itohy #endif
131 1.1 itohy "readlink", /* 85 = readlink */
132 1.53 joerg #ifdef EXEC_AOUT
133 1.1 itohy "uselib", /* 86 = uselib */
134 1.53 joerg #else
135 1.53 joerg "#86 (unimplemented sys_uselib)", /* 86 = unimplemented sys_uselib */
136 1.53 joerg #endif
137 1.1 itohy "swapon", /* 87 = swapon */
138 1.1 itohy "reboot", /* 88 = reboot */
139 1.1 itohy "readdir", /* 89 = readdir */
140 1.1 itohy "old_mmap", /* 90 = old_mmap */
141 1.1 itohy "munmap", /* 91 = munmap */
142 1.1 itohy "truncate", /* 92 = truncate */
143 1.1 itohy #if !defined(_KERNEL) || defined(COMPAT_43)
144 1.1 itohy "ftruncate", /* 93 = ftruncate */
145 1.1 itohy #else
146 1.1 itohy "#93 (unimplemented compat_43_sys_ftruncate)", /* 93 = unimplemented compat_43_sys_ftruncate */
147 1.1 itohy #endif
148 1.1 itohy "fchmod", /* 94 = fchmod */
149 1.27 fvdl "fchown16", /* 95 = fchown16 */
150 1.1 itohy "getpriority", /* 96 = getpriority */
151 1.1 itohy "setpriority", /* 97 = setpriority */
152 1.1 itohy "profil", /* 98 = profil */
153 1.1 itohy "statfs", /* 99 = statfs */
154 1.1 itohy "fstatfs", /* 100 = fstatfs */
155 1.1 itohy "#101 (unimplemented ioperm)", /* 101 = unimplemented ioperm */
156 1.1 itohy "socketcall", /* 102 = socketcall */
157 1.1 itohy "#103 (unimplemented syslog)", /* 103 = unimplemented syslog */
158 1.1 itohy "setitimer", /* 104 = setitimer */
159 1.1 itohy "getitimer", /* 105 = getitimer */
160 1.1 itohy "stat", /* 106 = stat */
161 1.1 itohy "lstat", /* 107 = lstat */
162 1.1 itohy "fstat", /* 108 = fstat */
163 1.1 itohy "#109 (unimplemented olduname)", /* 109 = unimplemented olduname */
164 1.1 itohy "#110 (unimplemented iopl)", /* 110 = unimplemented iopl */
165 1.1 itohy "#111 (unimplemented vhangup)", /* 111 = unimplemented vhangup */
166 1.1 itohy "#112 (unimplemented idle)", /* 112 = unimplemented idle */
167 1.1 itohy "#113 (unimplemented vm86old)", /* 113 = unimplemented vm86old */
168 1.1 itohy "wait4", /* 114 = wait4 */
169 1.21 jdolecek "swapoff", /* 115 = swapoff */
170 1.26 jdolecek "sysinfo", /* 116 = sysinfo */
171 1.1 itohy "ipc", /* 117 = ipc */
172 1.1 itohy "fsync", /* 118 = fsync */
173 1.1 itohy "sigreturn", /* 119 = sigreturn */
174 1.6 thorpej "clone", /* 120 = clone */
175 1.1 itohy "setdomainname", /* 121 = setdomainname */
176 1.1 itohy "uname", /* 122 = uname */
177 1.1 itohy "cacheflush", /* 123 = cacheflush */
178 1.1 itohy "#124 (unimplemented adjtimex)", /* 124 = unimplemented adjtimex */
179 1.1 itohy "mprotect", /* 125 = mprotect */
180 1.1 itohy "sigprocmask", /* 126 = sigprocmask */
181 1.1 itohy "#127 (unimplemented create_module)", /* 127 = unimplemented create_module */
182 1.1 itohy "#128 (unimplemented init_module)", /* 128 = unimplemented init_module */
183 1.1 itohy "#129 (unimplemented delete_module)", /* 129 = unimplemented delete_module */
184 1.1 itohy "#130 (unimplemented get_kernel_syms)", /* 130 = unimplemented get_kernel_syms */
185 1.1 itohy "#131 (unimplemented quotactl)", /* 131 = unimplemented quotactl */
186 1.1 itohy "getpgid", /* 132 = getpgid */
187 1.1 itohy "fchdir", /* 133 = fchdir */
188 1.1 itohy "#134 (unimplemented bdflush)", /* 134 = unimplemented bdflush */
189 1.1 itohy "#135 (unimplemented sysfs)", /* 135 = unimplemented sysfs */
190 1.1 itohy "personality", /* 136 = personality */
191 1.1 itohy "#137 (unimplemented afs_syscall)", /* 137 = unimplemented afs_syscall */
192 1.29 fvdl "linux_setfsuid16", /* 138 = linux_setfsuid16 */
193 1.29 fvdl "linux_getfsuid16", /* 139 = linux_getfsuid16 */
194 1.1 itohy "llseek", /* 140 = llseek */
195 1.1 itohy "getdents", /* 141 = getdents */
196 1.1 itohy "select", /* 142 = select */
197 1.1 itohy "flock", /* 143 = flock */
198 1.1 itohy "msync", /* 144 = msync */
199 1.1 itohy "readv", /* 145 = readv */
200 1.1 itohy "writev", /* 146 = writev */
201 1.1 itohy "getsid", /* 147 = getsid */
202 1.1 itohy "fdatasync", /* 148 = fdatasync */
203 1.1 itohy "__sysctl", /* 149 = __sysctl */
204 1.1 itohy "mlock", /* 150 = mlock */
205 1.1 itohy "munlock", /* 151 = munlock */
206 1.18 jdolecek "mlockall", /* 152 = mlockall */
207 1.18 jdolecek "munlockall", /* 153 = munlockall */
208 1.9 tron "sched_setparam", /* 154 = sched_setparam */
209 1.9 tron "sched_getparam", /* 155 = sched_getparam */
210 1.9 tron "sched_setscheduler", /* 156 = sched_setscheduler */
211 1.9 tron "sched_getscheduler", /* 157 = sched_getscheduler */
212 1.9 tron "sched_yield", /* 158 = sched_yield */
213 1.9 tron "sched_get_priority_max", /* 159 = sched_get_priority_max */
214 1.9 tron "sched_get_priority_min", /* 160 = sched_get_priority_min */
215 1.1 itohy "#161 (unimplemented sched_rr_get_interval)", /* 161 = unimplemented sched_rr_get_interval */
216 1.1 itohy "nanosleep", /* 162 = nanosleep */
217 1.1 itohy "mremap", /* 163 = mremap */
218 1.29 fvdl "setresuid16", /* 164 = setresuid16 */
219 1.29 fvdl "linux_getresuid16", /* 165 = linux_getresuid16 */
220 1.1 itohy "#166 (unimplemented vm86)", /* 166 = unimplemented vm86 */
221 1.1 itohy "#167 (unimplemented query_module)", /* 167 = unimplemented query_module */
222 1.5 tron "poll", /* 168 = poll */
223 1.1 itohy "#169 (unimplemented nfsservctl)", /* 169 = unimplemented nfsservctl */
224 1.29 fvdl "setresgid16", /* 170 = setresgid16 */
225 1.29 fvdl "linux_getresgid16", /* 171 = linux_getresgid16 */
226 1.1 itohy "#172 (unimplemented prctl)", /* 172 = unimplemented prctl */
227 1.1 itohy "rt_sigreturn", /* 173 = rt_sigreturn */
228 1.1 itohy "rt_sigaction", /* 174 = rt_sigaction */
229 1.1 itohy "rt_sigprocmask", /* 175 = rt_sigprocmask */
230 1.1 itohy "rt_sigpending", /* 176 = rt_sigpending */
231 1.1 itohy "#177 (unimplemented rt_sigtimedwait)", /* 177 = unimplemented rt_sigtimedwait */
232 1.1 itohy "rt_queueinfo", /* 178 = rt_queueinfo */
233 1.1 itohy "rt_sigsuspend", /* 179 = rt_sigsuspend */
234 1.3 thorpej "pread", /* 180 = pread */
235 1.3 thorpej "pwrite", /* 181 = pwrite */
236 1.28 itohy "lchown16", /* 182 = lchown16 */
237 1.4 tron "__getcwd", /* 183 = __getcwd */
238 1.1 itohy "#184 (unimplemented capget)", /* 184 = unimplemented capget */
239 1.1 itohy "#185 (unimplemented capset)", /* 185 = unimplemented capset */
240 1.17 itohy "sigaltstack", /* 186 = sigaltstack */
241 1.7 thorpej "#187 (unimplemented sendfile)", /* 187 = unimplemented sendfile */
242 1.7 thorpej "#188 (unimplemented getpmsg)", /* 188 = unimplemented getpmsg */
243 1.7 thorpej "#189 (unimplemented putpmsg)", /* 189 = unimplemented putpmsg */
244 1.7 thorpej "__vfork14", /* 190 = __vfork14 */
245 1.40 christos "ugetrlimit", /* 191 = ugetrlimit */
246 1.46 christos "mmap2", /* 192 = mmap2 */
247 1.24 jdolecek "truncate64", /* 193 = truncate64 */
248 1.24 jdolecek "ftruncate64", /* 194 = ftruncate64 */
249 1.24 jdolecek "stat64", /* 195 = stat64 */
250 1.24 jdolecek "lstat64", /* 196 = lstat64 */
251 1.24 jdolecek "fstat64", /* 197 = fstat64 */
252 1.29 fvdl "chown", /* 198 = chown */
253 1.27 fvdl "getuid", /* 199 = getuid */
254 1.27 fvdl "getgid", /* 200 = getgid */
255 1.27 fvdl "geteuid", /* 201 = geteuid */
256 1.27 fvdl "getegid", /* 202 = getegid */
257 1.27 fvdl "setreuid", /* 203 = setreuid */
258 1.27 fvdl "setregid", /* 204 = setregid */
259 1.29 fvdl "getgroups", /* 205 = getgroups */
260 1.29 fvdl "setgroups", /* 206 = setgroups */
261 1.27 fvdl "__posix_fchown", /* 207 = __posix_fchown */
262 1.29 fvdl "setresuid", /* 208 = setresuid */
263 1.29 fvdl "getresuid", /* 209 = getresuid */
264 1.29 fvdl "setresgid", /* 210 = setresgid */
265 1.29 fvdl "getresgid", /* 211 = getresgid */
266 1.29 fvdl "lchown", /* 212 = lchown */
267 1.27 fvdl "setuid", /* 213 = setuid */
268 1.27 fvdl "setgid", /* 214 = setgid */
269 1.29 fvdl "setfsuid", /* 215 = setfsuid */
270 1.29 fvdl "getfsuid", /* 216 = getfsuid */
271 1.43 jdolecek "#217 (unimplemented / * unused * /)", /* 217 = unimplemented / * unused * / */
272 1.43 jdolecek "#218 (unimplemented / * unused * /)", /* 218 = unimplemented / * unused * / */
273 1.43 jdolecek "#219 (unimplemented / * unused * /)", /* 219 = unimplemented / * unused * / */
274 1.42 christos "getdents64", /* 220 = getdents64 */
275 1.43 jdolecek "#221 (unimplemented gettid)", /* 221 = unimplemented gettid */
276 1.43 jdolecek "#222 (unimplemented tkill)", /* 222 = unimplemented tkill */
277 1.51 fvdl "setxattr", /* 223 = setxattr */
278 1.51 fvdl "lsetxattr", /* 224 = lsetxattr */
279 1.51 fvdl "fsetxattr", /* 225 = fsetxattr */
280 1.51 fvdl "getxattr", /* 226 = getxattr */
281 1.51 fvdl "lgetxattr", /* 227 = lgetxattr */
282 1.51 fvdl "fgetxattr", /* 228 = fgetxattr */
283 1.51 fvdl "listxattr", /* 229 = listxattr */
284 1.51 fvdl "llistxattr", /* 230 = llistxattr */
285 1.51 fvdl "flistxattr", /* 231 = flistxattr */
286 1.51 fvdl "removexattr", /* 232 = removexattr */
287 1.51 fvdl "lremovexattr", /* 233 = lremovexattr */
288 1.51 fvdl "fremovexattr", /* 234 = fremovexattr */
289 1.49 jdolecek "#235 (unimplemented futex)", /* 235 = unimplemented futex */
290 1.52 jmc "#236 (unimplemented sendfile64)", /* 236 = unimplemented sendfile64 */
291 1.52 jmc "#237 (unimplemented mincore)", /* 237 = unimplemented mincore */
292 1.52 jmc "#238 (unimplemented madvise)", /* 238 = unimplemented madvise */
293 1.52 jmc "#239 (unimplemented fcntl64)", /* 239 = unimplemented fcntl64 */
294 1.52 jmc "#240 (unimplemented readahead)", /* 240 = unimplemented readahead */
295 1.52 jmc "#241 (unimplemented io_setup)", /* 241 = unimplemented io_setup */
296 1.52 jmc "#242 (unimplemented io_destroy)", /* 242 = unimplemented io_destroy */
297 1.52 jmc "#243 (unimplemented io_getevents)", /* 243 = unimplemented io_getevents */
298 1.52 jmc "#244 (unimplemented io_submit)", /* 244 = unimplemented io_submit */
299 1.52 jmc "#245 (unimplemented io_cancel)", /* 245 = unimplemented io_cancel */
300 1.52 jmc "#246 (unimplemented fadvise64)", /* 246 = unimplemented fadvise64 */
301 1.52 jmc "#247 (unimplemented exit_group)", /* 247 = unimplemented exit_group */
302 1.52 jmc "#248 (unimplemented lookup_dcookie)", /* 248 = unimplemented lookup_dcookie */
303 1.52 jmc "#249 (unimplemented epoll_create)", /* 249 = unimplemented epoll_create */
304 1.52 jmc "#250 (unimplemented epoll_ctl)", /* 250 = unimplemented epoll_ctl */
305 1.52 jmc "#251 (unimplemented epoll_wait)", /* 251 = unimplemented epoll_wait */
306 1.52 jmc "#252 (unimplemented remap_file_pages)", /* 252 = unimplemented remap_file_pages */
307 1.52 jmc "#253 (unimplemented set_tid_address)", /* 253 = unimplemented set_tid_address */
308 1.52 jmc "#254 (unimplemented timer_create)", /* 254 = unimplemented timer_create */
309 1.52 jmc "#255 (unimplemented timer_settime)", /* 255 = unimplemented timer_settime */
310 1.52 jmc "#256 (unimplemented timer_gettime)", /* 256 = unimplemented timer_gettime */
311 1.52 jmc "#257 (unimplemented timer_getoverrun)", /* 257 = unimplemented timer_getoverrun */
312 1.52 jmc "#258 (unimplemented timer_delete)", /* 258 = unimplemented timer_delete */
313 1.52 jmc "clock_settime", /* 259 = clock_settime */
314 1.52 jmc "clock_gettime", /* 260 = clock_gettime */
315 1.52 jmc "clock_getres", /* 261 = clock_getres */
316 1.52 jmc "clock_nanosleep", /* 262 = clock_nanosleep */
317 1.1 itohy };
318