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