Commit | Line | Data |
---|---|---|
2966ca0e KM |
1 | /* |
2 | * Copyright (c) 1988 University of Utah. | |
3 | * Copyright (c) 1992 The Regents of the University of California. | |
4 | * All rights reserved. | |
5 | * | |
6 | * This code is derived from software contributed to Berkeley by | |
7 | * the Systems Programming Group of the University of Utah Computer | |
8 | * Science Department and Ralph Campbell. | |
9 | * | |
10 | * %sccs.include.redist.c% | |
11 | * | |
12 | * from: Utah $Hdr: hpux_sysent.c 1.1 90/07/09$ | |
13 | * | |
ef2387cd | 14 | * @(#)ultrix_sysent.c 7.6 (Berkeley) %G% |
2966ca0e KM |
15 | */ |
16 | ||
17 | /* | |
18 | * System call switch table. | |
19 | */ | |
20 | ||
5548a02f KB |
21 | #include <sys/param.h> |
22 | #include <sys/systm.h> | |
2966ca0e KM |
23 | |
24 | int nosys(),notimp(); | |
25 | ||
26 | int rexit(); | |
27 | int fork(); | |
28 | int read(); | |
29 | int write(); | |
30 | int open(); | |
31 | int close(); | |
32 | int ocreat(); | |
33 | int link(); | |
34 | int unlink(); | |
2966ca0e KM |
35 | int chdir(); |
36 | int mknod(); | |
37 | int chmod(); | |
38 | int chown(); | |
39 | int obreak(); | |
40 | int lseek(); | |
41 | int getpid(); | |
42 | int getuid(); | |
43 | int ptrace(); | |
44 | int saccess(); | |
45 | int sync(); | |
46 | int kill(); | |
99b1e299 RC |
47 | int ostat(); |
48 | int olstat(); | |
2966ca0e KM |
49 | int dup(); |
50 | int pipe(); | |
51 | int profil(); | |
52 | int ultrixtobsd(); | |
53 | int getgid(); | |
54 | int ioctl(); | |
55 | int reboot(); | |
56 | int symlink(); | |
57 | int readlink(); | |
58 | int execve(); | |
59 | int umask(); | |
60 | int chroot(); | |
99b1e299 | 61 | int ofstat(); |
ef2387cd | 62 | int ogetpagesize(); |
2966ca0e KM |
63 | int vfork(); |
64 | int sbrk(); | |
65 | int sstk(); | |
66 | int getgroups(); | |
67 | int setgroups(); | |
68 | int ultrixgetpgrp(); | |
69 | int ultrixsetpgrp(); | |
70 | int setitimer(); | |
71 | int ultrixwait3(); | |
72 | int getitimer(); | |
ef2387cd RC |
73 | int ogethostname(); |
74 | int osethostname(); | |
2966ca0e KM |
75 | int getdtablesize(); |
76 | int dup2(); | |
77 | int fcntl(); | |
78 | int select(); | |
79 | int fsync(); | |
80 | int setpriority(); | |
81 | int socket(); | |
82 | int connect(); | |
83 | int oaccept(); | |
84 | int getpriority(); | |
85 | int osend(); | |
86 | int orecv(); | |
0b7c38d2 | 87 | int sigreturn(); |
2966ca0e KM |
88 | int bind(); |
89 | int setsockopt(); | |
90 | int listen(); | |
91 | int ultrixsigvec(); | |
92 | int osigblock(); | |
93 | int osigsetmask(); | |
94 | int sigsuspend(); | |
99b1e299 | 95 | int osigstack(); |
2966ca0e KM |
96 | int orecvmsg(); |
97 | int osendmsg(); | |
98 | int gettimeofday(); | |
99 | int getrusage(); | |
100 | int getsockopt(); | |
101 | int readv(); | |
102 | int writev(); | |
103 | int settimeofday(); | |
104 | int fchown(); | |
105 | int fchmod(); | |
106 | int orecvfrom(); | |
107 | int osetreuid(); | |
108 | int osetregid(); | |
109 | int rename(); | |
110 | int truncate(); | |
111 | int ftruncate(); | |
112 | int flock(); | |
113 | int sendto(); | |
114 | int shutdown(); | |
115 | int socketpair(); | |
116 | int mkdir(); | |
117 | int rmdir(); | |
118 | int utimes(); | |
2966ca0e KM |
119 | int adjtime(); |
120 | int ogetpeername(); | |
ef2387cd RC |
121 | int ogethostid(); |
122 | int osethostid(); | |
2966ca0e KM |
123 | int getrlimit(); |
124 | int setrlimit(); | |
125 | int okillpg(); | |
126 | int ogetsockname(); | |
dce716e4 RC |
127 | int ogetdirentries(); |
128 | int ultrixgetdomainname(); | |
129 | int ultrixsetdomainname(); | |
2966ca0e KM |
130 | int ultrixgetsysinfo(); |
131 | ||
132 | /* | |
133 | * Reserved/unimplemented system calls in the range 0-150 inclusive | |
134 | * are reserved for use in future Berkeley releases. | |
135 | * Additional system calls implemented in vendor and other | |
136 | * redistributions should be placed in the reserved range at the end | |
137 | * of the current calls. | |
138 | */ | |
139 | struct sysent ultrixsysent[] = { | |
140 | 0, nosys, /* 0 = out of range */ | |
141 | 1, rexit, /* 1 = exit */ | |
142 | 0, fork, /* 2 = fork */ | |
143 | 3, read, /* 3 = read */ | |
144 | 3, write, /* 4 = write */ | |
145 | 3, open, /* 5 = open */ | |
146 | 1, close, /* 6 = close */ | |
147 | 0, nosys, /* 7 = old wait */ | |
148 | 2, ocreat, /* 8 = creat */ | |
149 | 2, link, /* 9 = link */ | |
150 | 1, unlink, /* 10 = unlink */ | |
151 | 0, nosys, /* 11 = old execv */ | |
152 | 1, chdir, /* 12 = chdir */ | |
153 | 0, nosys, /* 13 = old time */ | |
154 | 3, mknod, /* 14 = mknod */ | |
155 | 2, chmod, /* 15 = chmod */ | |
156 | 3, chown, /* 16 = chown */ | |
157 | 1, obreak, /* 17 = old break */ | |
158 | 0, nosys, /* 18 = old stat */ | |
159 | 3, lseek, /* 19 = lseek */ | |
160 | 0, getpid, /* 20 = getpid */ | |
161 | 3, notimp, /* 21 = mount */ | |
162 | 1, notimp, /* 22 = umount */ | |
163 | 0, nosys, /* 23 = old setuid */ | |
164 | 0, getuid, /* 24 = getuid */ | |
165 | 0, nosys, /* 25 = old stime */ | |
166 | 4, ptrace, /* 26 = ptrace */ | |
167 | 0, nosys, /* 27 = old alarm */ | |
168 | 0, nosys, /* 28 = old fstat */ | |
169 | 0, nosys, /* 29 = old pause */ | |
170 | 0, nosys, /* 30 = old utime */ | |
171 | 0, nosys, /* 31 = old stty */ | |
172 | 0, nosys, /* 32 = old gtty */ | |
173 | 2, saccess, /* 33 = access */ | |
174 | 0, nosys, /* 34 = old nice */ | |
175 | 0, nosys, /* 35 = old ftime */ | |
176 | 0, sync, /* 36 = sync */ | |
177 | 2, kill, /* 37 = kill */ | |
99b1e299 | 178 | 2, ostat, /* 38 = stat */ |
2966ca0e | 179 | 0, nosys, /* 39 = old setpgrp */ |
99b1e299 | 180 | 2, olstat, /* 40 = lstat */ |
2966ca0e KM |
181 | 1, dup, /* 41 = dup */ |
182 | 1, pipe, /* 42 = pipe */ | |
183 | 0, nosys, /* 43 = old times */ | |
184 | 4, profil, /* 44 = profil */ | |
185 | 0, ultrixtobsd, /* 45 = unused */ | |
186 | 0, nosys, /* 46 = old setgid */ | |
187 | 0, getgid, /* 47 = getgid */ | |
188 | 0, nosys, /* 48 = old sigsys */ | |
189 | 0, nosys, /* 49 = reserved for USG */ | |
190 | 0, nosys, /* 50 = reserved for USG */ | |
191 | 1, notimp, /* 51 = acct */ | |
192 | 0, nosys, /* 52 = old set phys addr */ | |
193 | 0, nosys, /* 53 = old lock in core */ | |
194 | 3, ioctl, /* 54 = ioctl */ | |
195 | 1, reboot, /* 55 = reboot */ | |
196 | 0, nosys, /* 56 = old mpxchan */ | |
197 | 2, symlink, /* 57 = symlink */ | |
198 | 3, readlink, /* 58 = readlink */ | |
199 | 3, execve, /* 59 = execve */ | |
200 | 1, umask, /* 60 = umask */ | |
201 | 1, chroot, /* 61 = chroot */ | |
99b1e299 | 202 | 2, ofstat, /* 62 = fstat */ |
2966ca0e | 203 | 0, nosys, /* 63 = unused */ |
ef2387cd | 204 | 0, ogetpagesize, /* 64 = getpagesize */ |
2966ca0e KM |
205 | 0, notimp, /* 65 = mremap */ |
206 | 0, vfork, /* 66 = vfork */ | |
207 | 0, nosys, /* 67 = old vread */ | |
208 | 0, nosys, /* 68 = old vwrite */ | |
209 | 1, sbrk, /* 69 = sbrk */ | |
210 | 1, sstk, /* 70 = sstk */ | |
211 | 0, nosys, /* 71 = mmap */ | |
212 | 0, nosys, /* 72 = old vadvise */ | |
213 | 0, notimp, /* 73 = munmap */ | |
214 | 0, notimp, /* 74 = mprotect */ | |
215 | 0, notimp, /* 75 = madvise */ | |
216 | 0, notimp, /* 76 = vhangup */ | |
217 | 0, nosys, /* 77 = old vlimit */ | |
218 | 0, nosys, /* 78 = mincore */ | |
219 | 2, getgroups, /* 79 = getgroups */ | |
220 | 2, setgroups, /* 80 = setgroups */ | |
221 | 1, ultrixgetpgrp, /* 81 = getpgrp */ | |
222 | 2, ultrixsetpgrp, /* 82 = setpgrp */ | |
223 | 3, setitimer, /* 83 = setitimer */ | |
224 | 3, ultrixwait3, /* 84 = wait3 */ | |
225 | 1, notimp, /* 85 = swapon */ | |
226 | 2, getitimer, /* 86 = getitimer */ | |
ef2387cd RC |
227 | 2, ogethostname, /* 87 = gethostname */ |
228 | 2, osethostname, /* 88 = sethostname */ | |
2966ca0e KM |
229 | 0, getdtablesize, /* 89 = getdtablesize */ |
230 | 2, dup2, /* 90 = dup2 */ | |
231 | 0, notimp, /* 91 = getdopt */ | |
232 | 3, fcntl, /* 92 = fcntl */ | |
233 | 5, select, /* 93 = select */ | |
234 | 0, notimp, /* 94 = setdopt */ | |
235 | 1, fsync, /* 95 = fsync */ | |
236 | 3, setpriority, /* 96 = setpriority */ | |
237 | 3, socket, /* 97 = socket */ | |
238 | 3, connect, /* 98 = connect */ | |
239 | 3, oaccept, /* 99 = accept */ | |
240 | 2, getpriority, /* 100 = getpriority */ | |
241 | 4, osend, /* 101 = send */ | |
242 | 4, orecv, /* 102 = recv */ | |
0b7c38d2 | 243 | 1, sigreturn, /* 103 = sigreturn */ |
2966ca0e KM |
244 | 3, bind, /* 104 = bind */ |
245 | 5, setsockopt, /* 105 = setsockopt */ | |
246 | 2, listen, /* 106 = listen */ | |
247 | 0, nosys, /* 107 = old vtimes */ | |
248 | 4, ultrixsigvec, /* 108 = sigvec */ | |
249 | 1, osigblock, /* 109 = sigblock */ | |
250 | 1, osigsetmask, /* 110 = sigsetmask */ | |
251 | 1, sigsuspend, /* 111 = sigpause */ | |
99b1e299 | 252 | 2, osigstack, /* 112 = sigstack */ |
2966ca0e KM |
253 | 3, orecvmsg, /* 113 = recvmsg */ |
254 | 3, osendmsg, /* 114 = sendmsg */ | |
255 | 0, nosys, /* 115 = old vtrace */ | |
256 | 2, gettimeofday, /* 116 = gettimeofday */ | |
257 | 2, getrusage, /* 117 = getrusage */ | |
258 | 5, getsockopt, /* 118 = getsockopt */ | |
259 | 0, nosys, /* 119 = old resuba */ | |
260 | 3, readv, /* 120 = readv */ | |
261 | 3, writev, /* 121 = writev */ | |
262 | 2, settimeofday, /* 122 = settimeofday */ | |
263 | 3, fchown, /* 123 = fchown */ | |
264 | 2, fchmod, /* 124 = fchmod */ | |
265 | 6, orecvfrom, /* 125 = recvfrom */ | |
266 | 2, osetreuid, /* 126 = setreuid */ | |
267 | 2, osetregid, /* 127 = setregid */ | |
268 | 2, rename, /* 128 = rename */ | |
269 | 2, truncate, /* 129 = truncate */ | |
270 | 2, ftruncate, /* 130 = ftruncate */ | |
271 | 2, flock, /* 131 = flock */ | |
272 | 0, nosys, /* 132 = nosys */ | |
273 | 6, sendto, /* 133 = sendto */ | |
274 | 2, shutdown, /* 134 = shutdown */ | |
275 | 5, socketpair, /* 135 = socketpair */ | |
276 | 2, mkdir, /* 136 = mkdir */ | |
277 | 1, rmdir, /* 137 = rmdir */ | |
278 | 2, utimes, /* 138 = utimes */ | |
0b7c38d2 | 279 | 1, sigreturn, /* 139 = internal (4.2 sigreturn) */ |
2966ca0e KM |
280 | 2, adjtime, /* 140 = adjtime */ |
281 | 3, ogetpeername, /* 141 = getpeername */ | |
ef2387cd RC |
282 | 2, ogethostid, /* 142 = gethostid */ |
283 | 2, osethostid, /* 143 = sethostid */ | |
2966ca0e KM |
284 | 2, getrlimit, /* 144 = getrlimit */ |
285 | 2, setrlimit, /* 145 = setrlimit */ | |
286 | 2, okillpg, /* 146 = killpg */ | |
287 | 0, nosys, /* 147 = nosys */ | |
288 | 0, notimp, /* 148 = setquota */ | |
289 | 0, notimp, /* 149 = quota */ | |
ef2387cd | 290 | 3, ogetsockname, /* 150 = getsockname */ |
2966ca0e KM |
291 | /* |
292 | * ULTRIX specific syscalls | |
293 | */ | |
294 | 0, notimp, /* 151 = sysmips */ | |
295 | 0, notimp, /* 152 = cacheflush */ | |
296 | 0, notimp, /* 153 = cachectl */ | |
297 | 0, notimp, /* 154 = debug */ | |
298 | 0, nosys, /* 155 = nosys */ | |
299 | 0, nosys, /* 156 = nosys */ | |
300 | 0, nosys, /* 157 = nosys */ | |
301 | 0, notimp, /* 158 = nfs_svc */ | |
dce716e4 | 302 | 4, ogetdirentries, /* 159 = getdirentries */ |
2966ca0e KM |
303 | 0, nosys, /* 160 = nosys */ |
304 | 0, nosys, /* 161 = nosys */ | |
305 | 0, nosys, /* 162 = nosys */ | |
306 | 0, notimp, /* 163 = nfs_biod */ | |
307 | 0, notimp, /* 164 = nfs_getfh */ | |
dce716e4 RC |
308 | 0, ultrixgetdomainname, /* 165 = getdomainname */ |
309 | 0, ultrixsetdomainname, /* 166 = setdomainname */ | |
2966ca0e KM |
310 | 0, nosys, /* 167 = nosys */ |
311 | 0, nosys, /* 168 = nosys */ | |
312 | 0, notimp, /* 169 = exportfs */ | |
313 | 0, nosys, /* 170 = nosys */ | |
314 | 0, nosys, /* 171 = nosys */ | |
315 | 0, notimp, /* 172 = msgctl */ | |
316 | 0, notimp, /* 173 = msgget */ | |
317 | 0, notimp, /* 174 = msgrcv */ | |
318 | 0, notimp, /* 175 = msgsnd */ | |
319 | 0, notimp, /* 176 = semctl */ | |
320 | 0, notimp, /* 177 = semget */ | |
321 | 0, notimp, /* 178 = semop */ | |
322 | 0, notimp, /* 179 = uname */ | |
323 | 0, notimp, /* 180 = shmsys */ | |
324 | 0, notimp, /* 181 = plock */ | |
325 | 0, notimp, /* 182 = lockf */ | |
326 | 0, notimp, /* 183 = ustat */ | |
327 | 0, notimp, /* 184 = getmnt */ | |
328 | 0, notimp, /* 185 = mount */ | |
329 | 0, notimp, /* 186 = umount */ | |
330 | 0, notimp, /* 187 = sigpending */ | |
331 | 0, nosys, /* 188 = nosys */ | |
332 | 0, nosys, /* 189 = nosys */ | |
333 | 0, nosys, /* 190 = nosys */ | |
334 | 0, nosys, /* 191 = nosys */ | |
335 | 0, nosys, /* 192 = nosys */ | |
336 | 0, nosys, /* 193 = nosys */ | |
337 | 0, nosys, /* 194 = nosys */ | |
338 | 0, nosys, /* 195 = nosys */ | |
339 | 0, nosys, /* 196 = nosys */ | |
340 | 0, nosys, /* 197 = nosys */ | |
341 | 0, nosys, /* 198 = nosys */ | |
342 | 0, nosys, /* 199 = nosys */ | |
343 | 0, nosys, /* 200 = nosys */ | |
344 | 0, nosys, /* 201 = nosys */ | |
345 | 0, nosys, /* 202 = nosys */ | |
346 | 0, nosys, /* 203 = nosys */ | |
347 | 0, nosys, /* 204 = nosys */ | |
348 | 0, nosys, /* 205 = nosys */ | |
349 | 0, nosys, /* 206 = nosys */ | |
350 | 0, nosys, /* 207 = nosys */ | |
351 | 0, nosys, /* 208 = nosys */ | |
352 | 0, nosys, /* 209 = nosys */ | |
353 | 0, nosys, /* 210 = nosys */ | |
354 | 0, nosys, /* 211 = nosys */ | |
355 | 0, nosys, /* 212 = nosys */ | |
356 | 0, nosys, /* 213 = nosys */ | |
357 | 0, nosys, /* 214 = nosys */ | |
358 | 0, nosys, /* 215 = nosys */ | |
359 | 0, nosys, /* 216 = nosys */ | |
360 | 0, nosys, /* 217 = nosys */ | |
361 | 0, nosys, /* 218 = nosys */ | |
362 | 0, nosys, /* 219 = nosys */ | |
363 | 0, nosys, /* 220 = nosys */ | |
364 | 0, nosys, /* 221 = nosys */ | |
365 | 0, nosys, /* 222 = nosys */ | |
366 | 0, nosys, /* 223 = nosys */ | |
367 | 0, nosys, /* 224 = nosys */ | |
368 | 0, nosys, /* 225 = nosys */ | |
369 | 0, nosys, /* 226 = nosys */ | |
370 | 0, nosys, /* 227 = nosys */ | |
371 | 0, nosys, /* 228 = nosys */ | |
372 | 0, nosys, /* 229 = nosys */ | |
373 | 0, nosys, /* 230 = nosys */ | |
374 | 0, nosys, /* 231 = nosys */ | |
375 | 0, nosys, /* 232 = nosys */ | |
376 | 0, notimp, /* 233 = nosys */ | |
377 | 0, notimp, /* 234 = nosys */ | |
378 | 0, notimp, /* 235 = nosys */ | |
379 | 0, nosys, /* 236 = nosys */ | |
380 | 0, notimp, /* 237 = nosys */ | |
381 | 0, notimp, /* 238 = nosys */ | |
382 | 0, nosys, /* 239 = nosys */ | |
383 | 0, nosys, /* 240 = nosys */ | |
384 | 0, nosys, /* 241 = nosys */ | |
385 | 0, nosys, /* 242 = nosys */ | |
386 | 0, nosys, /* 243 = nosys */ | |
387 | 0, nosys, /* 244 = nosys */ | |
388 | 0, nosys, /* 245 = nosys */ | |
389 | 0, nosys, /* 246 = nosys */ | |
390 | 0, nosys, /* 247 = nosys */ | |
391 | 0, nosys, /* 248 = nosys */ | |
392 | 0, nosys, /* 249 = nosys */ | |
393 | 0, nosys, /* 250 = nosys */ | |
394 | 0, nosys, /* 251 = nosys */ | |
395 | 0, nosys, /* 252 = nosys */ | |
396 | 0, nosys, /* 253 = nosys */ | |
397 | 0, nosys, /* 254 = nosys */ | |
398 | 0, nosys, /* 255 = nosys */ | |
399 | 0, ultrixgetsysinfo, /* 256 = getsysinfo */ | |
400 | 0, notimp, /* 257 = setsysinfo */ | |
401 | }; | |
402 | int ultrixnsysent = sizeof(ultrixsysent) / sizeof (ultrixsysent[0]); |