xref: /freebsd/sys/kern/init_sysent.c (revision 8e6b01171e30297084bb0b4457c4183c2746aacc)
1 /*
2  * System call switch table.
3  *
4  * DO NOT EDIT-- this file is automatically generated.
5  * created from	Id: syscalls.master,v 1.17 1995/10/07 06:24:08 swallace Exp
6  */
7 
8 #include <sys/types.h>
9 #include <sys/param.h>
10 #include <sys/mount.h>
11 #include <sys/sysent.h>
12 #include <sys/sysproto.h>
13 
14 #ifdef COMPAT_43
15 #define compat(n, name) n, (sy_call_t *)__CONCAT(o,name)
16 #else
17 #define compat(n, name) 0, (sy_call_t *)nosys
18 #endif
19 
20 /* The casts are bogus but will do for now. */
21 struct sysent sysent[] = {
22 	{ 0, (sy_call_t *)nosys },			/* 0 = syscall */
23 	{ 1, (sy_call_t *)exit },			/* 1 = exit */
24 	{ 0, (sy_call_t *)fork },			/* 2 = fork */
25 	{ 3, (sy_call_t *)read },			/* 3 = read */
26 	{ 3, (sy_call_t *)write },			/* 4 = write */
27 	{ 3, (sy_call_t *)open },			/* 5 = open */
28 	{ 1, (sy_call_t *)close },			/* 6 = close */
29 	{ 4, (sy_call_t *)wait4 },			/* 7 = wait4 */
30 	{ compat(2,creat) },		/* 8 = old creat */
31 	{ 2, (sy_call_t *)link },			/* 9 = link */
32 	{ 1, (sy_call_t *)unlink },			/* 10 = unlink */
33 	{ 0, (sy_call_t *)nosys },			/* 11 = obsolete execv */
34 	{ 1, (sy_call_t *)chdir },			/* 12 = chdir */
35 	{ 1, (sy_call_t *)fchdir },			/* 13 = fchdir */
36 	{ 3, (sy_call_t *)mknod },			/* 14 = mknod */
37 	{ 2, (sy_call_t *)chmod },			/* 15 = chmod */
38 	{ 3, (sy_call_t *)chown },			/* 16 = chown */
39 	{ 1, (sy_call_t *)obreak },			/* 17 = break */
40 	{ 3, (sy_call_t *)getfsstat },			/* 18 = getfsstat */
41 	{ compat(3,lseek) },		/* 19 = old lseek */
42 	{ 0, (sy_call_t *)getpid },			/* 20 = getpid */
43 	{ 4, (sy_call_t *)mount },			/* 21 = mount */
44 	{ 2, (sy_call_t *)unmount },			/* 22 = unmount */
45 	{ 1, (sy_call_t *)setuid },			/* 23 = setuid */
46 	{ 0, (sy_call_t *)getuid },			/* 24 = getuid */
47 	{ 0, (sy_call_t *)geteuid },			/* 25 = geteuid */
48 	{ 4, (sy_call_t *)ptrace },			/* 26 = ptrace */
49 	{ 3, (sy_call_t *)recvmsg },			/* 27 = recvmsg */
50 	{ 3, (sy_call_t *)sendmsg },			/* 28 = sendmsg */
51 	{ 6, (sy_call_t *)recvfrom },			/* 29 = recvfrom */
52 	{ 3, (sy_call_t *)accept },			/* 30 = accept */
53 	{ 3, (sy_call_t *)getpeername },		/* 31 = getpeername */
54 	{ 3, (sy_call_t *)getsockname },		/* 32 = getsockname */
55 	{ 2, (sy_call_t *)access },			/* 33 = access */
56 	{ 2, (sy_call_t *)chflags },			/* 34 = chflags */
57 	{ 2, (sy_call_t *)fchflags },			/* 35 = fchflags */
58 	{ 0, (sy_call_t *)sync },			/* 36 = sync */
59 	{ 2, (sy_call_t *)kill },			/* 37 = kill */
60 	{ compat(2,stat) },		/* 38 = old stat */
61 	{ 0, (sy_call_t *)getppid },			/* 39 = getppid */
62 	{ compat(2,lstat) },		/* 40 = old lstat */
63 	{ 1, (sy_call_t *)dup },			/* 41 = dup */
64 	{ 0, (sy_call_t *)pipe },			/* 42 = pipe */
65 	{ 0, (sy_call_t *)getegid },			/* 43 = getegid */
66 	{ 4, (sy_call_t *)profil },			/* 44 = profil */
67 #ifdef KTRACE
68 	{ 4, (sy_call_t *)ktrace },			/* 45 = ktrace */
69 #else
70 	{ 0, (sy_call_t *)nosys },			/* 45 = ktrace */
71 #endif
72 	{ 3, (sy_call_t *)sigaction },			/* 46 = sigaction */
73 	{ 0, (sy_call_t *)getgid },			/* 47 = getgid */
74 	{ 2, (sy_call_t *)sigprocmask },		/* 48 = sigprocmask */
75 	{ 2, (sy_call_t *)getlogin },			/* 49 = getlogin */
76 	{ 1, (sy_call_t *)setlogin },			/* 50 = setlogin */
77 	{ 1, (sy_call_t *)acct },			/* 51 = acct */
78 	{ 0, (sy_call_t *)sigpending },			/* 52 = sigpending */
79 	{ 2, (sy_call_t *)sigaltstack },		/* 53 = sigaltstack */
80 	{ 3, (sy_call_t *)ioctl },			/* 54 = ioctl */
81 	{ 1, (sy_call_t *)reboot },			/* 55 = reboot */
82 	{ 1, (sy_call_t *)revoke },			/* 56 = revoke */
83 	{ 2, (sy_call_t *)symlink },			/* 57 = symlink */
84 	{ 3, (sy_call_t *)readlink },			/* 58 = readlink */
85 	{ 3, (sy_call_t *)execve },			/* 59 = execve */
86 	{ 1, (sy_call_t *)umask },			/* 60 = umask */
87 	{ 1, (sy_call_t *)chroot },			/* 61 = chroot */
88 	{ compat(2,fstat) },		/* 62 = old fstat */
89 	{ compat(4,getkerninfo) },		/* 63 = old getkerninfo */
90 	{ compat(0,getpagesize) },		/* 64 = old getpagesize */
91 	{ 3, (sy_call_t *)msync },			/* 65 = msync */
92 	{ 0, (sy_call_t *)vfork },			/* 66 = vfork */
93 	{ 0, (sy_call_t *)nosys },			/* 67 = obsolete vread */
94 	{ 0, (sy_call_t *)nosys },			/* 68 = obsolete vwrite */
95 	{ 1, (sy_call_t *)sbrk },			/* 69 = sbrk */
96 	{ 1, (sy_call_t *)sstk },			/* 70 = sstk */
97 	{ compat(6,mmap) },		/* 71 = old mmap */
98 	{ 1, (sy_call_t *)ovadvise },			/* 72 = vadvise */
99 	{ 2, (sy_call_t *)munmap },			/* 73 = munmap */
100 	{ 3, (sy_call_t *)mprotect },			/* 74 = mprotect */
101 	{ 3, (sy_call_t *)madvise },			/* 75 = madvise */
102 	{ 0, (sy_call_t *)nosys },			/* 76 = obsolete vhangup */
103 	{ 0, (sy_call_t *)nosys },			/* 77 = obsolete vlimit */
104 	{ 3, (sy_call_t *)mincore },			/* 78 = mincore */
105 	{ 2, (sy_call_t *)getgroups },			/* 79 = getgroups */
106 	{ 2, (sy_call_t *)setgroups },			/* 80 = setgroups */
107 	{ 0, (sy_call_t *)getpgrp },			/* 81 = getpgrp */
108 	{ 2, (sy_call_t *)setpgid },			/* 82 = setpgid */
109 	{ 3, (sy_call_t *)setitimer },			/* 83 = setitimer */
110 	{ compat(0,wait) },		/* 84 = old wait */
111 	{ 1, (sy_call_t *)swapon },			/* 85 = swapon */
112 	{ 2, (sy_call_t *)getitimer },			/* 86 = getitimer */
113 	{ compat(2,gethostname) },		/* 87 = old gethostname */
114 	{ compat(2,sethostname) },		/* 88 = old sethostname */
115 	{ 0, (sy_call_t *)getdtablesize },		/* 89 = getdtablesize */
116 	{ 2, (sy_call_t *)dup2 },			/* 90 = dup2 */
117 	{ 0, (sy_call_t *)nosys },			/* 91 = getdopt */
118 	{ 3, (sy_call_t *)fcntl },			/* 92 = fcntl */
119 	{ 5, (sy_call_t *)select },			/* 93 = select */
120 	{ 0, (sy_call_t *)nosys },			/* 94 = setdopt */
121 	{ 1, (sy_call_t *)fsync },			/* 95 = fsync */
122 	{ 3, (sy_call_t *)setpriority },		/* 96 = setpriority */
123 	{ 3, (sy_call_t *)socket },			/* 97 = socket */
124 	{ 3, (sy_call_t *)connect },			/* 98 = connect */
125 	{ compat(3,accept) },		/* 99 = old accept */
126 	{ 2, (sy_call_t *)getpriority },		/* 100 = getpriority */
127 	{ compat(4,send) },		/* 101 = old send */
128 	{ compat(4,recv) },		/* 102 = old recv */
129 	{ 1, (sy_call_t *)sigreturn },			/* 103 = sigreturn */
130 	{ 3, (sy_call_t *)bind },			/* 104 = bind */
131 	{ 5, (sy_call_t *)setsockopt },			/* 105 = setsockopt */
132 	{ 2, (sy_call_t *)listen },			/* 106 = listen */
133 	{ 0, (sy_call_t *)nosys },			/* 107 = obsolete vtimes */
134 	{ compat(3,sigvec) },		/* 108 = old sigvec */
135 	{ compat(1,sigblock) },		/* 109 = old sigblock */
136 	{ compat(1,sigsetmask) },		/* 110 = old sigsetmask */
137 	{ 1, (sy_call_t *)sigsuspend },			/* 111 = sigsuspend */
138 	{ compat(2,sigstack) },		/* 112 = old sigstack */
139 	{ compat(3,recvmsg) },		/* 113 = old recvmsg */
140 	{ compat(3,sendmsg) },		/* 114 = old sendmsg */
141 	{ 0, (sy_call_t *)nosys },			/* 115 = obsolete vtrace */
142 	{ 2, (sy_call_t *)gettimeofday },		/* 116 = gettimeofday */
143 	{ 2, (sy_call_t *)getrusage },			/* 117 = getrusage */
144 	{ 5, (sy_call_t *)getsockopt },			/* 118 = getsockopt */
145 	{ 0, (sy_call_t *)nosys },			/* 119 = nosys */
146 	{ 3, (sy_call_t *)readv },			/* 120 = readv */
147 	{ 3, (sy_call_t *)writev },			/* 121 = writev */
148 	{ 2, (sy_call_t *)settimeofday },		/* 122 = settimeofday */
149 	{ 3, (sy_call_t *)fchown },			/* 123 = fchown */
150 	{ 2, (sy_call_t *)fchmod },			/* 124 = fchmod */
151 	{ compat(6,recvfrom) },		/* 125 = old recvfrom */
152 	{ 2, (sy_call_t *)setreuid },			/* 126 = setreuid */
153 	{ 2, (sy_call_t *)setregid },			/* 127 = setregid */
154 	{ 2, (sy_call_t *)rename },			/* 128 = rename */
155 	{ compat(2,truncate) },		/* 129 = old truncate */
156 	{ compat(2,ftruncate) },		/* 130 = old ftruncate */
157 	{ 2, (sy_call_t *)flock },			/* 131 = flock */
158 	{ 2, (sy_call_t *)mkfifo },			/* 132 = mkfifo */
159 	{ 6, (sy_call_t *)sendto },			/* 133 = sendto */
160 	{ 2, (sy_call_t *)shutdown },			/* 134 = shutdown */
161 	{ 4, (sy_call_t *)socketpair },			/* 135 = socketpair */
162 	{ 2, (sy_call_t *)mkdir },			/* 136 = mkdir */
163 	{ 1, (sy_call_t *)rmdir },			/* 137 = rmdir */
164 	{ 2, (sy_call_t *)utimes },			/* 138 = utimes */
165 	{ 0, (sy_call_t *)nosys },			/* 139 = obsolete 4.2 sigreturn */
166 	{ 2, (sy_call_t *)adjtime },			/* 140 = adjtime */
167 	{ compat(3,getpeername) },		/* 141 = old getpeername */
168 	{ compat(0,gethostid) },		/* 142 = old gethostid */
169 	{ compat(1,sethostid) },		/* 143 = old sethostid */
170 	{ compat(2,getrlimit) },		/* 144 = old getrlimit */
171 	{ compat(2,setrlimit) },		/* 145 = old setrlimit */
172 	{ compat(2,killpg) },		/* 146 = old killpg */
173 	{ 0, (sy_call_t *)setsid },			/* 147 = setsid */
174 	{ 4, (sy_call_t *)quotactl },			/* 148 = quotactl */
175 	{ compat(0,quota) },		/* 149 = old quota */
176 	{ compat(3,getsockname) },		/* 150 = old getsockname */
177 	{ 0, (sy_call_t *)nosys },			/* 151 = nosys */
178 	{ 0, (sy_call_t *)nosys },			/* 152 = nosys */
179 	{ 0, (sy_call_t *)nosys },			/* 153 = nosys */
180 	{ 0, (sy_call_t *)nosys },			/* 154 = nosys */
181 #ifdef NFS
182 	{ 2, (sy_call_t *)nfssvc },			/* 155 = nfssvc */
183 #else
184 	{ 0, (sy_call_t *)nosys },			/* 155 = nosys */
185 #endif
186 	{ compat(4,getdirentries) },		/* 156 = old getdirentries */
187 	{ 2, (sy_call_t *)statfs },			/* 157 = statfs */
188 	{ 2, (sy_call_t *)fstatfs },			/* 158 = fstatfs */
189 	{ 0, (sy_call_t *)nosys },			/* 159 = nosys */
190 	{ 0, (sy_call_t *)nosys },			/* 160 = nosys */
191 #ifdef NFS
192 	{ 2, (sy_call_t *)getfh },			/* 161 = getfh */
193 #else
194 	{ 0, (sy_call_t *)nosys },			/* 161 = nosys */
195 #endif
196 	{ 2, (sy_call_t *)getdomainname },		/* 162 = getdomainname */
197 	{ 2, (sy_call_t *)setdomainname },		/* 163 = setdomainname */
198 	{ 1, (sy_call_t *)uname },			/* 164 = uname */
199 	{ 2, (sy_call_t *)sysarch },			/* 165 = sysarch */
200 	{ 3, (sy_call_t *)rtprio },			/* 166 = rtprio */
201 	{ 0, (sy_call_t *)nosys },			/* 167 = nosys */
202 	{ 0, (sy_call_t *)nosys },			/* 168 = nosys */
203 #ifdef SYSVSEM
204 	{ 5, (sy_call_t *)semsys },			/* 169 = semsys */
205 #else
206 	{ 0, (sy_call_t *)nosys },			/* 169 = nosys */
207 #endif
208 #ifdef SYSVMSG
209 	{ 6, (sy_call_t *)msgsys },			/* 170 = msgsys */
210 #else
211 	{ 0, (sy_call_t *)nosys },			/* 170 = nosys */
212 #endif
213 #ifdef SYSVSHM
214 	{ 4, (sy_call_t *)shmsys },			/* 171 = shmsys */
215 #else
216 	{ 0, (sy_call_t *)nosys },			/* 171 = nosys */
217 #endif
218 	{ 0, (sy_call_t *)nosys },			/* 172 = nosys */
219 	{ 0, (sy_call_t *)nosys },			/* 173 = nosys */
220 	{ 0, (sy_call_t *)nosys },			/* 174 = nosys */
221 	{ 0, (sy_call_t *)nosys },			/* 175 = nosys */
222 	{ 1, (sy_call_t *)ntp_adjtime },		/* 176 = ntp_adjtime */
223 	{ 0, (sy_call_t *)nosys },			/* 177 = nosys */
224 	{ 0, (sy_call_t *)nosys },			/* 178 = nosys */
225 	{ 0, (sy_call_t *)nosys },			/* 179 = nosys */
226 	{ 0, (sy_call_t *)nosys },			/* 180 = nosys */
227 	{ 1, (sy_call_t *)setgid },			/* 181 = setgid */
228 	{ 1, (sy_call_t *)setegid },			/* 182 = setegid */
229 	{ 1, (sy_call_t *)seteuid },			/* 183 = seteuid */
230 #ifdef LFS
231 	{ 3, (sy_call_t *)lfs_bmapv },			/* 184 = lfs_bmapv */
232 	{ 3, (sy_call_t *)lfs_markv },			/* 185 = lfs_markv */
233 	{ 2, (sy_call_t *)lfs_segclean },		/* 186 = lfs_segclean */
234 	{ 2, (sy_call_t *)lfs_segwait },		/* 187 = lfs_segwait */
235 #else
236 	{ 0, (sy_call_t *)nosys },			/* 184 = nosys */
237 	{ 0, (sy_call_t *)nosys },			/* 185 = nosys */
238 	{ 0, (sy_call_t *)nosys },			/* 186 = nosys */
239 	{ 0, (sy_call_t *)nosys },			/* 187 = nosys */
240 #endif
241 	{ 2, (sy_call_t *)stat },			/* 188 = stat */
242 	{ 2, (sy_call_t *)fstat },			/* 189 = fstat */
243 	{ 2, (sy_call_t *)lstat },			/* 190 = lstat */
244 	{ 2, (sy_call_t *)pathconf },			/* 191 = pathconf */
245 	{ 2, (sy_call_t *)fpathconf },			/* 192 = fpathconf */
246 	{ 0, (sy_call_t *)nosys },			/* 193 = nosys */
247 	{ 2, (sy_call_t *)getrlimit },			/* 194 = getrlimit */
248 	{ 2, (sy_call_t *)setrlimit },			/* 195 = setrlimit */
249 	{ 4, (sy_call_t *)getdirentries },		/* 196 = getdirentries */
250 	{ 8, (sy_call_t *)mmap },			/* 197 = mmap */
251 	{ 0, (sy_call_t *)nosys },			/* 198 = __syscall */
252 	{ 5, (sy_call_t *)lseek },			/* 199 = lseek */
253 	{ 4, (sy_call_t *)truncate },			/* 200 = truncate */
254 	{ 4, (sy_call_t *)ftruncate },			/* 201 = ftruncate */
255 	{ 6, (sy_call_t *)__sysctl },			/* 202 = __sysctl */
256 	{ 2, (sy_call_t *)mlock },			/* 203 = mlock */
257 	{ 2, (sy_call_t *)munlock },			/* 204 = munlock */
258 	{ 0, (sy_call_t *)nosys },			/* 205 = nosys */
259 	{ 0, (sy_call_t *)nosys },			/* 206 = nosys */
260 	{ 0, (sy_call_t *)nosys },			/* 207 = nosys */
261 	{ 0, (sy_call_t *)nosys },			/* 208 = nosys */
262 	{ 0, (sy_call_t *)nosys },			/* 209 = nosys */
263 	{ 0, (sy_call_t *)lkmnosys },			/* 210 = lkmnosys */
264 	{ 0, (sy_call_t *)lkmnosys },			/* 211 = lkmnosys */
265 	{ 0, (sy_call_t *)lkmnosys },			/* 212 = lkmnosys */
266 	{ 0, (sy_call_t *)lkmnosys },			/* 213 = lkmnosys */
267 	{ 0, (sy_call_t *)lkmnosys },			/* 214 = lkmnosys */
268 	{ 0, (sy_call_t *)lkmnosys },			/* 215 = lkmnosys */
269 	{ 0, (sy_call_t *)lkmnosys },			/* 216 = lkmnosys */
270 	{ 0, (sy_call_t *)lkmnosys },			/* 217 = lkmnosys */
271 	{ 0, (sy_call_t *)lkmnosys },			/* 218 = lkmnosys */
272 	{ 0, (sy_call_t *)lkmnosys },			/* 219 = lkmnosys */
273 };
274 
275 struct sysentvec aout_sysvec = {
276 	sizeof (sysent) / sizeof (sysent[0]),
277 	sysent,
278 	0,
279 	0,
280 	0,
281 	0,
282 	0,
283 	0
284 };
285